// DaveBuilds

Matinee

A cinema ticket-booking app built to survive opening night: thousands of people trying to grab the same seats in the same minute and never selling one twice.

Live APIAndroid buildAI-assisted
Try it (Android) Demo + write-up App code Backend code Design (Figma)
Matinee mobile home screen showing a featured film, See showtimes button, Now playing posters and floating bottom navigation
Home screen with hero, Now playing and floating glass nav
Matinee Tickets screen listing upcoming bookings with Ready and Confirming status badges
Tickets: Ready and Confirming states backed by webhook polling

Problem & constraints

Booking a cinema seat sounds trivial until a blockbuster opens. The instant tickets go live, thousands of people hit the same showtime and fight over the same handful of good seats in the same few seconds. Two outcomes are unacceptable: selling one seat to two people and the whole system falling over under the rush. Matinee is built around making both impossible — while still looking and feeling like a product from a top studio, because for this brief "it works" isn't the bar for UI.

  • Free / low-cost infrastructure: running on Neon Postgres, Railway Redis and Railway hosting.
  • Stripe test mode: the real payment flow, no real money.
  • Design-first with enforced tokens: every screen designed in Figma before a line of UI, with a CI lint that fails the build on a raw hex or spacing value.
  • Isolated TMDB dependency: movie data comes from TMDB, but the app may never call TMDB directly and must keep working when TMDB is slow or down.
  • Whole minor units for money: all amounts are handled in pence, never floating point.
  • Real-world service billing: Matinee sells a seat at a screening, keeping it clear of Apple/Google in-app-purchase rules so Stripe is the correct and required processor.

Role & architecture

My role: AI-assisted — I did the research and set the design and product requirements, then used AI to build the React Native app, Node/Express backend and infrastructure while I reviewed, tested and verified the output.

The React Native (Expo) app talks only to my own Node/Express/TypeScript backend — never to TMDB or the database directly. That backend-for-frontend layer means a single file owns TMDB's data shape, so the app can't break when TMDB renames a field.

The backend runs as two services on Railway from one image: a public API and a private worker. Postgres (Neon — a primary plus a read replica, with read-your-own-writes) holds cinemas, showtimes, seats, bookings, and an append-only ledger; Redis (Railway) holds seat holds, rate-limit counters, and the job queue; BullMQ runs the background work — payment webhooks, hold-expiry cleanup, and refunds. TMDB responses are cached cache-aside in Redis with documented TTLs and stale-serve when TMDB is unavailable.

Design

I studied six apps before designing anything: AMC, Apple TV+, Disney+, Hulu, Peacock and Prime Video. I kept seventeen reference screenshots with a note on what each one got right, and that study lives in the repo rather than only in my head.

Every screen was designed in Figma before a line of UI existed, and the tokens came out of the Figma file rather than being invented in code: 150 variables covering colour, a typography scale, spacing in multiples of four, radii, shadows, and a dedicated set for numerals and the QR ticket. A CI lint fails the build on a raw hex or spacing value, so using the tokens is enforced rather than remembered. A second automated test checks text contrast against its surface at 4.5:1, and touch targets are 48 by 48 rather than the 44 minimum, matching Android's own guidance.

The component library is the product's vocabulary: nineteen components, each documented with its variants, states and props, and a hidden gallery screen showing every one in every state. The SeatMap is the hard one, with 320 seats carrying available, selected, held, sold and wheelchair-accessible states and staying smooth under pinch-zoom.

Not everything survived first contact. The floating glass navigation bar crashed Android natively the first time it was wired in, so I redrew it beside the screens rather than inside them, tested the glass material on a real device, and only then turned it on. The dark mode is designed, not inverted. Loading states are skeletons rather than spinners, and every empty and error state is drawn, because a blank screen is a bug.

Three hardest decisions

  1. No double-booking: a fast lock, but the database has the final say. When you pick a seat, the app places a hold in Redis with SET NX and a short TTL — "only set if it doesn't already exist" — in one atomic step, so two requests racing for the same seat can't both win, and an abandoned checkout frees the seat on its own. But Redis can restart and locks can leak, so I refused to let the lock be the source of truth. The real guarantee is a database UNIQUE (showtime, seat) constraint: even if every layer above it fails, Postgres physically cannot write the same seat into two bookings. Fast path for the experience; the dumbest, lowest layer for correctness.
  2. A successful payment is not a confirmed booking. It's tempting to mark a booking "done" the moment Stripe's PaymentSheet returns success. I didn't. The client's "success" is only a hint; the booking is confirmed solely by a verified Stripe webhook, processed in a background job, with the event ID stored so a duplicate webhook is ignored. The flow is charge-first, then deliver-or-refund: if the seat can't be delivered after payment, the money is refunded and the correction recorded as a new row in an append-only ledger. The app, meanwhile, polls an owner-scoped status endpoint instead of trusting its own sheet result — including a calm "your payment went through, your ticket is on its way" state when confirmation runs slow.
  3. Surviving the surge without crashing. Under a real rush, a server that tries to serve everyone serves no one. Matinee adds a virtual waiting room: when too many people are active on one showtime, new arrivals join a queue admitted at a fixed rate, and the app shows their position — with no extra worker, because the heartbeats ride the polls that are already happening. Past a hard in-flight limit, the server sheds load with a clear "try again in a moment" instead of toppling. Seat availability updates by short polling (chosen over WebSockets/SSE for cost and simplicity at this scale, and documented as a trade-off), and rate limits run per user and per IP in Redis, not in memory.

Result

I load-tested the worst case with K6: 500 virtual users all trying to hold the same 50 seats at the same instant. The result was exactly 50 bookings — one per seat — and zero double bookings, verified in the database, with latency and error rates captured per response type.

The backend is deployed and live on Railway; a full checkout → payment → QR ticket was proven end-to-end against production, with the booking's reference matching the worker's confirmation log. Error tracking (Sentry) runs on both the app and the server. The UI is built from a nineteen-component, tokens-only design system with a hidden component gallery, a 320-seat seat map that stays smooth under pinch-zoom, a designed dark mode, and every screen matched to the Figma.

What I'd do next

  • Real user accounts: today identity is an anonymous per-device key, which is enough to be correct but not to sign in across devices.
  • Higher-scale load testing: push the load test past 500 and actually measure where the in-flight limit should sit, plus a cross-network test confirming each client IP is counted independently.
  • Shard the hottest case: shard a single sold-out blockbuster showtime by showtime_id, since that's the one row everyone contends on.
  • Already-scoped polish: add-to-calendar on the ticket, offline-cached tickets, and source-mapped mobile crash traces.
Back to selected work