How ryzera/ryzera-pos works
Ryzera POS is a multi-branch retail point-of-sale platform: staff use the web app for checkout and back-office operations, while branch terminals can work offline and later synchronize. The NestJS API serves the web client, handles identity and branch-scoped operations, and supports inventory, sales, and reporting; Prisma connects it to PostgreSQL. The README documents the broad web/API/database and offline-sync architecture. Source excerpts confirm several controller-to-service calls, but many feature internals and frontend API calls were not sampled, so those links are omitted or shown only where documented.
Main entry points: prisma.service.ts PostgreSQL data · page.tsx POS and dashboard · inventory.controller.ts Stock operations · sales-report.controller.ts Sales reporting
Components 23
Web operations
- POS and dashboard
apps/pos-web-app/src/app/(dashboard)/billing/page.tsx - Inventory UI
apps/pos-web-app/src/app/(dashboard)/inventory/page.tsx - Reports UI
apps/pos-web-app/src/views/reports/ReportsHubView.tsx - Sync console
apps/pos-web-app/src/app/sync/dashboard/page.tsx
Identity and scope
- Authentication
apps/pos-api-service/src/auth/auth.service.ts - JWT guard
apps/pos-api-service/src/auth/guards/jwt-auth.guard.ts - Role authorization
apps/pos-api-service/src/auth/guards/roles.guard.ts - Branch identity
apps/pos-api-service/src/auth/decorators/branch-scope.decorator.ts - User context
apps/pos-api-service/src/auth/decorators/current-user.decorator.ts - Role metadata
apps/pos-api-service/src/auth/decorators/roles.decorator.ts
Retail workflows
- Checkout and sales
apps/pos-api-service/src/billing/billing.controller.ts - Stock operations
apps/pos-api-service/src/inventory/inventory.controller.ts - Purchasing and transfers
apps/pos-api-service/src/purchase-order/purchase-order.controller.ts
Reporting and insights
- Sales reporting
apps/pos-api-service/src/sales-report/sales-report.controller.ts - Profit and loss
apps/pos-api-service/src/profit-loss/profit-loss.controller.ts - Product performance
apps/pos-api-service/src/product-performance/product-performance.controller.ts - Daily summary
apps/pos-api-service/src/daily-summary/daily-summary.controller.ts - KPI targets
apps/pos-api-service/src/kpi-targets/kpi-targets.controller.ts
Offline synchronization
- Sync engine
apps/pos-api-service/src/modules/sync/sync.controller.ts - Sync backup
apps/pos-api-service/src/modules/sync/backup.service.ts
Other components
- Retail staff
- PostgreSQL data
packages/pos-database/src/prisma.service.ts - Shared validation
packages/pos-schema/src/index.ts
Connections 28
- Retail staff → POS and dashboard: uses
- Retail staff → Inventory UI: uses
- Retail staff → Reports UI: uses
- Retail staff → Sync console: administers
- POS and dashboard → Checkout and sales: REST and sockets
- Inventory UI → Stock operations: REST
- Reports UI → Sales reporting: REST
- Sync console → Sync engine: sync interface
- Authentication → PostgreSQL data: reads user data
apps/pos-api-service/src/auth/auth.service.ts - Authentication → Shared validation: uses shared schemas
apps/pos-api-service/src/auth/auth.service.ts - JWT guard → Role authorization: precedes authorization
- Role authorization → Role metadata: reads roles
apps/pos-api-service/src/auth/guards/roles.guard.ts - Stock operations → Branch identity: applies branch scope
apps/pos-api-service/src/inventory/inventory.controller.ts - Product performance → Branch identity: resolves branch
apps/pos-api-service/src/product-performance/product-performance.controller.ts - Profit and loss → User context: resolves user
apps/pos-api-service/src/profit-loss/profit-loss.controller.ts - Sales reporting → Shared validation: validates queries
apps/pos-api-service/src/sales-report/sales-report.controller.ts - Daily summary → Shared validation: validates queries
apps/pos-api-service/src/daily-summary/daily-summary.controller.ts - Sync engine → Sync backup: uses backup service
apps/pos-api-service/src/modules/sync/sync.controller.ts - Checkout and sales → PostgreSQL data: persists retail data
- Stock operations → PostgreSQL data: reads and writes stock
- Purchasing and transfers → PostgreSQL data: persists orders
- Sales reporting → PostgreSQL data: queries sales
- Profit and loss → PostgreSQL data: queries financial data
- Product performance → PostgreSQL data: queries sales data
- Daily summary → PostgreSQL data: queries summaries
- KPI targets → PostgreSQL data: stores targets
- Sync engine → PostgreSQL data: reconciles records
- POS and dashboard → PostgreSQL data: offline cache