How sharlr/bms works
BMS is a multi-tenant restaurant management and POS system. Staff or customers use tenant-specific web workflows; requests pass through tenant resolution and authentication before reaching restaurant operations such as sales, kitchen, inventory, billing and reporting. A separate platform workflow provisions tenant databases, while the web app also provides kiosk, customer ordering, KDS and back-office screens. The README documents product capabilities beyond the sampled implementation; those branches are represented without inferring unsampled call chains. Edges cite the README or source-index/read evidence where available.
Main entry points: server.ts HTTP API · pos.ts POS and billing · api.ts API client · main.tsx Web app entry
Components 23
Web workflows
- Web app entry
frontend/src/main.tsx - Staff session
frontend/src/session.tsx - POS and terminals
frontend/src/pages/Pos.tsx - Customer ordering
frontend/src/pages/Customer.tsx - Back office
frontend/src/pages/admin/AdminApp.tsx - API client
frontend/src/api.ts
API and access
- HTTP API
backend/src/server.ts - Tenant context
backend/src/plugins/context.ts - Authentication
backend/src/modules/auth.ts
Restaurant operations
- POS and billing
backend/src/modules/pos.ts - Kitchen and KOT
backend/src/modules/kitchen.ts - Inventory and stock
backend/src/modules/inventory.ts - Menu and resources
backend/src/modules - Reservations
backend/src/modules/reservations.ts - Finance and reports
backend/src/modules/reports.ts
Tenant platform
- Platform operations
backend/src/modules/platform.ts - Tenant provisioning
backend/src/master/provision.ts
Persistence and integrations
- Tenant database pools
backend/src/master/pools.ts - Ticket service
backend/src/services/tickets.ts - LAN print agent
print-agent/agent.mjs
Other components
- Restaurant staff
- Customers
- Platform admin
Connections 30
- Restaurant staff → Web app entry: uses
- Customers → Customer ordering: orders through
- Platform admin → Platform operations: manages tenants
- Web app entry → POS and terminals: routes to
frontend/src/main.tsx - Web app entry → Customer ordering: routes to
frontend/src/main.tsx - Web app entry → Back office: routes to
frontend/src/main.tsx - Restaurant staff → Staff session: signs in
- Staff session → API client: requests session
frontend/src/session.tsx - POS and terminals → API client: sends operations
frontend/src/pages/Pos.tsx - Customer ordering → API client: sends orders
frontend/src/pages/Customer.tsx - Back office → API client: requests admin data
frontend/src/pages/admin/AdminApp.tsx - API client → HTTP API: HTTP requests
- HTTP API → Tenant context: runs tenant hook
backend/src/server.ts - HTTP API → Authentication: registers routes
backend/src/server.ts - HTTP API → POS and billing: registers routes
backend/src/server.ts - HTTP API → Kitchen and KOT: registers routes
backend/src/server.ts - HTTP API → Inventory and stock: registers routes
backend/src/server.ts - HTTP API → Menu and resources: registers routes
backend/src/server.ts - HTTP API → Reservations: registers routes
backend/src/server.ts - HTTP API → Finance and reports: registers routes
backend/src/server.ts - HTTP API → Platform operations: registers routes
backend/src/server.ts - Tenant context → Tenant database pools: resolves tenant
backend/src/plugins/context.ts - Authentication → Tenant context: uses access context
backend/src/modules/auth.ts - POS and billing → Ticket service: uses tickets
backend/src/modules/pos.ts - Platform operations → Tenant provisioning: provisions tenants
- Tenant provisioning → Tenant database pools: configures tenant pools
backend/src/master/provision.ts - POS and billing → Kitchen and KOT: routes KOT
- POS and billing → Inventory and stock: records stock impact
- POS and billing → LAN print agent: prints receipts
- Kitchen and KOT → LAN print agent: prints kitchen tickets