How rodrigotjf1-boop/regem works
Regem is a modular, multi-tenant restaurant operations and management platform. Store staff use operational screens for day-to-day work, while executives use cloud reporting and administration; the cloud API and each unit’s local node divide configuration and operational ownership. The graph preserves the documented offline-first sync model and major product areas visible in the repository. Edges are limited to relationships stated in the README or shown in excerpts; unsampled modules are represented by their existing directories, without inferred call chains.
Main entry points: main.ts Versioned API · atendimento.controller.ts Case endpoints · auth-user.ts Request user context · schema.ts PostgreSQL
Components 28
User surfaces
- Web app
frontend/src/app/page.tsx - Atendimento app
app-atendimento/android/app/src/main/kotlin/com/dmsregem/regem_atendimento/MainActivity.kt - Entregador app
app-entregador/android/app/src/main/kotlin/com/dmsregem/regem_entregador/MainActivity.kt
Platform foundation
- Identity and RBAC
backend/src/auth/auth.service.ts - Request user context
backend/src/auth/auth-user.ts - JWT validation
backend/src/auth/jwt-auth.guard.ts - Role authorization
backend/src/auth/roles.guard.ts - Permission authorization
backend/src/auth/permissoes.guard.ts - PostgreSQL
backend/src/db/schema.ts - Audit trail
backend/src/modules/auditoria/auditoria.service.ts
Store operations
- Menu and ordering
backend/src/modules/cardapio/cardapio.controller.ts - Delivery operations
backend/src/modules/delivery/delivery.controller.ts - Customer service cases
backend/src/modules/atendimento/atendimento.controller.ts - Kitchen production
backend/src/modules/producao-pedido/producao-pedido.controller.ts - Inventory and waste
backend/src/modules/estoque/estoque.service.ts - Schedules and checklists
backend/src/modules/escala/escala.service.ts - Finance and fiscal
backend/src/modules/financeiro/financeiro.service.ts - Case endpoints
backend/src/modules/atendimento/atendimento.controller.ts - Case workflows
backend/src/modules/atendimento/atendimento.service.ts - Customer arrival
backend/src/modules/chegada/chegada.service.ts - Order production
backend/src/modules/producao-pedido/producao-pedido.service.ts
Cloud and sync
- Versioned API
backend/src/main.ts - Unit local node
backend/edge/sync-daemon.mjs - Offline synchronization
backend/edge/sync-daemon.mjs - Executive dashboard
backend/src/modules/dashboard/dashboard.service.ts - External API integrations
backend/src/modules/integracao-api/integracao-api.controller.ts
Other components
- Store staff
- President / C&O
Connections 17
- Store staff → Web app: use operations
README.md - President / C&O → Executive dashboard: view analytics
README.md - Store staff → Atendimento app: use support
README.md - Store staff → Entregador app: use delivery
- Versioned API → PostgreSQL: uses PostgreSQL
README.md - Unit local node → PostgreSQL: stores unit data
README.md - Unit local node → Offline synchronization: runs sync
backend/edge/sync-daemon.mjs - Offline synchronization → Versioned API: syncs with cloud
README.md - Versioned API → Executive dashboard: serves reporting
README.md - Versioned API → External API integrations: hosts cloud API
README.md - Identity and RBAC → PostgreSQL: reads and writes
backend/src/auth/auth.service.ts - JWT validation → Request user context: populates request
backend/src/auth/jwt-auth.guard.ts - Role authorization → Request user context: checks role
backend/src/auth/roles.guard.ts - Permission authorization → Request user context: checks permissions
backend/src/auth/permissoes.guard.ts - Case endpoints → Case workflows: resolves cases
backend/src/modules/atendimento/atendimento.controller.ts - Case endpoints → Customer arrival: queries arrival
backend/src/modules/atendimento/atendimento.controller.ts - Case endpoints → Order production: uses production
backend/src/modules/atendimento/atendimento.controller.ts