How mobtone/bankapi works
This is a layered banking API for administering customers and managing accounts, transactions, loans, and authentication. The principal workflow is an HTTP request reaching a controller, invoking business logic, and accessing persisted banking data through repositories. The graph preserves documented API capabilities; some controller-to-service links are dashed because their implementations were not sampled. The README describes the layers, while source excerpts and the index provide stronger evidence for the customer-registration and authentication paths.
Main entry points: CustomerService.cs Customer service · BankAppDbContext.cs Database context · AuthorizationController.cs Login endpoint · AdminService.cs Admin service
Components 27
HTTP API
- Admin endpoints
BankAPI/Controllers/AdminController.cs - Login endpoint
BankAPI/Controllers/AuthorizationController.cs - Admin verification
BankAPI/Controllers/AdminVerificationController.cs - Customer security key
BankAPI/Controllers/CustomerAuthController.cs - Account endpoints
BankAPI/Controllers/CustomerAccountsController.cs - New account endpoint
BankAPI/Controllers/NewAccountController.cs - Transfer endpoint
BankAPI/Controllers/TransactionController.cs - Account transactions
BankAPI/Controllers/AccountTransactionsController.cs - Account types
BankAPI/Controllers/AccountTypesController.cs - Loan endpoint
BankAPI/Controllers/LoanController.cs
Identity & Admin
- Admin service
BankApp.Core/Services/AdminService.cs - JWT service
BankApp.Core/Services/JwtService.cs - Customer authorization
BankApp.Core/Services/AuthorizationService.cs - Security key generator
BankApp.Core/Services/SecurityKeyGenerator.cs
Banking Operations
- Customer service
BankApp.Core/Services/CustomerService.cs - Account service
BankApp.Core/Services/AccountService.cs - Account type service
BankApp.Core/Services/AccountTypeService.cs - Transaction service
BankApp.Core/Services/TransactionService.cs
Data & Domain
- Customer repository
BankApp.Data/Repositories/Repos/CustomerRepo.cs - Account repository
BankApp.Data/Repositories/Repos/AccountRepo.cs - Account type repository
BankApp.Data/Repositories/Repos/AccountTypeRepo.cs - Admin repository
BankApp.Data/Repositories/Repos/AdminRepo.cs - Transaction repository
BankApp.Data/Repositories/Repos/TransactionRepo.cs - Database context
BankApp.Data/DataModels/BankAppDbContext.cs - Customer & account
BankApp.Domain/Models/Customer.cs - Admin
BankApp.Domain/Models/Admin.cs
Other components
- API client
Connections 33
- API client → Login endpoint: submits login
- API client → Admin endpoints: registers customer
- API client → Admin verification: requests admin security
- API client → Customer security key: requests security key
- API client → Account endpoints: views accounts
- API client → New account endpoint: creates account
- API client → Transfer endpoint: transfers funds
- API client → Account transactions: views transactions
- API client → Account types: lists account types
- API client → Loan endpoint: adds customer loan
- Admin endpoints → Customer service: registers customer
BankAPI/Controllers/AdminController.cs - Login endpoint → Admin service: checks admin login
BankAPI/Controllers/AuthorizationController.cs - Login endpoint → Customer service: checks customer login
BankAPI/Controllers/AuthorizationController.cs - Login endpoint → JWT service: generates token
BankAPI/Controllers/AuthorizationController.cs - Customer security key → Customer service: gets security key
BankAPI/Controllers/CustomerAuthController.cs - Account endpoints → Account service: requests overview
BankAPI/Controllers/CustomerAccountsController.cs - New account endpoint → Account service: creates account
BankAPI/Controllers/NewAccountController.cs - Admin verification → Admin service: manages credentials
BankAPI/Controllers/AdminVerificationController.cs - Admin service → Admin repository: accesses admin data
BankApp.Core/Services/AdminService.cs - Admin service → Security key generator: generates security key
BankApp.Core/Services/AdminService.cs - Customer service → Customer repository: delegates customer data
BankApp.Core/Services/CustomerService.cs - Customer repository → Database context: gets connection
BankApp.Data/Repositories/Repos/CustomerRepo.cs - Transfer endpoint → Transaction service: handles transfer
- Transaction service → Transaction repository: accesses transaction data
- Account transactions → Account service: loads account history
- Account types → Account type service: loads account types
- Loan endpoint → Customer service: adds customer loan
- Account service → Account repository: accesses account data
- Account type service → Account type repository: accesses type data
- Admin repository → Database context: uses database
- Account repository → Database context: uses database
- Account type repository → Database context: uses database
- Transaction repository → Database context: uses database