How bonfacegabriel/inventory-management works
This is a payment and inventory management system with a React client and Django API. Its principal workflow turns incoming payment messages into transactions, then exposes transaction status to users through the API and real-time updates. Separate workflows cover manual payments, order fulfillment and stock movements, reconciliation and reporting, and analytics. The README documents these capabilities; source excerpts and the SOURCE INDEX support selected internal links. Several frontend pages and backend services are indexed but unsampled, so their implementation details and unshown calls are not inferred.
Main entry points: api.ts API client · models.py Transactions and products · App.tsx React application · tasks.py Message processing
Components 23
Web client
- React application
frontend/src/App.tsx - Authentication
frontend/src/contexts/AuthContext.tsx - API client
frontend/src/services/api.ts - Transactions UI
frontend/src/pages/TransactionsPage.tsx - Reports UI
frontend/src/pages/ReportsPage.tsx - Stock reporting
frontend/src/pages/StockReportPage.tsx - Fulfillment UI
frontend/src/pages/MerchandiseFulfillmentPage.tsx - WebSocket client
frontend/src/contexts/WebSocketContext.tsx
Payment processing
- REST API
backend/payments - Payment gateways
backend/payments/models.py - SMS parser
backend/payments/parsers.py - Message processing
backend/payments/tasks.py - Manual payments
backend/payments/services/manual_payment_service.py - Async task queue
backend/payments/tasks.py
Orders and inventory
- Transactions and products
backend/payments/models.py - Order fulfillment
backend/payments/services/fulfillment_service.py - Merchandise services
backend/payments/services/merchandise_service.py
Reporting and insights
- Reconciliation
backend/payments/services/reconciliation_v2_service.py - Analytics services
backend/payments/services/bi_core_service.py - BI assistant
backend/payments/bi_telegram_bot.py
Real-time delivery
- WebSocket updates
backend/payments/consumers.py
Other components
- System user
- Payment SMS
Connections 25
- System user → React application: uses
- React application → Transactions UI: routes to
frontend/src/App.tsx - React application → Reports UI: routes to
frontend/src/App.tsx - React application → Stock reporting: routes to
frontend/src/App.tsx - React application → Fulfillment UI: routes to
frontend/src/App.tsx - Authentication → API client: requests profile
frontend/src/contexts/AuthContext.tsx - Transactions UI → API client: loads transactions
- Reports UI → API client: requests reports
- Stock reporting → API client: requests stock data
- Fulfillment UI → API client: requests fulfillment
- API client → REST API: HTTP requests
- Payment SMS → SMS parser: parsed by
- Message processing → SMS parser: parses message
backend/payments/tasks.py - Message processing → Transactions and products: creates transactions
backend/payments/tasks.py - Message processing → Async task queue: runs asynchronously
backend/payments/tasks.py - REST API → Manual payments: supports entry
- Manual payments → Transactions and products: records payment
- Order fulfillment → Transactions and products: updates stock
backend/payments/services/fulfillment_service.py - Order fulfillment → Merchandise services: applies promotions
backend/payments/services/fulfillment_service.py - Reconciliation → Transactions and products: queries transactions
backend/payments/services/reconciliation_v2_service.py - Analytics services → Transactions and products: aggregates sales
backend/payments/services/bi_core_service.py - BI assistant → Analytics services: requests insights
backend/payments/bi_telegram_bot.py - Message processing → WebSocket updates: broadcasts updates
backend/payments/tasks.py - WebSocket updates → Transactions and products: serializes transactions
backend/payments/consumers.py - WebSocket client → WebSocket updates: receives updates