NgopiGo
A full-stack coffee shop management platform integrating QR-based table ordering, digital payments, cashier operations, kitchen order management, and sales analytics into a unified system.
- Role
- Independent Full-Stack Developer
- Timeline
- 2025
- Status
- Not Deployed
- Showcase
- Interactive Project Showcase (Figma)
- Stack
- Laravel 13
- PHP
- MySQL
- Tailwind CSS
- JavaScript
- Midtrans Snap API
- Chart.js
- HTML5 QR Scanner
Interactive Project Showcase

Context
Small and mid-sized coffee shops often split table ordering, payment confirmation, kitchen tickets, and daily sales tracking across separate tools or manual paper slips.
NgopiGo consolidates dine-in self-ordering, cashier point-of-sale verification, kitchen preparation tracking, and sales analytics inside a single Laravel web application with four distinct user roles.
Problem
Counter queues build up during rush hours when every customer must queue to browse menus, place orders, and pay at a single register.
Without a shared order state between cashier and kitchen, unpaid orders can accidentally enter preparation and staff lose visibility over active table queues.
Solution
Built a unified web platform where dine-in guests scan a table QR URL to order from a categorized catalog and pay either online via Midtrans Snap or at the counter via a generated order QR code.
Separated operational views by role—giving cashiers an in-browser QR scanner, walk-in POS, and receipt printing; giving kitchen staff a paid-only preparation board; and giving admins Chart.js sales analytics and menu management.
My Contribution
Designed and implemented the entire full-stack system independently—covering Laravel 13 MVC routing, relational database schema, Midtrans Snap service integration, role-based access control, and responsive Blade interfaces.
Implemented both online payment verification (webhook signature checking plus Status API fallback) and in-store cashier QR verification so all orders follow one auditable lifecycle.
Key Features
Customer
Public · /pesan/{tableNumber}Frictionless dine-in ordering accessible directly by scanning a table QR code without creating an account.
QR-Based Table Ordering
Table-specific routes (/pesan/{tableNumber}) pre-populate the customer's table number into the order submission form.
Product Catalog & Customization Notes
Displays available items (is_available = true) across Coffee, Non-Coffee, Food, and Snacks with discount pricing, quantity steppers, and per-order customization notes (e.g., sweetness or ice preferences).
Shopping Cart & Checkout
Client-side floating cart summary calculates item counts and totals live before opening the checkout modal for customer contact details and payment method selection.
Midtrans Payment & Order Tracking
Supports Midtrans Snap popup (with fallback redirect URL) or COD order QR generation (QRCode.js), daily queue numbering, and automatic AJAX payment-status polling on the confirmation page.
Cashier
auth:admin · role:admin,cashierCounter POS operations for verifying cash payments via camera scan, creating walk-in orders, and issuing receipts.
Cashier POS & QR Payment Verification
Built-in camera scanner (html5-qrcode) reads customer order QR codes (/kasir/scan/{orderNumber}) so cashiers can confirm COD payments in one click.
Walk-in Order Entry & Payment Management
Counter walkthrough form (/admin/walkthrough) creates table orders directly for tables 1–20, alongside manual payment updates and auto-sync of recent unpaid Midtrans orders.
Receipt Printing
Thermal-style print layout (/admin/orders/{id}/receipt) styled with @media print for browser printing with queue numbers, item codes, and payment summary.
Order Status & History Access
Monitor active orders across tables, update fulfillment statuses, and inspect completed or cancelled order history.
Kitchen
auth:admin · role:admin,kitchenFocused preparation queue showing only verified paid orders ready to be brewed and served.
Kitchen Display System
Dedicated active-order board (/admin/kitchen) queries exclusively paid orders in pending, preparing, or ready states with table numbers, quantities, and customer notes.
Order Status Management
One-click status progression buttons advance tickets through pending → preparing → ready → completed via server-side PUT updates, paired with a manual refresh trigger.
Admin
auth:admin · role:adminCentralized store oversight combining revenue analytics, catalog CRUD, and staff role boundaries.
Admin & Sales Analytics
Dashboard powered by Chart.js displaying 7-day sales revenue trends, category sales doughnut breakdowns, Top 5 & Top 10 best-selling products across selectable 1, 3, 6, or 12-month periods, and payment-method splits.
Product Catalog & Order Governance
Full CRUD management (/admin/products) for menu pricing, imagery, and availability toggles, plus full administrative order controls including deletion.
Multi-Role Authentication
Dedicated admin authentication guard and RoleMiddleware enforce route-level and navigation-level permissions across Admin, Cashier, and Kitchen accounts.
System Architecture
NgopiGo uses a monolithic Laravel 13 MVC architecture serving role-specific Blade views backed by MySQL and integrated with Midtrans for online payments. Every state transition flows through Laravel controllers and database transactions.
Client Interfaces
Customer Interface
Blade · JS · QRCode.js
Table QR, cart, AJAX polling
Cashier POS
Blade · html5-qrcode
QR payment scan & receipts
Kitchen Display
Blade · HTTP PUT
Paid queue & manual refresh
Admin Dashboard
Blade · Chart.js
Analytics & product CRUD
Application Core
Laravel 13 Application
OrderController · DashboardController · ProductController · MidtransService · RoleMiddleware
Validation, RBAC guard (auth:admin), DB transactions, webhook verification
Data & External Services
MySQL Database
orders · order_items · products · admins
Eloquent relations, price snapshots & SQL analytics
Midtrans Payment Gateway
Snap API · Status API · Webhook
Snap tokens, SHA-512 webhook & fallback sync
Communication & Synchronization
Customer Interface Laravel 13
HTTP GET/POST · AJAX Polling (5s / 10s)
Submits orders via POST /pesan and polls GET /pesanan/{orderNumber}/status-bayar to detect payment confirmation automatically.
Cashier POS Laravel 13
Authenticated HTTP · html5-qrcode
Scans customer COD QR codes into /kasir/scan/{orderNumber} and confirms cash payment via POST /kasir/konfirmasi/{orderNumber}.
Kitchen Display Laravel 13
Server-Rendered Blade · HTTP PUT
Displays paid orders from /admin/kitchen, updates order status via PUT /admin/orders/{id}, and reloads via a manual Refresh action.
Admin Dashboard Laravel 13
Authenticated HTTP · Chart.js JSON
Server-side SQL aggregations in DashboardController serialize into Blade @json payloads rendered by Chart.js.
Laravel 13 MySQL Database
Eloquent ORM · DB Transactions
Order headers and order_items are committed atomically inside DB::beginTransaction() with rollback on failure.
Laravel 13 Midtrans Gateway
REST API (Guzzle/HTTP) · POST Webhook
Requests Snap tokens (/snap/v1/transactions), receives SHA-512 signed callbacks (/midtrans/callback), and queries /v2/{orderId}/status as fallback.
Synchronization accuracy: NgopiGo does not use WebSockets or a broadcast server. Payment updates rely on Midtrans webhooks, server-side Status API fallback sync, and interval AJAX polling (5s online, 10s COD) on the customer tracking page; Kitchen Display updates via standard HTTP form submissions and manual refresh.
Order & Payment Workflow
Orders follow a unified lifecycle from table QR scan through payment verification and kitchen fulfillment, branching cleanly between online Midtrans checkout and in-store Cashier QR/COD confirmation.
- 01
Scan Table QR
Customer scans the table QR code opening /pesan/{tableNumber} with the table pre-assigned.
- 02
Select Menu
Browse categorized available products, adjust item quantities, and add optional preparation notes.
- 03
Checkout
Enter name and WhatsApp number, pick Online or COD payment, and submit order inside a DB transaction.
- 04
Payment
Complete payment via Midtrans Snap popup/redirect or present the generated COD QR code at the counter.
- 05
Order Verification
Midtrans webhook/status sync or Cashier QR scan marks payment_status = paid and status = preparing.
- 06
Kitchen Display
Paid orders appear in /admin/kitchen where baristas progress tickets through preparing and ready.
- 07
Order Completed
Staff marks the order completed; it moves to Order History, printable receipts, and Admin Analytics.
Dual Payment Verification Paths
Midtrans Online Payment
Snap API · Webhook + Fallback- 01OrderController creates the order and requests a Snap token via MidtransService (/snap/v1/transactions).
- 02Customer pays in Midtrans Snap popup (QRIS, GoPay, ShopeePay, Virtual Account, or Card) or fallback URL.
- 03POST /midtrans/callback verifies the SHA-512 signature_key; if unavailable locally, 5-second AJAX polling triggers Status API sync.
- 04Verified settlement automatically sets payment_status = paid and status = preparing so the order enters Kitchen Display.
Cashier QR / COD Payment
QRCode.js · html5-qrcode- 01Order is saved with payment_status = pending and status = pending, redirecting to /pesanan/{orderNumber}.
- 02Confirmation page renders a unique QR code pointing to /kasir/scan/{orderNumber} and polls payment status every 10 seconds.
- 03Cashier scans the customer's QR code using the in-browser html5-qrcode modal and collects cash payment.
- 04Cashier submits POST /kasir/konfirmasi/{orderNumber}, updating payment_status = paid and status = preparing.
Results & Impact
- Unified four operational user roles (Customer, Cashier, Kitchen, Admin) inside a single Laravel 13 + MySQL web application.
- Implemented two verified payment flows—Midtrans Snap online payments (with SHA-512 webhook and Status API fallback) and in-store Cashier QR/COD verification via html5-qrcode.
- Delivered end-to-end order lifecycle management (pending → preparing → ready → completed / cancelled) with daily queue numbering, thermal receipt printing, and order history.
- Built an interactive Chart.js sales analytics dashboard covering 7-day revenue trends, category breakdowns, and selectable 1/3/6/12-month Top 10 product performance.
- Open-source codebase on GitHub (github.com/abnibsth/ngopi-go) accompanied by a 3-page Interactive Project Showcase in Figma.
Technical Decisions
Laravel 13 MVC Architecture & Service Isolation
Structured around standard Laravel 13 MVC controllers (OrderController, DashboardController, ProductController, AdminAuthController) paired with Blade views and Vite-bundled Tailwind CSS v4.
Isolated all Midtrans HTTP communication (Snap token creation, item payload mapping, and transaction status checks) inside a dedicated App\Services\MidtransService class to keep controllers focused on order flow.
Relational Database Schema & Transactional Integrity
Modeled core entities across products, orders, order_items, and admins using Eloquent relationships (Order hasMany OrderItem; OrderItem belongsTo Order and Product).
Wrapped order header and order_items insertion inside DB::beginTransaction() with automatic rollback on exception, and stored unit price and subtotal snapshots on each order item so future menu price edits never alter historical totals.
Role-Based Access Control (RBAC)
Configured a separate admin authentication guard on the Admin model with explicit role constants (admin, cashier, kitchen) and permission helper methods.
Enforced access at the route layer via custom RoleMiddleware (e.g., middleware(['auth:admin', 'role:admin,cashier'])) while conditionally rendering navigation items and action buttons per role in Blade layouts.
Midtrans Payment Gateway Integration & Fallback Sync
Implemented server-side Snap token generation stored in session with a hosted redirection URL fallback if the client popup fails to initialize.
Excluded /midtrans/callback from CSRF validation in bootstrap/app.php for server-to-server delivery, verified every callback with SHA-512 signature_key comparison via hash_equals(), and added a fallback syncMidtransPaymentIfNeeded() call against Midtrans Status API for environments where webhooks cannot reach localhost.
Order Lifecycle Management
Decoupled payment_status (pending, paid) from operational fulfillment status (pending, preparing, ready, completed, cancelled) to prevent premature food preparation.
The Kitchen Display query filters strictly by payment_status = 'paid' and active fulfillment statuses, while Order History isolates completed and cancelled records for clean auditing.
Input Validation & Transaction Security
Every order request is validated server-side for required customer details, allowed payment methods (in:cod,online), valid product IDs (exists:products,id), and positive integer quantities (integer|min:1).
Order totals are always recalculated on the server from database product records rather than trusting client-side cart totals; staff passwords use Laravel's hashed cast, and the cashier QR scanner validates the /kasir/scan/ URL pattern before redirecting.
Kitchen Synchronization & Client Payment Polling
Rather than introducing WebSocket server infrastructure for a single-venue app, synchronization uses lightweight HTTP patterns: the customer confirmation page polls GET /pesanan/{orderNumber}/status-bayar every 5 seconds for online orders and every 10 seconds for COD orders.
The cashier order index automatically syncs up to 5 recent unpaid online orders on load, while the Kitchen Display renders paid orders directly from MySQL with server-side PUT form transitions and a manual Refresh button.
Challenges & Learnings
Reconciling Online Payments When Webhooks Cannot Reach Localhost
During development and non-public deployments, Midtrans server-to-server callbacks cannot reach a local server. I paired the SHA-512 verified webhook endpoint with a server-side Status API fallback (syncMidtransPaymentIfNeeded) triggered by customer AJAX polling and cashier order listing loads.
Preventing Unpaid Orders from Cluttering the Kitchen Queue
Supporting both instant online payments and pay-at-counter COD created the risk of baristas preparing unpaid tickets. Separating payment_status from fulfillment status and gating /admin/kitchen strictly on payment_status = 'paid' resolved the ambiguity across both payment flows.