How wiwer/lanchonete-app works
A Next.js point-of-sale and management system for a snack bar, covering dine-in service, delivery, menu administration, payments, sales analytics, and unified order history. The main workflow runs from staff opening a table or creating a delivery order, through item and status management, to payment or delivery completion; admins maintain the menu and review business results. UI-to-API links are included where excerpts show requests; the README documents broader capabilities. Database wiring and several route details were not sampled, so those links rely on documented behavior.
Main entry points: apiClient.ts API Client · cardapio/page.tsx Product Management · historico/page.tsx Unified History · garcom/page.tsx Table Overview
Components 26
Staff Workflows
- Table Overview
app/garcom/page.tsx - Open Table Order
app/garcom/pedido/novo/page.tsx - Order Management
app/pedido/[orderId]/page.tsx - Order Item Actions
app/pedido/[orderId]/components/AddItemButton.tsx - Payment Queue
app/caixa/page.tsx - Payment Actions
app/caixa/components/ConfirmarPagamentoButton.tsx
Delivery Operations
- Delivery Orders
app/delivery/page.tsx - Create Delivery
app/delivery/novo/page.tsx - Delivery Details
app/delivery/[id]/page.tsx - Edit Delivery
app/delivery/[id]/editar/page.tsx
Administration
- Public Menu
app/page.tsx - Product Management
app/admin/cardapio/page.tsx - Category Management
app/admin/categorias/page.tsx - Sales Dashboard
app/admin/dashboard/page.tsx - Unified History
app/historico/page.tsx
API and Shared
- API Client
app/lib/apiClient.ts - Catalog API
app/api/products/route.ts - Category API
app/api/categories/route.ts - Dine-in Order API
app/api/orders/route.ts - Delivery API
app/api/delivery/route.ts - History API
app/api/history/route.ts - Dashboard API
app/api/dashboard/route.ts - Tables API
app/api/tables/route.ts
Other components
- Waitstaff
- Administrator
- SQLite Database
Connections 32
- Waitstaff → Table Overview: uses
README.md - Table Overview → Open Table Order: opens
app/garcom/page.tsx - Open Table Order → Dine-in Order API: creates order
- Table Overview → Order Management: views order
app/garcom/page.tsx - Order Management → Order Item Actions: renders actions
app/pedido/[orderId]/page.tsx - Order Management → API Client: uses
- Order Item Actions → API Client: requests changes
app/pedido/[orderId]/components/AddItemButton.tsx - Payment Queue → Payment Actions: renders actions
app/caixa/page.tsx - Payment Actions → API Client: requests payment
app/caixa/components/ConfirmarPagamentoButton.tsx - Waitstaff → Delivery Orders: manages delivery
README.md - Delivery Orders → Create Delivery: starts order
app/delivery/page.tsx - Create Delivery → API Client: submits order
app/delivery/novo/page.tsx - Delivery Orders → Delivery Details: opens order
- Delivery Details → Edit Delivery: edits pending
README.md - Administrator → Product Management: maintains menu
README.md - Administrator → Category Management: organizes categories
README.md - Administrator → Sales Dashboard: reviews sales
README.md - Administrator → Unified History: reviews orders
README.md - Product Management → API Client: requests catalog
app/admin/cardapio/page.tsx - Category Management → API Client: requests categories
app/admin/categorias/page.tsx - Unified History → API Client: requests history
app/historico/page.tsx - Unified History → History API: fetches history
app/historico/page.tsx - Unified History → Tables API: fetches tables
app/historico/page.tsx - Product Management → Catalog API: fetches products
app/admin/cardapio/page.tsx - Product Management → Category API: fetches categories
app/admin/cardapio/page.tsx - Category Management → Catalog API: fetches products
app/admin/categorias/page.tsx - Catalog API → SQLite Database: reads and writes
- Category API → SQLite Database: reads and writes
- Dine-in Order API → SQLite Database: reads and writes
- Delivery API → SQLite Database: reads and writes
- History API → SQLite Database: reads data
- Dashboard API → SQLite Database: aggregates data