How mohmmedbelhadj/wallet-api works
Wallet API serves wallet lookup/listing, transfers, and per-wallet transfer history. HTTP requests enter through the Starlette app and wallet routes, where Pydantic DTOs validate requests and shape responses; the service enforces transfer rules before repository operations query or update PostgreSQL. The repository also records transfers and retrieves history. The README is empty, so capabilities and relationships here are based on the sampled source; models.py is empty.
Main entry points: repositories.py Wallet repository · main.py Starlette app · routes.py Wallet routes · services.py Wallet service
Components 10
HTTP interface
- Starlette app
main.py - Wallet routes
src/wallet/routes.py - Health check
main.py - Request/response DTOs
src/wallet/schemas.py
Wallet logic
- Wallet service
src/wallet/services.py
Persistence
- Wallet repository
src/wallet/repositories.py - PostgreSQL
- Wallet records
- Transfer ledger
Other components
- HTTP client
Connections 9
- HTTP client → Starlette app: sends HTTP
main.py - Starlette app → Wallet routes: registers routes
main.py - Starlette app → Health check: serves health
main.py - Wallet routes → Request/response DTOs: validates and shapes
src/wallet/routes.py - Wallet routes → Wallet service: calls
src/wallet/routes.py - Wallet service → Wallet repository: delegates
src/wallet/services.py - Wallet repository → PostgreSQL: queries and updates
src/wallet/repositories.py - Wallet repository → Wallet records: reads and updates
src/wallet/repositories.py - Wallet repository → Transfer ledger: records and reads
src/wallet/repositories.py