How rootmoataz/paper-maker-banking-app works
Paper Maker Banking App is a FastAPI banking REST API with process-local in-memory records. The principal workflow is a client request entering the routes, passing model validation, and reaching customer or account services for business rules and storage; successful money operations update balances and record history. Customer/account CRUD, ownership checks, deletion constraints, and transaction-history retrieval are distinct capabilities. The sampled source confirms route-to-service calls and direct service access to repositories; broader endpoint behavior is also documented in the README.
Main entry points: services.py Account service · main.py API routes · repositories.py Memory store and lock · models.py Request and response models
Components 10
HTTP API
- API routes
app/main.py - Request and response models
app/models.py
Banking services
- Customer service
app/services.py - Account service
app/services.py - Bank errors
app/services.py
In-memory storage
- Memory store and lock
app/repositories.py - User records
app/repositories.py - Account records
app/repositories.py - Transaction history
app/repositories.py
Other components
- API client
Connections 17
- API client → API routes: sends requests
- API routes → Request and response models: validates and serializes
- API routes → Customer service: calls customer operations
- API routes → Account service: calls account operations
- Customer service → Request and response models: creates customer results
- Account service → Request and response models: creates account and transaction results
- Customer service → User records: reads and writes
- Customer service → Account records: checks ownership and updates names
- Account service → User records: checks customer
- Account service → Account records: reads and writes
- Account service → Transaction history: records and reads history
- Customer service → Bank errors: raises
- Account service → Bank errors: raises
- API routes → Bank errors: maps errors to responses
- Memory store and lock → User records: owns repository
- Memory store and lock → Account records: owns repository
- Memory store and lock → Transaction history: owns repository