flowchart TB %% Title subgraph title[FastBuka Architecture C4 Model] end %% Styles classDef userInterface fill:#e9f2ff,stroke:#2374e1,color:#333 classDef apiLayer fill:#f5e6ff,stroke:#8833e1,color:#333 classDef coreServices fill:#fff2e6,stroke:#e17833,color:#333 classDef dataLayer fill:#e6fff2,stroke:#33e178,color:#333 classDef external fill:#ffe6e6,stroke:#e13333,color:#333 classDef title fill:none,stroke:none %% User User((User)) %% Web Application subgraph WebApp[Web Application] SPA[Single Page Application\nNextJS] API[API Gateway\nNestJS] end %% Core Services subgraph CoreServices[Core Services] Wallet[Wallet Service] Escrow[Escrow Service from Fastbuka payment logic] Vendor[Vendor Service] UserService[User Service] Notify[Notification Service] Rider[Rider Service] Admin[Admin Service] end %% Data Layer subgraph DataLayer[stores wallet service data] DB[(PostgreSQL)] StellarSDKDB[(StellarSDK payment logic)] end %% External Systems LINKio{{LINKio}} Banking{{Local Bank Transfer}} %% Connections User -->|payment: UI| SPA User -->|payment: Deposit| Banking Banking -->|payment: Transfer| LINKio SPA --> API API --> Wallet API --> UserService API --> Notify API --> Vendor API --> Rider API --> Admin SPA --> Escrow Escrow <-->| Handles logic for settlement of funds| StellarSDKDB Wallet <--> |Stellar's anchor credits wallet | LINKio %% Database Connections Wallet --> DB UserService --> DB Vendor --> DB Rider -->|Stores rider data| DB Admin -->|Manages system data| DB %% Apply styles class User,SPA userInterface class API apiLayer class Wallet,Escrow,Vendor,UserService,Notify,Rider,Admin coreServices class DB,StellarSDKDB dataLayer class LINKio,Banking external class title title