How 24skater/stewardpos works
StewardPOS is a self-hosted point-of-sale system for small shops. A cashier uses the register UI to submit item intent; the backend recalculates prices and totals, obtains payment approval, and persists an approved order before returning a receipt. The map also preserves inventory, returns, till/register management, services and quotes, reporting, and administration. Connections follow the README’s documented architecture and money flow or visible frontend wiring; unsampled route and service internals are represented by their existing directories, without guessing their call graph.
Main entry points: routes Commerce API routes · orders.ts Order processing · app.ts Express application · index.ts Storage selection
Components 28
Register UI
- Register screens
src/pages/POS.tsx - Services POS
src/pages/ServicesPos.tsx - Web app routing
src/App.tsx - Typed API SDK
src/lib/api/index.ts - API client
src/lib/api-client.ts - Session and permissions
src/lib/auth.ts
API and access
- Express application
backend/src/app.ts - Commerce API routes
backend/src/api/routes - Authentication routes
backend/src/api/routes/auth.ts
Commerce operations
- Order processing
backend/src/api/routes/orders.ts - Server pricing
backend/src/services/pricing.ts - Catalog and inventory
backend/src/api/routes/products.ts - Terminal gateway
backend/src/services/terminalGateway.ts - Returns and refunds
backend/src/api/routes/returns.ts - Registers and shifts
backend/src/api/routes/registers.ts - Services and quotes
backend/src/api/routes/services.ts
Adapters and state
- Payment terminals
backend/src/terminal/TerminalAdapterFactory.ts - Database service
backend/src/services/database.ts - Postgres adapter
backend/src/adapters/db/PostgresAdapter.ts - SQLite adapter
backend/src/adapters/db/SQLiteAdapter.ts - Storage selection
backend/src/storage/index.ts - Storage port
backend/src/storage/StoragePort.ts - Local storage
backend/src/storage/LocalStorageAdapter.ts - S3 storage
backend/src/storage/S3StorageAdapter.ts
Management
- Admin screens
src/pages/admin - Reports and exports
backend/src/services/reports.ts
Other components
- Cashier
- Payment terminal
Connections 29
- Cashier → Register screens: enters sale
README.md - Web app routing → Register screens: routes to
src/App.tsx - Web app routing → Services POS: routes to
src/App.tsx - Web app routing → Admin screens: routes to
src/App.tsx - Register screens → Typed API SDK: requests data
- Services POS → Typed API SDK: calls
src/pages/ServicesPos.tsx - Admin screens → Typed API SDK: calls
src/pages/admin/AdminServices.tsx - Typed API SDK → API client: uses
src/lib/api/index.ts - Session and permissions → API client: requests session
src/lib/auth.ts - API client → Express application: HTTP requests
README.md - Express application → Commerce API routes: mounts routes
backend/src/app.ts - Express application → Authentication routes: mounts route
backend/src/app.ts - Commerce API routes → Order processing: includes
- Order processing → Server pricing: re-prices
README.md - Order processing → Catalog and inventory: reads prices
README.md - Order processing → Terminal gateway: requests charge
README.md - Terminal gateway → Payment terminals: dispatches
- Payment terminals → Payment terminal: charges
README.md - Order processing → Database service: writes approved order
README.md - Database service → Postgres adapter: selects adapter
backend/src/services/database.ts - Database service → SQLite adapter: selects adapter
backend/src/services/database.ts - Commerce API routes → Returns and refunds: includes
- Commerce API routes → Registers and shifts: includes
- Commerce API routes → Services and quotes: includes
- Admin screens → Reports and exports: views reports
- Express application → Storage selection: serves uploads
backend/src/app.ts - Storage selection → Storage port: implements
backend/src/storage/index.ts - Storage selection → Local storage: selects adapter
backend/src/storage/index.ts - Storage selection → S3 storage: selects adapter
backend/src/storage/index.ts