← All work

02Case study, Lineup Solutions

Carte, restaurant ordering software

Carte gives each restaurant its own ordering site: a storefront in its own look, on its own domain, with table ordering and card payments. More than 20 restaurants run on it today.

Role
Head of Engineering, part-time
Team
Three engineers I hired and lead
Timeline
2026 to now
Stack
Hono on Cloudflare Workers, D1, R2, React, Stripe

Four live storefronts. Hover a phone to scroll its menu.Four live storefronts.

Raimbaldi Grillades storefront: a dark theme over a video of skewers on a grill
The Raimbaldi Grillades menu: dishes with photographs and prices
Darna storefront: a white and navy theme with a video of its dishes and drinks
The Darna menu: dishes with photographs and prices
O Trois Fours storefront: a black and red theme with the restaurant's animated badge
The O Trois Fours menu: dishes with photographs and prices
O'Cheese Naan storefront: a red theme over a video of a cheeseburger
The O'Cheese Naan menu: dishes with photographs and prices

What Carte does

A restaurant signs up and gets a storefront. It can live on a path, on a subdomain or on the restaurant's own domain, and one application serves all three.

From one admin, the owner manages the menu, options, tables, theme, orders and billing. Guests order from their phone, including from a QR code at their table, and pay by card.

Built on Cloudflare's edge

The backend is a Hono application on Cloudflare Workers. Data lives in D1, Cloudflare's SQLite database, through Drizzle. Photos live in R2, and the database stores only their keys. The frontend is React and TypeScript, hosted on Cloudflare Pages.

I chose this stack for cost: there are no servers to run or keep warm, and the bill stays small while the number of restaurants grows.

D1 was a simple choice for the same reason. Everything already runs on Cloudflare, and it costs almost nothing at this scale: one platform, one bill, no database server to look after.

Themes that change structure, not only colour

Most menu builders let an owner pick colours. Carte's themes change the layout itself: the navigation, the banner, the category list and the product cards each have structural variants.

There is still one component tree. Each component reads its own slice of the theme configuration and picks its variant, and one provider turns the configuration into CSS variables for the storefront. A store's theme is a preset plus that store's overrides, merged on the server.

Owners edit all of it in a theme editor with a live phone preview. The four storefronts above run the same code.

Payments that wait for the kitchen

Carte uses two sides of Stripe. Stripe Billing charges the restaurant for its plan. Stripe Connect charges the guest on the restaurant's own account.

A card order is only authorised at checkout. The money moves when the restaurant accepts the order, and the hold is released if it never does.

Checkout calls carry an idempotency key, so a retry on a bad connection cannot create a second order. Amounts are stored in thousandths of a euro and converted only at the Stripe boundary, which keeps rounding out of the pricing code.

When Stripe sends an event twice

Stripe can deliver the same event more than once, and it retries any event we fail to handle. Each event's signature is checked against the raw request, and its ID is recorded before the handler runs, so a repeat is ignored.

If handling fails, the endpoint answers with a server error rather than a 4xx, so Stripe sends the event again instead of dropping it. A job every five minutes expires orders the kitchen never accepted, releases their card holds and prunes the event log.

Tables nobody can spoof

Each table's QR code carries a random token, not a table number. A readable number would let anyone order against a table they are not sitting at.

Scanning the code locks the order to dine-in and stamps the table on it. If a code leaks, the restaurant rotates that table's token, and only that table's printed code stops working.

Plans the API enforces

A restaurant's plan grants features and limits. The API checks them on every gated route. The admin interface mirrors the same rules, so an owner never sees a button the API would refuse.

Enforcement is switched on per plan, which gives us a safe way to roll new plans out.

One contract for people and for AI

People and AI coding agents both write code in this repository, so the rules are written down and enforced by tools.

Custom lint rules, a suppression list that can only shrink, and CI hold new code to one structure. A hook formats and lints every file an agent edits and hands the errors straight back to it.

Every pull request runs the test suite with coverage thresholds enforced, plus end-to-end tests that run again before the backend deploys. A set of production-readiness tests covers the riskiest paths: payment gaps, QR table-token security and Uber Direct failures.

Where it stands

Carte went from first commit to paying customers, and more than 20 restaurants are live.

Delivery through Uber Direct is built and about to launch. Carte is the parent organization and each restaurant is a child organization that pays for its own deliveries.