How 0yk0/one_man_shop works
One Man Shop is an offline-first point-of-sale application for small shops, with desktop and Android frontends sharing a Go backend. The principal workflow is shop setup, product and customer management, checkout with UPI or cash, and subsequent receipt printing and sales reporting. Settings, backups, and a customer-facing display provide supporting capabilities. The README documents the main backend/data and display relationships; source excerpts show frontend routing and selected binding calls. Several backend handlers and platform-specific integrations were not sampled, so their internal links are omitted or identified as documented.
Main entry points: App.tsx App routing · bindings.ts Wails bindings · POSScreen.tsx POS checkout · handlers POS handlers
Components 24
POS Client
- App routing
frontend/src/App.tsx - Shop setup
frontend/src/components/SetupWizard.tsx - POS checkout
frontend/src/pages/POSScreen.tsx - Product catalog
frontend/src/pages/ProductsPage.tsx - Customer records
frontend/src/pages/CustomersPage.tsx - Customer history
frontend/src/pages/CustomerDetailPage.tsx - Receipts and export
frontend/src/pages/ReceiptsPage.tsx - Sales reports
frontend/src/pages/ReportsPage.tsx - Shop settings
frontend/src/pages/SettingsPage.tsx - Wails bindings
frontend/src/bindings.ts - Settings state
frontend/src/hooks/useSettings.ts - Print helper
frontend/src/lib/print.ts - Customer display
frontend/src/components/CustomerDisplay/CustomerDisplay.tsx
Go Backend
- App service
app.go - POS handlers
backend/handlers - Backup service
backend/handlers/backup.go - Display manager
backend/display/state.go - Display WebSocket
backend/display/ws.go
Local Data
- PocketBase data
backend/db/pocketbase.go - Domain models
backend/models/models.go
Other components
- Shop operator
- Local filesystem
- UPI payment apps
- Thermal printer
Connections 31
- Shop operator → App routing: uses POS
- App routing → Shop setup: routes setup
frontend/src/App.tsx - App routing → POS checkout: routes checkout
frontend/src/App.tsx - App routing → Product catalog: routes catalog
frontend/src/App.tsx - App routing → Customer records: routes customers
frontend/src/App.tsx - App routing → Customer history: routes detail
frontend/src/App.tsx - App routing → Receipts and export: routes receipts
frontend/src/App.tsx - App routing → Sales reports: routes reports
frontend/src/App.tsx - App routing → Shop settings: routes settings
frontend/src/App.tsx - Shop setup → Wails bindings: calls setup methods
frontend/src/components/SetupWizard.tsx - POS checkout → Wails bindings: calls POS methods
frontend/src/pages/POSScreen.tsx - Product catalog → Wails bindings: calls catalog methods
frontend/src/pages/ProductsPage.tsx - Customer records → Wails bindings: calls customer methods
frontend/src/pages/CustomersPage.tsx - Customer history → Wails bindings: calls customer methods
frontend/src/pages/CustomerDetailPage.tsx - Receipts and export → Wails bindings: calls receipt methods
frontend/src/pages/ReceiptsPage.tsx - Sales reports → Wails bindings: renders report tabs
frontend/src/pages/ReportsPage.tsx - Shop settings → Settings state: uses settings state
frontend/src/pages/SettingsPage.tsx - Settings state → Wails bindings: calls settings methods
frontend/src/hooks/useSettings.ts - Wails bindings → App service: invokes Go methods
- App service → POS handlers: dispatches operations
- POS handlers → PocketBase data: reads and writes
- POS handlers → Backup service: exports backups
- Backup service → Local filesystem: writes backups
- POS handlers → Domain models: uses domain data
- POS checkout → UPI payment apps: presents payment QR
- Receipts and export → Print helper: prints receipts
frontend/src/pages/ReceiptsPage.tsx - Print helper → Wails bindings: calls print methods
frontend/src/lib/print.ts - Print helper → Thermal printer: sends print data
- POS checkout → Display manager: sends display updates
- Display manager → Display WebSocket: pushes display state
- Display WebSocket → Customer display: serves WebSocket state