How ivanpavlovic-web/modern-pos-suite works
POS Sistem is a browser-based point-of-sale application backed by a Django REST API. Cashiers authenticate, browse or scan products, manage open sales, and check out; the frontend then requests a receipt PDF. Managers and admins have separate workflows for catalog administration, refunds, reports, audit review, and receipt settings. The tree and README establish these capabilities, while sampled code confirms POS API calls, JWT authentication, inventory WebSockets, and Redis channel configuration. Backend endpoint-to-model details were not sampled, so those links are shown only at the documented API and persistence level.
Main entry points: App.jsx Routes and Roles · api.js HTTP API Client · views.py REST API · POS.jsx Cashier Register
Components 21
Cashier Interface
- Routes and Roles
frontend/src/App.jsx - Login Session
frontend/src/auth.jsx - Cashier Register
frontend/src/pages/POS.jsx - HTTP API Client
frontend/src/api.js - WebSocket Client
frontend/src/hooks/useWebSocket.js
Store Operations
- Catalog Admin
frontend/src/pages/Admin.jsx - Refunds
frontend/src/pages/Refunds.jsx - Reports
frontend/src/pages/Reports.jsx - Daily Report
frontend/src/pages/DailyReportPage.jsx - Periodic Report
frontend/src/pages/PeriodicReportPage.jsx - Audit Log
frontend/src/pages/AuditLog.jsx - Receipt Settings
frontend/src/pages/ReceiptSettings.jsx
Django Services
- REST API
backend/pos/views.py - Access Rules
backend/pos/permissions.py - POS Domain Models
backend/pos/models.py - Report Generation
backend/pos/reports.py - Receipt PDF
backend/pos/pdf.py - Inventory and Sales Events
backend/pos/consumers.py
Runtime State
- PostgreSQL
backend/config/settings.py - Redis Channels
backend/config/settings.py
Other components
- Cashier or Manager
Connections 29
- Cashier or Manager → Routes and Roles: uses
- Routes and Roles → Login Session: routes login
- Routes and Roles → Cashier Register: routes register
- Routes and Roles → Catalog Admin: routes admin
- Routes and Roles → Refunds: routes refunds
- Routes and Roles → Reports: routes reports
- Routes and Roles → Daily Report: routes daily
- Routes and Roles → Periodic Report: routes periodic
- Routes and Roles → Audit Log: routes audit
- Routes and Roles → Receipt Settings: routes settings
- Login Session → HTTP API Client: requests auth
- Cashier Register → HTTP API Client: requests sales
- Cashier Register → WebSocket Client: subscribes inventory
- Catalog Admin → HTTP API Client: requests catalog
- Refunds → HTTP API Client: requests refunds
- Reports → HTTP API Client: requests reports
- Daily Report → HTTP API Client: requests report
- Periodic Report → HTTP API Client: requests report
- Audit Log → HTTP API Client: requests audit
- Receipt Settings → HTTP API Client: requests settings
- HTTP API Client → REST API: sends HTTP
- REST API → Access Rules: checks access
- REST API → POS Domain Models: reads and writes
- POS Domain Models → PostgreSQL: persists records
- REST API → Report Generation: generates reports
- REST API → Receipt PDF: creates receipt
- WebSocket Client → Inventory and Sales Events: opens socket
- Inventory and Sales Events → Redis Channels: uses channel layer
- REST API → Redis Channels: publishes events