Production architecture case study for Cheezzy App — Ghana-first ordering, payments, delivery, loyalty, and branch operations.
# Cheezzy App
### Production Architecture Case Study
**A Ghana-first food ordering, payment, delivery, rewards, and branch-operations platform.**
Google Play · App Store
> [!NOTE]
> This repository is a sanitized technical case study of a live product.
## Product
Cheezzy App is the ordering application for Cheezzy Pizza in Ghana. Customers can select a branch, browse its available menu, customize food, choose pickup or delivery, pay online or with cash, track orders, redeem coupons and gift cards, and participate in the Cheezzy Coins loyalty system.
The product also includes branch-facing order management. The customer and branch experiences share one order state model, allowing staff actions to update customer tracking without duplicating operational data.
## What this case study demonstrates
- Ghana-first phone ownership verification delivered through Arkesel and n8n
- Supabase authentication with recovery for incompletely onboarded Google users
- Server-owned cart repricing and immutable order drafts
- Paystack Mobile Money and card payments with independent server verification
- Idempotent payment finalization and webhook replay protection
- Delivery estimates tied to the authenticated customer and selected branch
- Separate delivery fees collected directly by couriers
- Coupon, gift-card, and Cheezzy Coins controls enforced on the server
- Simplified branch operations: **Received → Ready → Completed**
- Automated close-of-day cancellation of unfinished branch orders
## Architecture
```mermaid
flowchart LR
Customer[Customer App Flutter]
Staff[Branch App Flutter]
Auth[Supabase Auth]
DB[(Supabase Postgres RLS + RPCs)]
Edge[Supabase Edge Functions]
N8N[n8n Workflows]
Paystack[Paystack]
Arkesel[Arkesel SMS]
Maps[Google Maps]
Push[Push Notifications]
Customer --> Auth
Customer --> Edge
Customer --> DB
Staff --> DB
Edge --> DB
DB --> N8N
N8N --> Paystack
Paystack --> N8N
N8N --> Edge
N8N --> Arkesel
Customer --> Maps
DB --> Push
```
FlutterFlow owns the …