# topking74/limita architecture

> Architecture diagram of the GitHub repository topking74/limita, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/topking74/limita
- Repository: https://github.com/topking74/limita

## Overview

Limita is a digital banking REST API. A client request enters an API controller, which delegates to an application service; services enforce banking rules, work through the application database abstraction, and return API results. Documented capabilities include accounts and tiered limits, two-phase transfers, cards, exchange, bills, mobile recharges, beneficiaries, transactions, user/auth flows, and persistent real-time notifications. The sampled excerpts establish only selected calls; other feature branches are documented in the README, so unverified internal links are omitted.

Main entry points: [`src/Limita.API/Controllers`](https://github.com/topking74/limita/tree/main/src/Limita.API/Controllers) (REST controllers), [`src/Limita.Application/Common/Interfaces/IApplicationDbContext.cs`](https://github.com/topking74/limita/blob/main/src/Limita.Application/Common/Interfaces/IApplicationDbContext.cs) (Application DB contract), [`src/Limita.Application/Features/Limits/Services/LimitService.cs`](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Limits/Services/LimitService.cs) (Tiered limits), [`src/Limita.Application/Features/Transfers/Services/TransferService.cs`](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Transfers/Services/TransferService.cs) (Two-phase transfers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["API presentation"]
  node_api["REST controllers<br/>[Controllers]"]
  node_response["API response envelope<br/>[ApiResponse.cs]"]
end

subgraph group_banking["Banking services"]
  node_accounts["Accounts<br/>[AccountService.cs]"]
  node_limits["Tiered limits<br/>[LimitService.cs]"]
  node_transfers["Two-phase transfers<br/>[TransferService.cs]"]
  node_cards["Cards and PIN<br/>[CardService.cs]"]
  node_exchange["FX exchange<br/>[ExchangeService.cs]"]
  node_transactions["Transactions"]
  node_bills["Bill payments<br/>[BillService.cs]"]
  node_recharge["Mobile recharge"]
  node_beneficiaries["Beneficiaries"]
end

subgraph group_identity["Identity and messaging"]
  node_auth["Authentication<br/>[AuthService.cs]"]
  node_users["User profiles<br/>[UserService.cs]"]
  node_notifications["Notifications"]
  node_signalr["SignalR hub<br/>[NotificationHub.cs]"]
  node_email["Email delivery<br/>[EmailService.cs]"]
  node_jwt["JWT generation"]
end

subgraph group_persistence["Persistence and domain"]
  node_dbcontract["Application DB contract"]
  node_dbcontext["EF database context<br/>[LimitaDbContext.cs]"]
  node_store[("Banking data store<br/>[LimitaDbContext.cs]")]
  node_domain["Banking entities<br/>[Account.cs]"]
end

node_client(("API client"))

node_client -->|"sends request"| node_api
node_api -->|"delegates"| node_accounts
node_api -->|"delegates"| node_limits
node_api -->|"delegates"| node_auth
node_api -->|"delegates"| node_cards
node_api -->|"routes transfers"| node_transfers
node_api -->|"routes history"| node_transactions
node_api -->|"routes exchange"| node_exchange
node_api -->|"routes bills"| node_bills
node_api -->|"routes recharge"| node_recharge
node_api -->|"routes beneficiaries"| node_beneficiaries
node_api -->|"routes profiles"| node_users
node_api -->|"routes notifications"| node_notifications
node_accounts -.->|"reads limits"| node_limits
node_transfers -->|"checks limits"| node_limits
node_exchange -->|"checks limits"| node_limits
node_transfers -->|"notifies"| node_notifications
node_auth -->|"sends email"| node_email
node_auth -.->|"requests token"| node_jwt
node_notifications -->|"delivers live"| node_signalr
node_accounts -->|"reads and writes"| node_dbcontract
node_limits -->|"queries balances"| node_dbcontract
node_transfers -->|"persists transfers"| node_dbcontract
node_cards -->|"persists cards"| node_dbcontract
node_exchange -->|"persists exchange"| node_dbcontract
node_transactions -->|"queries ledger"| node_dbcontract
node_notifications -->|"persists notifications"| node_dbcontract
node_dbcontext -->|"implements"| node_dbcontract
node_dbcontext -->|"reads and writes"| node_store
node_dbcontext -->|"maps entities"| node_domain
node_api -.->|"returns envelope"| node_response

click node_api "https://github.com/topking74/limita/tree/main/src/Limita.API/Controllers"
click node_accounts "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Accounts/Services/AccountService.cs"
click node_limits "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Limits/Services/LimitService.cs"
click node_transfers "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Transfers/Services/TransferService.cs"
click node_cards "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Cards/Services/CardService.cs"
click node_exchange "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Exchange/Services/ExchangeService.cs"
click node_transactions "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Transactions/Services/TransactionService.cs"
click node_bills "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Bills/Services/BillService.cs"
click node_recharge "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Recharge/Services/MobileRechargeService.cs"
click node_beneficiaries "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Beneficiaries/Services/BeneficiaryService.cs"
click node_auth "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Auth/Services/AuthService.cs"
click node_users "https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Users/Services/UserService.cs"
click node_notifications "https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Notifications/NotificationService.cs"
click node_signalr "https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Hubs/NotificationHub.cs"
click node_email "https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Email/EmailService.cs"
click node_jwt "https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Authentication/JwtTokenGenerator.cs"
click node_dbcontract "https://github.com/topking74/limita/blob/main/src/Limita.Application/Common/Interfaces/IApplicationDbContext.cs"
click node_dbcontext "https://github.com/topking74/limita/blob/main/src/Limita.Persistence/Context/LimitaDbContext.cs"
click node_store "https://github.com/topking74/limita/blob/main/src/Limita.Persistence/Context/LimitaDbContext.cs"
click node_domain "https://github.com/topking74/limita/blob/main/src/Limita.Domain/Entities/Account.cs"
click node_response "https://github.com/topking74/limita/blob/main/src/Limita.Application/Common/ApiResponse.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_response,node_client toneBlue
class node_accounts,node_limits,node_transfers,node_cards,node_exchange,node_transactions,node_bills,node_recharge,node_beneficiaries toneAmber
class node_auth,node_users,node_notifications,node_signalr,node_email,node_jwt toneMint
class node_dbcontract,node_dbcontext,node_store,node_domain toneRose
```

## Components

### API presentation

- [REST controllers](https://github.com/topking74/limita/tree/main/src/Limita.API/Controllers): `src/Limita.API/Controllers`
- [API response envelope](https://github.com/topking74/limita/blob/main/src/Limita.Application/Common/ApiResponse.cs): `src/Limita.Application/Common/ApiResponse.cs`

### Banking services

- [Accounts](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Accounts/Services/AccountService.cs): `src/Limita.Application/Features/Accounts/Services/AccountService.cs`
- [Tiered limits](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Limits/Services/LimitService.cs): `src/Limita.Application/Features/Limits/Services/LimitService.cs`
- [Two-phase transfers](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Transfers/Services/TransferService.cs): `src/Limita.Application/Features/Transfers/Services/TransferService.cs`
- [Cards and PIN](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Cards/Services/CardService.cs): `src/Limita.Application/Features/Cards/Services/CardService.cs`
- [FX exchange](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Exchange/Services/ExchangeService.cs): `src/Limita.Application/Features/Exchange/Services/ExchangeService.cs`
- [Transactions](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Transactions/Services/TransactionService.cs): `src/Limita.Application/Features/Transactions/Services/TransactionService.cs`
- [Bill payments](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Bills/Services/BillService.cs): `src/Limita.Application/Features/Bills/Services/BillService.cs`
- [Mobile recharge](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Recharge/Services/MobileRechargeService.cs): `src/Limita.Application/Features/Recharge/Services/MobileRechargeService.cs`
- [Beneficiaries](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Beneficiaries/Services/BeneficiaryService.cs): `src/Limita.Application/Features/Beneficiaries/Services/BeneficiaryService.cs`

### Identity and messaging

- [Authentication](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Auth/Services/AuthService.cs): `src/Limita.Application/Features/Auth/Services/AuthService.cs`
- [User profiles](https://github.com/topking74/limita/blob/main/src/Limita.Application/Features/Users/Services/UserService.cs): `src/Limita.Application/Features/Users/Services/UserService.cs`
- [Notifications](https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Notifications/NotificationService.cs): `src/Limita.Infrastructure/Notifications/NotificationService.cs`
- [SignalR hub](https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Hubs/NotificationHub.cs): `src/Limita.Infrastructure/Hubs/NotificationHub.cs`
- [Email delivery](https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Email/EmailService.cs): `src/Limita.Infrastructure/Email/EmailService.cs`
- [JWT generation](https://github.com/topking74/limita/blob/main/src/Limita.Infrastructure/Authentication/JwtTokenGenerator.cs): `src/Limita.Infrastructure/Authentication/JwtTokenGenerator.cs`

### Persistence and domain

- [Application DB contract](https://github.com/topking74/limita/blob/main/src/Limita.Application/Common/Interfaces/IApplicationDbContext.cs): `src/Limita.Application/Common/Interfaces/IApplicationDbContext.cs`
- [EF database context](https://github.com/topking74/limita/blob/main/src/Limita.Persistence/Context/LimitaDbContext.cs): `src/Limita.Persistence/Context/LimitaDbContext.cs`
- [Banking data store](https://github.com/topking74/limita/blob/main/src/Limita.Persistence/Context/LimitaDbContext.cs): `src/Limita.Persistence/Context/LimitaDbContext.cs`
- [Banking entities](https://github.com/topking74/limita/blob/main/src/Limita.Domain/Entities/Account.cs): `src/Limita.Domain/Entities/Account.cs`

### Other components

- **API client**

## Connections

- API client → REST controllers: sends request (evidence: `README.md`)
- REST controllers → Accounts: delegates (evidence: `src/Limita.API/Controllers/AccountsController.cs`)
- REST controllers → Tiered limits: delegates (evidence: `src/Limita.API/Controllers/AccountsController.cs`)
- REST controllers → Authentication: delegates (evidence: `src/Limita.API/Controllers/AuthController.cs`)
- REST controllers → Cards and PIN: delegates (evidence: `src/Limita.API/Controllers/CardsController.cs`)
- REST controllers → Two-phase transfers: routes transfers (evidence: `README.md`)
- REST controllers → Transactions: routes history (evidence: `README.md`)
- REST controllers → FX exchange: routes exchange (evidence: `README.md`)
- REST controllers → Bill payments: routes bills (evidence: `README.md`)
- REST controllers → Mobile recharge: routes recharge (evidence: `README.md`)
- REST controllers → Beneficiaries: routes beneficiaries (evidence: `README.md`)
- REST controllers → User profiles: routes profiles (evidence: `README.md`)
- REST controllers → Notifications: routes notifications (evidence: `README.md`)
- Accounts → Tiered limits: reads limits
- Two-phase transfers → Tiered limits: checks limits (evidence: `src/Limita.Application/Features/Transfers/Services/TransferService.cs`)
- FX exchange → Tiered limits: checks limits (evidence: `src/Limita.Application/Features/Exchange/Services/ExchangeService.cs`)
- Two-phase transfers → Notifications: notifies (evidence: `src/Limita.Application/Features/Transfers/Services/TransferService.cs`)
- Authentication → Email delivery: sends email (evidence: `src/Limita.Application/Features/Auth/Services/AuthService.cs`)
- Authentication → JWT generation: requests token
- Notifications → SignalR hub: delivers live (evidence: `src/Limita.Infrastructure/Notifications/NotificationService.cs`)
- Accounts → Application DB contract: reads and writes (evidence: `src/Limita.Application/Features/Accounts/Services/AccountService.cs`)
- Tiered limits → Application DB contract: queries balances (evidence: `src/Limita.Application/Features/Limits/Services/LimitService.cs`)
- Two-phase transfers → Application DB contract: persists transfers (evidence: `src/Limita.Application/Features/Transfers/Services/TransferService.cs`)
- Cards and PIN → Application DB contract: persists cards (evidence: `src/Limita.Application/Features/Cards/Services/CardService.cs`)
- FX exchange → Application DB contract: persists exchange (evidence: `src/Limita.Application/Features/Exchange/Services/ExchangeService.cs`)
- Transactions → Application DB contract: queries ledger (evidence: `src/Limita.Application/Features/Transactions/Services/TransactionService.cs`)
- Notifications → Application DB contract: persists notifications (evidence: `src/Limita.Infrastructure/Notifications/NotificationService.cs`)
- EF database context → Application DB contract: implements (evidence: `src/Limita.Persistence/Context/LimitaDbContext.cs`)
- EF database context → Banking data store: reads and writes (evidence: `src/Limita.Persistence/Context/LimitaDbContext.cs`)
- EF database context → Banking entities: maps entities (evidence: `src/Limita.Persistence/Context/LimitaDbContext.cs`)
- REST controllers → API response envelope: returns envelope (evidence: `src/Limita.API/Controllers/AuthController.cs`)
