ββββββββββββββββββββββββββββββββββββββββββββββββββ
β π B H U K K A D β
β The full-stack restaurant operating system. β
β POS Β· KOT Β· Tables Β· Kitchen Β· Inventory β
ββββββββββββββββββββββββββββββββββββββββββββββββββ
A production-grade restaurant operating system covering the full service loop β from table assignment to kitchen ticket to inventory deduction β built with real-time WebSockets and role-based access.
β¨ Features Β· πΊ Product Surface Β· π₯ Roles Β· β‘ Quick Start Β· π‘ Architecture Β· π Docs
"Built as part of AI Solutions Challenge 2026. Designed for real restaurant service loops β not a static admin dashboard."
Most restaurant software is fragmented or overpriced:
β POS, KOT, reservations, and inventory are separate tools
β Kitchen staff and waiters operate on different systems
β Table state is managed on paper or whiteboards
β Tablet ordering systems cost βΉ4,000/month per outlet
β SaaS products are built for chains β not single-outlet operators
Bhukkad is a single Next.js app that covers the entire service loop β front of house to back of house β in real time.
| Signal | Details |
|---|---|
| ποΈ What it is | Full-stack restaurant OS covering POS, KOT, table service, kitchen queue, tablet ordering, inventory, reservations, and reports |
| π§ What it demonstrates | Full-stack product execution Β· domain modeling Β· realtime WebSocket workflows Β· auth + RBAC Β· operator-first UI decisions |
| π Differentiator | Built around real restaurant service loops with Socket.IO state sync across POS, kitchen, and tables simultaneously |
| π οΈ Stack | Next.js 15 Β· React 19 Β· TypeScript Β· NextAuth v5 Β· Drizzle ORM Β· SQLite Β· Socket.IO Β· Tailwind CSS |
| π Built for | AI Solutions Challenge 2026 β shipped end-to-end in a rapid build cycle |
- Operational KPIs at a glance: covers, revenue, open tables, pending KOTs
- Live activity feed from all service areas
- Today's reservation preview
Host assigns table β Waiter opens order β Items added
β
βΌ
KOT sent to kitchen (Socket.IO push, <100ms)
β
βΌ
Kitchen marks ready β Waiter notified β Table served
β
βΌ
Cashier settles bill β Table cleared β Available again
- Split billing, modifiers, variants, void items
- Table status: Available / Occupied / Reserved / Cleaning
- Service charge, GST, discount controls
- Live ticket queue ordered by time and priority
- One-tap status updates: Received β Preparing β Ready
- Socket.IO push to POS the moment a dish is ready
- No page refresh needed β ever
- Guests browse the menu on a tablet or scan a QR
- Orders go directly to the kitchen queue
- Modifiers, add-ons, and special requests supported
- Kitchen sees it in <100ms via Socket.IO
- Categories, items, variants, and modifier groups
- Availability toggles (e.g., "86 the dal makhani")
- Image upload per item
- Combo and happy-hour pricing
- Stock levels tracked per ingredient
- Deduction on order confirmation
- Low-stock alerts
- Purchase order creation and supplier management
- Walk-in and advance reservation booking
- Customer profiles with visit history and loyalty tracking
- Table assignment from the reservation screen
- Daily, weekly, and monthly revenue breakdowns
- Item-level sales analysis
- Staff performance metrics
- Export to CSV
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β /dashboard Operational KPIs + live activity feed β
β /pos POS with table grid + order builder β
β /kitchen KOT queue + real-time ticket management β
β /tables Floor plan + table status management β
β /tablet-order Guest-facing tablet/QR ordering interface β
β /menu Categories, items, variants, modifiers β
β /inventory Stock levels, low-stock alerts, purchasing β
β /customers Profiles, loyalty, visit history β
β /reservations Booking management + table assignment β
β /reports Revenue, sales analysis, staff metrics β
β /settings Outlet config, tax, charges, roles β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Role | Access Level | Default Demo Credentials |
|---|---|---|
| π Owner | Full access to all modules + settings | admin@admin.com / admin |
| π₯ Manager | All ops, reports, no outlet config | manager@spicegarden.com / Mgr@123 |
| π° Cashier | POS, billing, settlements | cashier@spicegarden.com / Cash@123 |
| π¨βπ³ Kitchen | KOT queue only | kitchen@spicegarden.com / Kitch@123 |
| π¨βπ΄ Waiter | Table service, order taking | waiter1@spicegarden.com / Wait@123 |
All credentials are seeded demo data. Rotate before any real deployment.
flowchart TD
A["Browser: POS / Kitchen / Tablet"] -->|HTTP| B["Next.js 15 App Router\nRoute Handlers"]
A -->|WebSocket| C["Socket.IO Server\n(custom server.ts)"]
B --> D[("SQLite\n(better-sqlite3 + Drizzle)")]
C --> D
C -->|push events| A
B -->|auth| E["NextAuth v5\nCredentials + RBAC"]
B -->|optional| F["Gemini API\nAI helper flows"]
style A fill:#3b82f6,stroke:#fff,color:#fff
style C fill:#f59e0b,stroke:#fff,color:#fff
style D fill:#22c55e,stroke:#fff,color:#fff
Key architectural decisions:
- Custom
server.tsβ Next.js + Socket.IO share the same Node process; no separate WebSocket server - SQLite with Drizzle β zero-config, portable, perfect for single-outlet demos and fast local builds
- Socket.IO rooms β POS, kitchen, tables, and outlet each get their own room for targeted push events
- NextAuth v5 RBAC β role-based route protection enforced at both middleware and route-handler level
- Node.js 20+
- npm
# Clone the repo
git clone https://github.com/iamadarsha/Bhukkad.git
cd Bhukkad
# Install dependencies
npm install
# Set up environment
cp .env.example .env.local
# Edit .env.local β at minimum set a real AUTH_SECRET
# Build the database and seed demo data
npm run db:setup
# Start the development server
npm run dev
# β http://localhost:3000After db:setup, these users are ready:
Owner β admin@admin.com / admin (PIN: 1111)
Manager β manager@spicegarden.com / Mgr@123 (PIN: 2222)
Cashier β cashier@spicegarden.com / Cash@123 (PIN: 3333)
Kitchen β kitchen@spicegarden.com / Kitch@123 (PIN: 5555)
Waiter β waiter1@spicegarden.com / Wait@123 (PIN: 4444)
| Script | What it does |
|---|---|
npm run dev |
Start custom Next.js + Socket.IO dev server via tsx server.ts |
npm run build |
Build Next.js app + compile server.ts into dist/server.js |
npm run start |
Run production server from dist/server.js |
npm run start:render |
Render-safe boot: schema push β seed if empty β start |
npm run db:setup |
Rebuild DB from scratch β push schema β reseed demo data |
npm run db:push |
Push Drizzle schema without resetting existing data |
npm run db:seed |
Reseed demo data (no schema changes) |
npm run db:studio |
Open Drizzle Studio for DB inspection |
npm run db:reset |
Remove SQLite file + WAL/SHM sidecars for a clean rebuild |
npm run lint |
Run ESLint |
npm run clean |
Clear Next.js build artifacts |
A render.yaml blueprint is included for a single Render web service.
# Required environment variables before first deploy:
AUTH_SECRET=<long random secret for NextAuth>
APP_URL=https://your-app.onrender.com
SOCKET_ALLOWED_ORIGINS=https://your-app.onrender.comRender boot flow:
npm ci && npm run build- On start:
npm run start:renderβ pushes schema, seeds if DB is empty, starts production server - Existing data is never overwritten on restarts
Free tier uses local SQLite β suitable for demos. For persistent storage, attach a disk and override
SQLITE_DB_PATH=/var/data/sqlite.db.
| Variable | Required | Description |
|---|---|---|
AUTH_SECRET |
β Yes | NextAuth signing secret (generate with openssl rand -base64 32) |
APP_URL |
β Yes | Canonical app URL (used for Socket fallback origin) |
APP_DEMO_MODE |
Demo-mode bypass toggle β keep false for production |
|
SOCKET_ALLOWED_ORIGINS |
β Prod | Comma-separated Socket.IO CORS origins |
GEMINI_API_KEY |
β Optional | For AI helper flows |
SQLITE_DB_PATH |
β Optional | Override SQLite path (useful for Render persistent disk) |
HOSTNAME / PORT |
β Optional | Custom host/port for the Node server |
See .env.example for the full list.
| Layer | Tooling | Why |
|---|---|---|
| Framework | Next.js 15 App Router | Server components + route handlers in one codebase |
| Runtime | React 19 | Concurrent features + server actions |
| Language | TypeScript (strict) | Type-safe domain model across menus, orders, and kitchen state |
| Auth | NextAuth v5 credentials | Role-based access across 5 user types |
| ORM | Drizzle + better-sqlite3 | Type-safe queries, zero-config, fast local dev |
| Realtime | Socket.IO | Sub-100ms push events across POS, kitchen, and tables |
| Styling | Tailwind CSS v4 + Radix UI | Operator-grade UI without a design system overhead |
| State | TanStack Query + Zustand | Server state sync + client-side cart/session state |
| Forms | React Hook Form + Zod | Validated order and menu forms |
| Charts | Recharts | Revenue and sales visualisations in reports |
| Tables | TanStack Table | Sortable, filterable data grids for menu and inventory |
π¦ Bhukkad
βββ app/ App Router pages, layouts, and route handlers
βββ components/ UI primitives + product-specific interface components
βββ db/ Drizzle schema, DB bootstrap, and seed data
βββ docs/ Technical documentation and handoff material
βββ lib/ Auth, order workflows, validations, shared server logic
βββ public/ Static assets and uploaded files
βββ server.ts Custom Next.js + Socket.IO server entrypoint
βββ middleware.ts Route protection for page requests
βββ BRANDING.md Brand system reference for UI work
βββ CLAUDE.md Claude Code project memory
βββ AGENTS.md General agent handoff document
| Document | Contents |
|---|---|
| docs/README.md | Documentation index |
| docs/RECREATION_GUIDE.md | Source-of-truth rebuild order and exact recreation rules |
| docs/UI_SYSTEM.md | Implemented visual system and shell behavior |
| docs/PAGE_BLUEPRINTS.md | Page-by-page product blueprint |
| docs/ARCHITECTURE.md | Runtime and module layout |
| docs/API_ENDPOINTS.md | Route handler inventory |
| docs/DATABASE_SCHEMA.md | Schema overview by domain |
| docs/TECH_STACK.md | Concrete dependency and runtime stack |
| docs/DEVELOPMENT_WORKFLOW.md | Common dev loops and verification expectations |
| BRANDING.md | UI and brand rules |
If you want to recreate Bhukkad exactly: start with
docs/RECREATION_GUIDE.mdβdocs/UI_SYSTEM.mdβdocs/PAGE_BLUEPRINTS.md
- Use
npm run devandnpm run start(not rawnext dev) β the customserver.tsmust be in the chain for Socket.IO to work /apiroutes are not protected by middleware; they enforce auth inside each handler withauth()- State is local to
sqlite.dbby default; useSQLITE_DB_PATHfor isolated runs - Uploads write to
public/uploadsβ ephemeral on free Render/Vercel; move to object storage for production - Seed data installs sample avatars, menu imagery, and realistic restaurant records for local demos
Built with β€οΈ for every restaurant operator who deserved better software by Adarsha Chatterjee
Bhukkad β because every hungry table deserves a system that keeps up.