← All work
LiveAI2026
brAIn
A script-to-video web app: a script becomes acts, beats and shots, then generated takes to review.

brAIn turns a written script into a film plan. The script is split into acts, chapters and beats. Each beat gets candidate images and video takes from generative models, and the takes are reviewed side by side on a board.
It is a real multi-tenant product with accounts, workspaces and a spending model, so most of the engineering is about correctness: who can see what, and what every click costs.
My role
LeadFull-stack engineering
Team
Reality Crisis · 2019 — present
Platforms
- Web
Stack
- Next.js 16
- React 19
- TypeScript
- PostgreSQL · Drizzle
- Zod
- fal.ai
- Vitest · Playwright
- Vercel
Lead
What I did
- 01Engineering across the full stack: Next.js app, API routes, database and generation pipeline.
- 02Multi-tenant security: every request is tenancy-checked, and tests enforce it.
- 03The spending model: prices, caps, admin approval and starter credits.
- 04The test suite, with more than 4,000 tests.
What stands out
- 01More than 4,000 automated tests across 220+ files, green as of September 2026, with zero @ts-ignore in the source.
- 02Tenancy is checked on every request. Another workspace's project returns 404, not 403, so ids cannot be probed, and a test enforces it.
- 03A test fails the build if the price a user sees ever disagrees with the price they are billed.
See it in action

