How kholif18/ravaa-pos-v2 works
Ravaa POS is a browser-based retail point-of-sale system backed by a central Hono/SQLite API, with an optional USB thermal-printer bridge. The main workflow is cashier login, POS checkout, server-side recording, and optional receipt printing; sales can also be reviewed and reported. Separate areas cover product and stock masters, purchases, returns, debts, audit, and system settings. The README documents these capabilities, but most page implementations and API routes were not sampled, so their internal links are shown only where supported.
Main entry points: api.ts API client and outbox · auth.ts Login and session · pos.ts POS checkout · index.ts Hono API
Components 20
Cashier frontend
- Login and session
apps/web/src/ui/auth.ts - SPA navigation
apps/web/src/main.ts - API client and outbox
apps/web/src/api.ts - Offline app shell
apps/web/public/sw.js
Sales operations
- POS checkout
apps/web/src/pages/pos.ts - Transaction history
apps/web/src/pages/history.ts - Reports
apps/web/src/pages/reports.ts - A4 invoices
apps/web/src/invoice.ts
Store operations
- Product and customer masters
apps/web/src/pages/products.ts - Stock management
apps/web/src/pages/stock.ts - Purchases and suppliers
apps/web/src/pages/purchases.ts - Debt ledger
apps/web/src/pages/debts.ts - Audit trail
apps/web/src/pages/audit.ts - Settings and backups
apps/web/src/pages/settings.ts
Server and persistence
- Hono API
apps/api/src/index.ts - SQLite database
apps/api/src/db.ts
Receipt printing
- ESC/POS formatter
apps/web/src/escpos.ts - Print agent
apps/print-agent/server.js - USB receipt printer
Other components
- Cashier
Connections 20
- Cashier → Login and session: signs in
apps/web/src/ui/auth.ts - Login and session → Hono API: authenticates
apps/web/src/ui/auth.ts - Login and session → SPA navigation: sets session
apps/web/src/main.ts - SPA navigation → POS checkout: opens checkout
apps/web/src/main.ts - POS checkout → API client and outbox: requests sales
apps/web/src/pages/pos.ts - Transaction history → API client and outbox: loads transactions
apps/web/src/pages/history.ts - Reports → API client and outbox: loads reports
apps/web/src/pages/reports.ts - Product and customer masters → API client and outbox: updates masters
apps/web/src/pages/products.ts - Stock management → API client and outbox: loads stock
apps/web/src/pages/stock.ts - Purchases and suppliers → API client and outbox: records purchases
apps/web/src/pages/purchases.ts - Debt ledger → API client and outbox: manages ledger
- Audit trail → API client and outbox: loads audit
- Settings and backups → API client and outbox: manages backups
apps/web/src/pages/settings.ts - API client and outbox → Hono API: sends requests
apps/web/src/api.ts - Hono API → SQLite database: reads and writes
apps/api/src/index.ts - POS checkout → ESC/POS formatter: formats receipts
apps/web/src/pages/pos.ts - Transaction history → A4 invoices: prints invoice
apps/web/src/pages/history.ts - ESC/POS formatter → Print agent: sends print bytes
README.md - Print agent → USB receipt printer: prints receipt
apps/print-agent/server.js - Offline app shell → Cashier: serves offline shell
README.md