Active Development · Sprint 3

Cơm Tấm Má Tư

Hệ thống Quản lý Vận hành Nhà hàng — Restaurant Management System

Next.js 16.2 React 19.2 TypeScript 6.0 Tailwind 4.2 Supabase Turborepo 2.9
19
Database Tables
6
RPC Functions
8
Staff Roles
13
ACL-Protected Modules

Tiến độ phát triển

8 modules · 3 shipped · 1 in queue · 4 planned

M0
Admin Shell · Khung quản trị
Shipped
Hoàn thành 100%
M1
Thực đơn · Menu
Shipped
Hoàn thành 100%
M2
POS · Point of Sale
Shipped
Hoàn thành 100%
M3
KDS · Kitchen Display
Done
Schema + UI + Realtime 100%
M4
Thanh toán · Payment
Done
Schema + Actions + Webhook (MVP) 70%
M5
Kho hàng · Stock
Done
Schema + CRUD + Adjustments (MVP) 60%
M6
Kế toán · Finance
Done
HĐĐT + Revenue Dashboard (MVP) 50%
M7
Nhân sự · HR / Payroll
Done
Employees + Shifts + Attendance (MVP) 50%

Sơ đồ phụ thuộc

Each module builds on the foundation of the previous

M0 Admin ✅ Shipped M1 Thực đơn ✅ Shipped M2 POS ✅ Shipped M3 KDS 🔜 Next M4 Payment ⏳ Planned M5 Kho hàng ⏳ Planned M6 Kế toán ⏳ Planned M7 Nhân sự ⏳ Planned Shipped Next Planned Direct dep Sequential

System Architecture

Request flow from browser to database

Browser React 19 / RSC
proxy.ts Auth · ACL · Rate limit
App Router Next.js 16 · Server Actions
Supabase PostgREST · Auth · RLS
Single-tenant · Multi-branch L0 Tenant → L1 Branch JWT claims: tenant_id · branch_id · role RLS on every table NUMERIC(15,2) money BIGINT identity PK

Đã làm & Sắp đến

Breakdown of shipped features and upcoming work

Đã hoàn thành (M0 – M2)
M0 · Admin Shell
  • Admin layout & sidebar navigation
  • Branch management (multi-branch)
  • Staff CRUD with role assignment
  • System settings & ACL module
M1 · Thực đơn (Menu)
  • Categories & menu items
  • Variants: size / portion / combo
  • Modifiers (add-ons, toppings)
  • Side dishes management
M2 · POS Terminal
  • POS terminal with cart & search
  • Table / zone selection
  • Order submit & bill printing
  • Cash register session management

Deferred Items

Known items intentionally deferred to a future sprint

M4
Server-side price validation
Cart total must be re-validated at checkout server action — deferred to Payment module where refund/reconciliation logic lives
Future
Area manager branch scoping
Role allowing a manager to oversee multiple but not all branches — requires additional JWT claims design; deferred to post-v1.0