How jonathancqa/atlasbank works
AtlasBank is a modular-monolith digital banking API. Its main workflow is account registration and login, followed by authenticated wallet creation and balance, statement, deposit, withdrawal, and transfer operations. Application handlers coordinate domain rules and persistence contracts; infrastructure implements those contracts over PostgreSQL. The README documents idempotency, concurrency control, and planned payment-gateway support. Some wallet handlers and startup wiring were not excerpted, so those relationships are shown only where the controller, source index, or README supports them.
Main entry points: AtlasBank.Wallets.Application/Commands Wallet commands · AtlasBank.Accounts.Application/Commands Account handlers · WalletsController.cs Wallets API · IWalletRepository.cs Wallet repository contract
Components 21
API and identity
- Accounts API
src/AtlasBank.API/Controllers/AccountsController.cs - Wallets API
src/AtlasBank.API/Controllers/WalletsController.cs
Accounts
- Account handlers
src/Modules/Accounts/AtlasBank.Accounts.Application/Commands - Account domain
src/Modules/Accounts/AtlasBank.Accounts.Domain/Entities/Account.cs - JWT service
src/Modules/Accounts/AtlasBank.Accounts.Infrastructure/Services/JwtService.cs - Account repository contract
src/Modules/Accounts/AtlasBank.Accounts.Application/Abstractions/IAccountRepository.cs
Wallets
- Wallet commands
src/Modules/Wallets/AtlasBank.Wallets.Application/Commands - Balance and statement
src/Modules/Wallets/AtlasBank.Wallets.Application/Queries - Wallet domain
src/Modules/Wallets/AtlasBank.Wallets.Domain/Entities/Wallet.cs - Wallet repository contract
src/Modules/Wallets/AtlasBank.Wallets.Application/Abstractions/IWalletRepository.cs - Wallet unit of work
src/Modules/Wallets/AtlasBank.Wallets.Application/Abstractions/IWalletsUnitOfWork.cs
Persistence
- Account repository
src/Modules/Accounts/AtlasBank.Accounts.Infrastructure/Persistence/Repositories/AccountRepository.cs - Wallet repository
src/Modules/Wallets/AtlasBank.Wallets.Infrastructure/Persistence/Repositories/WalletRepository.cs - Accounts database context
src/Modules/Accounts/AtlasBank.Accounts.Infrastructure/Persistence/AccountsDbContext.cs - Wallets database context
src/Modules/Wallets/AtlasBank.Wallets.Infrastructure/Persistence/WalletsDbContext.cs
Shared kernel
- Shared primitives
src/AtlasBank.SharedKernel/Primitives/Result.cs - Money value object
src/AtlasBank.SharedKernel/ValueObjects/Money.cs - Validation pipeline
src/AtlasBank.SharedKernel/Behaviors/ValidationPipelineBehavior.cs
Payments
- Payment gateway (planned)
src/Modules/Payments
Other components
- API client
- PostgreSQL
Connections 25
- API client → Accounts API: sends requests
README.md - API client → Wallets API: sends requests
README.md - Accounts API → Account handlers: dispatches commands
src/AtlasBank.API/Controllers/AccountsController.cs - Wallets API → Wallet commands: dispatches commands
src/AtlasBank.API/Controllers/WalletsController.cs - Wallets API → Balance and statement: dispatches queries
src/AtlasBank.API/Controllers/WalletsController.cs - Account handlers → Account domain: creates accounts
src/Modules/Accounts/AtlasBank.Accounts.Application/Commands/CreateAccount/CreateAccountHandler.cs - Account handlers → Account repository contract: uses repository
src/Modules/Accounts/AtlasBank.Accounts.Application/Commands/CreateAccount/CreateAccountHandler.cs - Account repository → Account repository contract: implements
src/Modules/Accounts/AtlasBank.Accounts.Infrastructure/Persistence/Repositories/AccountRepository.cs - Account repository → Accounts database context: queries
src/Modules/Accounts/AtlasBank.Accounts.Infrastructure/Persistence/Repositories/AccountRepository.cs - Account handlers → JWT service: issues token
src/Modules/Accounts/AtlasBank.Accounts.Application/Commands/Login/LoginHandler.cs - Wallet commands → Wallet domain: applies operations
src/Modules/Wallets/AtlasBank.Wallets.Application/Commands/Deposit/DepositHandler.cs - Wallet commands → Wallet repository contract: uses repository
src/Modules/Wallets/AtlasBank.Wallets.Application/Commands/Deposit/DepositHandler.cs - Wallet commands → Wallet unit of work: commits changes
src/Modules/Wallets/AtlasBank.Wallets.Application/Commands/Deposit/DepositHandler.cs - Wallet domain → Money value object: uses amounts
src/Modules/Wallets/AtlasBank.Wallets.Domain/Entities/Wallet.cs - Wallet repository → Wallet repository contract: implements
src/Modules/Wallets/AtlasBank.Wallets.Infrastructure/Persistence/Repositories/WalletRepository.cs - Wallet repository → Wallets database context: queries and updates
src/Modules/Wallets/AtlasBank.Wallets.Infrastructure/Persistence/Repositories/WalletRepository.cs - Balance and statement → Wallet repository contract: reads statements
README.md - Accounts database context → PostgreSQL: stores data
README.md - Wallets database context → PostgreSQL: stores data
README.md - Account handlers → Shared primitives: returns results
src/Modules/Accounts/AtlasBank.Accounts.Application/Commands/CreateAccount/CreateAccountHandler.cs - Wallet commands → Shared primitives: returns results
src/Modules/Wallets/AtlasBank.Wallets.Application/Commands/Deposit/DepositHandler.cs - Validation pipeline → Shared primitives: uses results
src/AtlasBank.SharedKernel/Behaviors/ValidationPipelineBehavior.cs - Wallet commands → Validation pipeline: validated by pipeline
README.md - Wallet commands → Wallet unit of work: commits transfers atomically
README.md - Payment gateway (planned) → API client: gateway integration
README.md