Cirebon Kuring Cafe - Cafe Management System
Cafe operating system spanning 4 apps on one Supabase backend: QR table ordering, a Flutter staff tablet for 4 roles, an employee portal, and an owner dashboard, backed by 69 migrations and 15+ edge functions.
- Year
- 2025
- Kind
- Full-Stack Business System
- Role
- Full Stack Developer
- Duration
- 8 months
- With
- Solo Developer
- For
- Cirebon Kuring Cafe
- Problem
- The cafe needed ordering, payment checks, stock, attendance and payroll to stay in sync across customers, four staff roles and the owner, without buying separate POS, inventory and HR tools.
- Approach
- Built a Turborepo monorepo with three Next.js apps and a Flutter tablet app sharing one Supabase database, with business rules in Row-Level Security policies, SQL triggers and Deno edge functions.
- Result
- One realtime order flow from table QR to kitchen to receipt, automatic stock deduction at moving-average cost, and geofenced attendance feeding monthly payroll. Built solo in 200+ commits.
Built with
- Next.js 15
- React 19
- TypeScript
- Flutter
- Supabase
- PostgreSQL
- Deno Edge Functions
- Tailwind CSS
- Zustand
- BLoC
- Turborepo
- pnpm
- Vercel
- Telegram Bot API

Project Overview
A complete operating system for Cirebon Kuring Cafe — covering everything from the moment a customer scans the QR code on their table to the owner closing the month's payroll. Instead of stitching together separate POS, inventory and HR tools, everything lives on one Supabase (PostgreSQL) backend and is served through four purpose-built applications.
The Four Applications
| App | Stack | Used by | Main responsibilities |
|---|---|---|---|
| Customer Web | Next.js, Zustand | Guests | QR table ordering, menu customization, checkout (cash, QRIS, transfer), live order status, rating |
| Staff Tablet | Flutter, BLoC, get_it | Cashier, kitchen, waiter, stock | Payment verification, kitchen display, order hand-off, stock intake, thermal receipt printing |
| Employee Portal | Next.js | All employees | Geofenced clock-in/out, schedule, leave and overtime requests, monthly payslips |
| Owner Dashboard | Next.js, Recharts, jsPDF | Owner | Menu & recipes, inventory & suppliers, promos, shifts & payroll, cash reconciliation, sales / finance / staff analytics |
Architecture
The repository is a Turborepo + pnpm monorepo. Shared packages keep the four apps consistent:
shared-types— one source of truth for orders, menu, payments, inventory and employeesutils— currency, tax, discount and payroll calculations plus Indonesian-specific validatorsui-components— shared React componentsdatabase— typed query helpers
Business rules that must not be bypassed by any client — order validation, payment verification, stock deduction, attendance validation and report generation — run as Deno Edge Functions on Supabase, while Row-Level Security policies make sure each role can only read and write what it should.
Order Flow
Scan table QR → Browse & customize menu → Checkout
↓
Payment (cash / QRIS / transfer with proof upload)
↓
Cashier verifies → Kitchen display → Waiter serves → Completed
↓
Ingredients auto-deducted · Receipt printed · Customer can rate
Every status change is pushed in realtime, so the customer's order-status page, the kitchen tablet and the owner's live orders view always show the same state.
Inventory That Costs Itself
Menu items are linked to their ingredients, so completing an order automatically deducts stock at the database level. Purchases are recorded as batches with expiry dates, and the unit cost of each ingredient is recalculated with a moving-average cost method (including delivery-fee allocation). That means gross margin per menu item is based on what the cafe actually paid, not a fixed estimate. Expired batches are written off automatically and low-stock alerts are sent to the owner.
People Operations
- Attendance — clock-in is validated against the cafe's configured location radius, with rules for lateness and early leave set by the owner.
- Scheduling — shift templates and a weekly schedule builder.
- Requests — leave and overtime requests flow from the employee portal to the owner for approval.
- Payroll — monthly payroll computed from attendance and overtime, exported as PDF payslips.
Key Takeaways
- Putting critical rules in the database and edge functions, not the UI, kept four different clients consistent.
- A monorepo with shared types caught breaking changes across apps at compile time.
- Real operational data (stock, cash, attendance) forced careful handling of edge cases that tutorials rarely cover — partial payments, expired batches, missed clock-outs.
Repository: private · Period: June 2025 – January 2026
Screens

The owner's live view: every table's status and the orders waiting, with sample data.

Sales analytics for the owner.

Inventory: stock on hand for each ingredient.

A guest's menu after scanning the QR code on table 3.

Checkout, with the payment methods.

The order's status, updated as the kitchen works.

An employee clocking in, checked against the cafe's location.
In numbers
- 4 applications in one Turborepo monorepo sharing types, utils and UI packages
- 3 Next.js apps (customer, employee, owner) + 1 Flutter tablet app with 4 staff roles
- 69 versioned SQL migrations with Row-Level Security policies per role
- 15+ Supabase Edge Functions for orders, payments, stock, attendance and reports
- Automatic ingredient deduction on order completion using moving-average cost
- Geofenced attendance, shift scheduling, overtime, leave and payslip generation
- Bluetooth thermal receipt printing and Telegram notifications for staff and owner
- 200+ commits, designed, built and maintained solo