J-Cafe - The Kosher Place
Six branches, two languages, one kitchen that needs to know what to make
6
active branches
38
automated tests
0
order leaks since
2
interface languages
What was stuck
A kosher chain with six branches in Thailand and an audience speaking two languages. Orders arrived through scattered channels, the kitchen received them by hand, and there was no single place to see what was happening across every branch at once. Underneath that sat a worse fault: three competing sources of truth for branch identity, and orders leaking between branches. The code carried a hard fallback to a default branch in about 38 places. In an ordering system, an order that reaches the wrong branch is not a display bug - it is a meal that left the wrong kitchen.
What we built
The engineering decision: the server becomes the sole authority for branch identity. We added resolveOrderCompany, moved to a single source of truth held in an httpOnly cookie, gave every branch its own cart key, and removed every hard fallback - all of them, not most. One authority in place of three. The operations layer was built on top of that: a bilingual storefront with secure checkout, a picker screen in each branch showing what to assemble right now, and a kitchen display (KDS) that receives the order directly - with nobody reading it out loud. Everything syncs both ways with ODOO, so stock and prices stay a single source of truth.
The process, end to end
- Order placed on the site
- Stock and pricing sync
- Picker screen at the branch
- Kitchen display (KDS)
- Automated tests on every update
What changed
- The test suite grew from 7 tests to 38
- Zero order leaks between branches since
Technologies
| Field | E-Commerce |
|---|---|
| Technologies | Next.js · Supabase · ODOO · Stripe · Vercel · Playwright |
Facing something similar?
Tell us what's stuck and we'll tell you honestly whether - and how - we can help.
Let's talk