How gabrielhenriqcs/ondemanda works
This is a restaurant table, order, and kitchen-management application with a React frontend and an Express/Prisma backend. The visible user journey covers login and routed views for table commands, kitchen work, and administration; backend services model opening and closing tabs and creating and updating orders. The sampled sources confirm authentication and selected database operations, but do not show the command/order controllers or frontend page-to-service calls, so those links are left out. The backend routes shown expose login and user routes only.
Main entry points: routes.tsx Page routing · prisma.ts Prisma client · api.ts HTTP client · routes.ts API routes
Components 25
Frontend
- Page routing
frontend/src/pages/routes.tsx - Login screen
frontend/src/pages/Login.tsx - Table commands
frontend/src/pages/Comanda.tsx - Kitchen view
frontend/src/pages/Cozinha.tsx - Admin dashboard
frontend/src/pages/Admin/Dashboard.tsx - App layout
frontend/src/Layout.tsx - HTTP client
frontend/src/services/api.ts - Auth client
frontend/src/services/authService.ts - Command client
frontend/src/services/comandaService.ts - Order client
frontend/src/services/pedidoService.ts - Table client
frontend/src/services/mesaService.ts - Item client
frontend/src/services/ItemService.ts
Backend
- Express app
backend/src/app.ts - API routes
backend/src/routes/routes.ts - Auth controller
backend/src/controllers/AuthController.ts - Users controller
backend/src/controllers/UsuariosController.ts
Restaurant operations
- Authentication
backend/src/services/AuthService.ts - User management
backend/src/services/UsuarioService.ts - Tab lifecycle
backend/src/services/ComandaService.ts - Order handling
backend/src/services/PedidoService.ts - Table management
backend/src/services/MesaService.ts - Menu items
backend/src/services/ItemService.ts
Persistence
- Prisma client
backend/src/helpers/prisma.ts - Application database
Other components
- Staff user
Connections 21
- Staff user → Page routing: opens views
- Page routing → Login screen: routes to
- Page routing → Table commands: routes to
- Page routing → Kitchen view: routes to
- Page routing → Admin dashboard: routes to
- Page routing → App layout: wraps views
- Auth client → HTTP client: sends requests
- Command client → HTTP client: sends requests
- Order client → HTTP client: sends requests
- Table client → HTTP client: sends requests
- Item client → HTTP client: sends requests
- Express app → API routes: mounts routes
- API routes → Auth controller: dispatches login
- API routes → Users controller: dispatches users
- Auth controller → Authentication: calls login
- Users controller → User management: lists users
- Authentication → Prisma client: reads user
- User management → Prisma client: accesses data
- Tab lifecycle → Prisma client: reads and updates
- Order handling → Prisma client: reads and writes
- Prisma client → Application database: queries