How nakama-nova/nakama-desktop works
NakamaDesk is a PyQt6 desktop ERP client. The main workflow is user sign-in, followed by retail billing: the POS looks up or creates a customer, loads inventory, submits a sale, then retrieves and opens its invoice. Other screens expose stock management, customer CRM, sales history, reporting/dashboard, attendance, and workforce operations. Domain services mediate UI-to-API work; an optional local outbox supports push/pull synchronization. Some screen and service wiring is represented from the README and tree because those sources were not sampled.
Main entry points: main_window.py Main window · api_client.py API client · sales_screen.py Sales POS · sync_service.py Sync orchestrator
Components 24
Application and UI
- App entry
main.py - Login window
ui/login_window.py - Main window
ui/main_window.py - Sales POS
ui/sales_screen.py - Inventory screen
ui/inventory_window.py - Customer CRM
ui/customers_screen.py - Sales history
ui/sales_history_screen.py - Dashboard
ui/dashboard_window.py - Reports
ui/reports_screen.py - Attendance
ui/attendance_screen.py
Business services
- Authentication
services/auth_service.py - Sales operations
services/sales_service.py - Customer operations
services/customer_service.py - Inventory operations
services/inventory_service.py - Reporting
services/report_service.py - Workforce operations
services/workforce_service.py
Network and session
- API client
services/api_client.py - Session state
services/session.py - Event bus
services/event_bus.py
Local synchronization
- Sync orchestrator
services/sync_service.py - Outbox repository
database/outbox_repository.py - Local database
database/local_db.py
Other components
- Operator
- FurniBiz backend
Connections 36
- Operator → App entry: starts
- App entry → Login window: opens
- Operator → Login window: signs in
- Login window → Authentication: authenticates
- Authentication → API client: requests login
- Authentication → Session state: stores token
- Login window → Main window: opens workspace
- Main window → Sales POS: shows
- Main window → Inventory screen: shows
- Main window → Customer CRM: shows
- Main window → Sales history: shows
- Main window → Dashboard: shows
- Main window → Reports: shows
- Main window → Attendance: shows
- Sales POS → Inventory operations: loads items
- Sales POS → Customer operations: looks up or creates
- Sales POS → Sales operations: submits sale
- Sales operations → API client: requests sales and invoices
- Sales operations → FurniBiz backend: downloads invoice
- Inventory operations → API client: manages stock
- Customer CRM → Customer operations: manages customers
- Customer operations → API client: requests customer data
- Sales history → Sales operations: loads history
- Dashboard → Reporting: loads metrics
- Reports → Reporting: loads reports
- Reporting → API client: requests reports
- Attendance → Workforce operations: records attendance
- Workforce operations → API client: requests workforce data
- API client → FurniBiz backend: sends HTTP requests
- Sales POS → Event bus: dispatches sale event
- Event bus → Dashboard: refreshes metrics
- Sync orchestrator → Outbox repository: reads and updates queue
- Outbox repository → Local database: reads and writes
- Sync orchestrator → API client: pushes and pulls
- Sync orchestrator → Session state: reads token
- Sync orchestrator → Local database: uses database