How nirmal-36/onepay works
OnePay is a fintech demo: users authenticate, review and confirm simulated transfers or bill/recharge payments, then inspect wallet activity, receipts, recipients, and account settings. The React client calls a Django API; the backend validates requests and stores account-scoped wallet, recipient, and transaction data in PostgreSQL. QR scanning resolves and verifies a recipient but does not itself pay. The README documents these capabilities; some backend wiring and unsampled page implementations are represented only at the documented subsystem level.
Main entry points: AppRoutes.tsx App routes · DemoProvider.tsx Demo state · payments.ts Payments API client · views.py Account endpoints
Components 18
Web experience
- App routes
frontend/src/AppRoutes.tsx - Demo state
frontend/src/context/DemoProvider.tsx
Account access
- Session state
frontend/src/context/AuthContext.tsx - Auth API client
frontend/src/api/auth.ts - Account endpoints
backend/apps/accounts/views.py - Account records
backend/apps/accounts/models.py
Simulated payments
- Payments API client
frontend/src/api/payments.ts - Send payment
frontend/src/pages/SendMoneyPage.tsx - QR scan and resolve
frontend/src/pages/ScanQrPage.tsx - Bills and recharge
frontend/src/pages/BillsPage.tsx - Recipient management
frontend/src/pages/RecipientsPage.tsx - Transactions and receipts
frontend/src/pages/TransactionsPage.tsx - Payment endpoints
backend/apps/payments/views.py - Payment and QR rules
backend/apps/payments/services.py
Persistent state
- Wallet and ledger models
backend/apps/payments/models.py - PostgreSQL
Other components
- OnePay user
- Email delivery
Connections 23
- OnePay user → App routes: uses
frontend/src/AppRoutes.tsx - App routes → Session state: guards routes
frontend/src/AppRoutes.tsx - App routes → Send payment: routes to
frontend/src/AppRoutes.tsx - App routes → QR scan and resolve: routes to
frontend/src/AppRoutes.tsx - App routes → Bills and recharge: routes to
frontend/src/AppRoutes.tsx - App routes → Recipient management: routes to
frontend/src/AppRoutes.tsx - App routes → Transactions and receipts: routes to
frontend/src/AppRoutes.tsx - Session state → Auth API client: calls
frontend/src/context/AuthContext.tsx - Auth API client → Account endpoints: requests
- Account endpoints → Account records: reads and writes
backend/apps/accounts/views.py - Account endpoints → Email delivery: sends reset link
- Send payment → Demo state: uses state
frontend/src/pages/SendMoneyPage.tsx - QR scan and resolve → Payments API client: resolves QR
frontend/src/pages/ScanQrPage.tsx - Send payment → Payments API client: initiates after review
frontend/src/pages/SendMoneyPage.tsx - Bills and recharge → Demo state: uses state
frontend/src/pages/BillsPage.tsx - Recipient management → Demo state: uses state
frontend/src/pages/RecipientsPage.tsx - Transactions and receipts → Demo state: uses state
- Demo state → Payments API client: loads and updates
frontend/src/context/DemoProvider.tsx - Payments API client → Payment endpoints: requests
- Payment endpoints → Payment and QR rules: delegates payment logic
backend/apps/payments/views.py - Payment endpoints → Wallet and ledger models: queries and persists
backend/apps/payments/views.py - Payment and QR rules → Wallet and ledger models: updates ledger
backend/apps/payments/services.py - Wallet and ledger models → PostgreSQL: persists