How abdur-rouf20/pos-all-in-one works
This is a bilingual, branch-aware POS application. Staff sign in, select a branch, then manage products and stock, create invoices, collect payments, handle returns and expenses, and review dashboards or reports. The React pages call a shared API client; Express routes authenticate and scope requests before controllers apply business operations to MongoDB models. The graph includes the documented customer, receipt, settings, and administration capabilities, though several of those implementations were not sampled; their internal call relationships are therefore not asserted.
Main entry points: models POS records · App.jsx App routing · server.js Express server · routes REST routes
Components 19
POS interface
- App routing
frontend/src/App.jsx - Invoice entry
frontend/src/pages/InvoiceForm.jsx - Sales returns
frontend/src/pages/SalesReturns.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Other POS pages
frontend/src/pages - API client
frontend/src/services/api.js
Backend API
- Express server
backend/src/server.js - Authentication
backend/src/middleware/auth.js - REST routes
backend/src/routes
Sales operations
- Invoice handling
backend/src/controllers/invoiceController.js - Return handling
backend/src/controllers/salesReturnController.js - Inventory handling
backend/src/controllers/inventoryController.js - Dashboard aggregation
backend/src/controllers/dashboardController.js - Report aggregation
backend/src/controllers/reportController.js
POS data
- POS records
backend/src/models - Audit attribution
backend/src/utils/audit.js - Mongo connection
backend/src/config/db.js
Other components
- Owner or staff
- MongoDB
Connections 27
- Owner or staff → App routing: uses
README.md - App routing → Invoice entry: routes to
frontend/src/App.jsx - App routing → Sales returns: routes to
frontend/src/App.jsx - App routing → Dashboard: routes to
frontend/src/App.jsx - App routing → Other POS pages: routes to
frontend/src/App.jsx - Invoice entry → API client: calls
frontend/src/pages/InvoiceForm.jsx - Sales returns → API client: calls
frontend/src/pages/SalesReturns.jsx - Dashboard → API client: calls
frontend/src/pages/Dashboard.jsx - Other POS pages → API client: calls
frontend/src/pages/InvoiceForm.jsx - API client → Express server: sends requests
README.md - Express server → REST routes: mounts
backend/src/server.js - Express server → Authentication: protects summary
backend/src/server.js - REST routes → Authentication: applies guards
backend/src/routes/inventoryRoutes.js - REST routes → Invoice handling: dispatches
backend/src/routes/invoiceRoutes.js - REST routes → Return handling: dispatches
backend/src/routes/salesReturnRoutes.js - REST routes → Inventory handling: dispatches
backend/src/routes/inventoryRoutes.js - Express server → Dashboard aggregation: serves summary
backend/src/server.js - Invoice handling → POS records: reads and writes
backend/src/controllers/invoiceController.js - Return handling → POS records: reads and writes
backend/src/controllers/salesReturnController.js - Inventory handling → POS records: reads and writes
backend/src/controllers/inventoryController.js - Dashboard aggregation → POS records: aggregates
backend/src/controllers/dashboardController.js - Report aggregation → POS records: aggregates
backend/src/controllers/reportController.js - Inventory handling → Audit attribution: records actions
backend/src/controllers/inventoryController.js - Return handling → Audit attribution: records actions
backend/src/controllers/salesReturnController.js - Audit attribution → POS records: creates logs
backend/src/utils/audit.js - Express server → Mongo connection: connects
backend/src/server.js - Mongo connection → MongoDB: connects to
README.md