How harinisricode18/pms-pension_management_system works
PMS is a worker-focused micro-pension application: workers record irregular income, receive adaptive safe-savings guidance, allocate savings across retirement and emergency vaults, and track retirement readiness. The React frontend calls a FastAPI backend, whose routes coordinate domain services and MongoDB-backed helpers. Payer verification, agent cash deposits, withdrawals with possible nominee approval, notifications, projections, and health scoring are distinct capabilities. The README also describes conceptual modules whose runtime wiring is not fully shown; those links are omitted where source evidence is unavailable.
Main entry points: db_helpers.py Data access helpers · app.py FastAPI application · savings_routes.py Income and deposits · App.jsx React app routes
Components 32
Worker application
- React app routes
frontend/src/App.jsx - Auth state
frontend/src/context/AuthContext.jsx - Income entry
frontend/src/pages/IncomePage.jsx - Savings dashboard
frontend/src/pages/DashboardPage.jsx - Payer confirmation
frontend/src/pages/PayerPage.jsx - API client
frontend/src/services/api.js
API and workflows
- FastAPI application
app.py - Income and deposits
routes/savings_routes.py - Payer ledger routes
routes/ledger_routes.py - Withdrawal routes
routes/withdrawal_routes.py - Cash agent routes
routes/agent_routes.py - Health score routes
routes/health_routes.py - Projection routes
routes/projection_routes.py - API contracts
api_models.py
Pension capabilities
- Savings signal engine
services/financial_signal_engine.py - Verified income ledger
services/ledger_protocol.py - Emergency shield
services/emergency_shield.py - Dual-key governance
services/dual_key_governance.py - Digital cash bridge
services/digital_bridge.py - Guardian guidance
services/guardian_agent.py - Pension health engine
services/pension_health_engine.py - Retirement projection
services/pension_projection.py - Live notifications
ws_manager.py
Identity and persistence
- JWT authentication
auth_utils.py - Data access helpers
database/db_helpers.py - MongoDB collections
database/mongo_connection.py - Stored data schemas
models/schemas.py
Other components
- Worker
- Payer
- Local cash agent
- Withdrawal nominee
- MongoDB
Connections 43
- Worker → React app routes: uses
- React app routes → Auth state: provides auth
frontend/src/App.jsx - React app routes → Income entry: routes to
frontend/src/App.jsx - React app routes → Savings dashboard: routes to
frontend/src/App.jsx - React app routes → Payer confirmation: routes to
frontend/src/App.jsx - Income entry → API client: calls
frontend/src/pages/IncomePage.jsx - Savings dashboard → API client: calls
frontend/src/pages/DashboardPage.jsx - Payer confirmation → API client: calls
frontend/src/pages/PayerPage.jsx - Auth state → API client: restores session
frontend/src/context/AuthContext.jsx - API client → FastAPI application: HTTP requests
- FastAPI application → Income and deposits: registers routes
app.py - FastAPI application → Payer ledger routes: registers routes
app.py - FastAPI application → Withdrawal routes: registers routes
app.py - FastAPI application → Cash agent routes: registers routes
app.py - FastAPI application → Health score routes: registers routes
app.py - FastAPI application → Projection routes: registers routes
app.py - Income and deposits → JWT authentication: authenticates
routes/savings_routes.py - Income and deposits → API contracts: validates requests
routes/savings_routes.py - Income and deposits → Savings signal engine: recomputes target
routes/savings_routes.py - Income and deposits → Emergency shield: coordinates deposits
routes/savings_routes.py - Income and deposits → Data access helpers: reads and writes
routes/savings_routes.py - Payer ledger routes → Verified income ledger: verifies payment
routes/ledger_routes.py - Payer ledger routes → Data access helpers: reads and writes
routes/ledger_routes.py - Withdrawal routes → Dual-key governance: checks approval
routes/withdrawal_routes.py - Withdrawal routes → Emergency shield: processes withdrawal
routes/withdrawal_routes.py - Cash agent routes → Digital cash bridge: settles cash
routes/agent_routes.py - Cash agent routes → Live notifications: broadcasts event
routes/agent_routes.py - Health score routes → Pension health engine: computes score
routes/health_routes.py - Projection routes → Retirement projection: projects retirement
routes/projection_routes.py - Savings signal engine → Data access helpers: reads income data
services/financial_signal_engine.py - Verified income ledger → Data access helpers: persists ledger
services/ledger_protocol.py - Emergency shield → Data access helpers: updates vaults
services/emergency_shield.py - Dual-key governance → Data access helpers: manages approvals
services/dual_key_governance.py - Digital cash bridge → Data access helpers: settles balances
services/digital_bridge.py - Guardian guidance → Data access helpers: reads worker data
services/guardian_agent.py - Pension health engine → Data access helpers: scores and updates
services/pension_health_engine.py - Retirement projection → Data access helpers: reads savings data
- Data access helpers → MongoDB collections: uses collections
database/db_helpers.py - MongoDB collections → MongoDB: connects to
database/mongo_connection.py - Stored data schemas → MongoDB: describes stored data
- Payer → Payer ledger routes: confirms payment
routes/ledger_routes.py - Local cash agent → Cash agent routes: confirms cash
routes/agent_routes.py - Withdrawal nominee → Withdrawal routes: submits approval