Theatrical

2026

SDK design · Typed API contracts · An event bridge · Three languages

Cinema ticketing runs on production-grade APIs with no developer ecosystem around them: no typed clients, no components, no events. Theatrical is that layer — type-safe SDKs in TypeScript, C# and Python, an event bridge that turns request-response snapshots into a typed event stream, a CLI and React components — published on npm, NuGet and PyPI.

Role
Designer & engineer
Stack
TypeScript 5.9 · C# / .NET 8 · Python 3.10+ · Zod · React
Methods
Typed API contracts validated at runtime, poll-and-diff eventing, signed webhooks, one surface ported across three runtimes
Scope
5 TypeScript packages and two ports · 1,284 tests · 7 published packages
Theatrical — a developer platform for cinema technology
The premise

Treat cinema-going as infrastructure

Sessions, seats, orders, loyalty, pricing, food and beverage: an industry’s worth of ticketing sits behind good APIs, and every developer who builds on them starts from zero. Theatrical asks what that would feel like with the developer experience payments and commerce have spent a decade perfecting: one coherent, typed surface you can hold.

The contract

Eight resources, decided before a line was written

Each resource is a noun from the cinema domain, and the verbs are where the thinking shows: an order isn’t just created, it gains tickets and items, takes loyalty, is confirmed, completed, cancelled or refunded. Every response is parsed against a runtime schema before it reaches your code, so a field the platform changes fails loudly at the boundary instead of quietly downstream.

client.filmsnowShowing · comingSoon · get · getDetail · search · advancedSearch
client.sessionslist · listPaginated · get · availability
client.siteslist · get · nearby · screens
client.orderscreate · addItems · addTickets · applyLoyalty · confirm · complete · cancel · refund · get · history
client.pricingcalculate · ticketTypes · applyCoupons
client.loyaltyauthenticate · getMember · getPointsBalance · getHistory · listRedemptionOptions · redeemPoints
client.subscriptionslistPlans · getMemberSubscription · getUsage · checkBenefitEligibility · suspend · cancel
client.foodAndBeveragemenu · categories · itemDetail · combos · addToOrder
The event bridge

A snapshot API, turned into events

The platform APIs it targets are request-response: you ask what is true and get a snapshot. The event bridge polls each resource on its own loop — orders every 5 seconds, sessions every 10, films every 60, never overlapping a slow request — diffs each read against the last, and emits typed events: booking.created, booking.confirmed, booking.cancelled, session.updated, session.soldout, inventory.low and the rest.

Webhooks are signed with HMAC-SHA256 and verified with a constant-time comparison, with an optional replay window. Delivery retries with exponential backoff, and every endpoint is delivered to independently, so one failing receiver never blocks the others.

The client

The details you notice only when they’re missing

Token refresh runs five minutes before expiry, and concurrent refreshes collapse into one. Backoff uses full jitter and honours Retry-After, including its HTTP-date form. A sliding-window limiter keeps a client under the platform’s rate limits, and a typed error hierarchy means a rate limit is something you can catch and reason about. Path parameters are encoded as a single segment, so an id can never become a path.

Three languages

One surface, in each runtime’s own idiom

The booking front end is TypeScript; the back office is .NET; the data work is Python. So the same surface is ported three times, each written the way that language’s developers expect, and each with its own suite. The Python port is type-checked in strict mode.

PackageRuntimeTests
@theatrical/sdkTypeScript 5.9280
@theatrical/cli · events · react · analyticsTypeScript 5.9389
Theatrical.SdkC# / .NET 8276
theatricalPython 3.10+339
The demo

The same data, three readers

The demo runs a simulated cinema through the event bridge and shows it three ways: to an audience, to an operator, and to a developer.

Theatrical audience lens — tonight's sessions on a simulated cinema
Audience

Tonight’s sessions with seats filling, on a simulated cinema.

Theatrical operator lens — live mission-control dashboard of a cinema's evening
Operator

Admissions, occupancy and the event stream announcing what just changed.

Theatrical developer lens — the SDK and component code beside the view
Developer

The SDK and component code each view is built from, shown beside it.

1,284Tests across three languages
7Packages on npm, NuGet and PyPI
8Resources in one typed contract
511Commits since April
Explore

Install it, or read it

The SDKs are MIT. Advanced tooling is BSL 1.1, converting to MIT on 7 April 2030, or sooner on a version’s fourth anniversary.