How manu-7/wallet-ledger-platform works
Wallet & Ledger is a web wallet with a FastAPI backend and React client. Users authenticate, create or view wallets, look up recipients by email, deposit, transfer, and review transaction history. Transfers and deposits create paired ledger entries; account balances are cached for reads, while scheduled reconciliation checks ledger invariants. The graph follows the documented product capabilities, but some links—particularly unsampled history and reconciliation internals—are based on README statements rather than inspected implementation details.
Main entry points: App.jsx Wallet interface · transaction_service.py Transfer and deposit · account.py Account routes · main.py FastAPI application
Components 23
Wallet client
- Wallet interface
frontend/src/App.jsx - Sign-in screen
frontend/src/components/AuthScreen.jsx - Account panel
frontend/src/components/AccountsPanel.jsx - Transfer form
frontend/src/components/TransferForm.jsx - Payment history
frontend/src/components/PaymentHistory.jsx - Session context
frontend/src/context/AuthContext.jsx - HTTP client
frontend/src/api.js
API and identity
- FastAPI application
app/main.py - Authentication routes
app/routers/auth.py - Account routes
app/routers/account.py - Transaction routes
app/routers/transaction.py - JWT identity
app/core/security.py - Request authorization
app/dependencies.py
Wallet and ledger
- Transfer and deposit
app/services/transaction_service.py - Funding account
app/services/system_accounts.py - Balance cache
app/core/redis_client.py - Wallet and ledger records
app/models - PostgreSQL
- Redis
Reconciliation
- Ledger reconciliation
app/services/reconciliation_service.py - Scheduled task
app/tasks/reconciliation_tasks.py - Celery worker and scheduler
app/tasks/celery_app.py
Other components
- Wallet user
Connections 31
- Wallet user → Wallet interface: uses
frontend/src/App.jsx - Wallet interface → Sign-in screen: renders
frontend/src/App.jsx - Wallet interface → Account panel: renders
frontend/src/App.jsx - Wallet interface → Transfer form: renders
frontend/src/App.jsx - Wallet interface → Payment history: renders
frontend/src/App.jsx - Sign-in screen → Session context: uses
frontend/src/components/AuthScreen.jsx - Wallet interface → Session context: reads session
frontend/src/App.jsx - Session context → HTTP client: sends auth requests
frontend/src/context/AuthContext.jsx - Wallet interface → HTTP client: sends wallet requests
frontend/src/App.jsx - HTTP client → FastAPI application: calls API
- FastAPI application → Authentication routes: mounts
app/main.py - FastAPI application → Account routes: mounts
app/main.py - FastAPI application → Transaction routes: mounts
app/main.py - Authentication routes → JWT identity: creates tokens
app/routers/auth.py - Request authorization → JWT identity: validates tokens
app/dependencies.py - Authentication routes → PostgreSQL: reads and writes users
app/routers/auth.py - Account routes → Request authorization: requires user
app/routers/account.py - Transaction routes → Request authorization: requires user
app/routers/transaction.py - Account routes → PostgreSQL: reads and writes accounts
app/routers/account.py - Transaction routes → Transfer and deposit: delegates transfers
app/routers/transaction.py - Account routes → Transfer and deposit: delegates deposits
app/routers/account.py - Account routes → Balance cache: reads and fills cache
app/routers/account.py - Transfer and deposit → Funding account: gets funding account
app/services/transaction_service.py - Transfer and deposit → Balance cache: invalidates balances
app/services/transaction_service.py - Transfer and deposit → Wallet and ledger records: creates ledger entries
app/services/transaction_service.py - Transfer and deposit → PostgreSQL: commits transactions
app/services/transaction_service.py - Balance cache → Redis: reads and invalidates
app/core/redis_client.py - Wallet and ledger records → PostgreSQL: persists ledger data
- Scheduled task → Celery worker and scheduler: registers task
app/tasks/reconciliation_tasks.py - Scheduled task → Ledger reconciliation: invokes check
app/tasks/reconciliation_tasks.py - Ledger reconciliation → PostgreSQL: verifies ledger