Blueprint
Cookbook
The live studio is the product. This page is the handoff: how to rebuild the Day-One engine on Next.js + fal + Remotion without losing the desk.
Handoff packs
Packs are not public files. Sign in to download. Review is the consult drop (no keys, no lockfile, no hero video). Backup is restorable (`package-lock.json` + the scripts the commands actually call). Both are timestamped, secret-scanned, and stored off the public folder.
Two stacks, honestly
This preview cannot host Next.js or fal. The live product uses TanStack Start and xAI Imagine so the studio actually runs. The kickoff stack is implemented as copy-paste modules in docs/local-fal/.
Live product
TanStack Start, Tailwind, working sign-in, xAI Imagine. Desk, locks, cost, gallery, provenance. This is what you are looking at.
Local Day-One
Next.js App Router, @fal-ai/client, server proxy, Remotion. Keep the UI. Drop in docs/local-fal/code/.
The one design rule
Higgsfield and Kling are visually loud. Soren is not. If a control makes the main screen busier, it goes behind Advanced.
Security
- Generation keys never reach the browser.
- Local fal:
FAL_KEYin.env.localonly. Proxy via@fal-ai/server-proxy. - Pack script refuses to zip if it finds key assignments,
sk-tokens, private keys, or.envfiles. - Source zips are not served from the public folder.
Modular slices
Each slice is one session. Finish the done-when before starting the next. Full table: docs/local-fal/FILEMAP.md.
- A — Scaffold the starter kit. Gitignore
.env.localfirst. - B — Copy
code/fal-proxy.tsto the App Router proxy. - C — Copy
code/models.fal.ts. Cost on screen. Hero confirm. - D — Copy adapter + queue. Still, motion, start/end frame.
- E — Port locks (universe.ts, desk, supporting cast).
- F — Provenance: saved shot restores model, seed, frames, versions.
- G — Remotion shot composition (Phase 2, do not block Day 1).
- H — Timestamped, scanned packs. Never in public/.
Local fal engine
Defaults: FLUX schnell ($0.003) and H3 Max Turbo ($0.025/s @480p). Enhance prompt maps to prompt_expansion_mode, default off. Veo 3.1 full stays hidden until asked.
Copy these files as-is:
- docs/local-fal/code/fal-proxy.ts → app/api/fal/proxy/route.ts
- docs/local-fal/code/fal-adapter.ts → src/lib/engine/fal.ts
- docs/local-fal/code/queue.ts → src/lib/engine/queue.ts
- docs/local-fal/code/models.fal.ts → src/lib/models.ts
- docs/local-fal/code/remotion-shot.tsx → src/remotion/Shot.tsx
Anti-drift
- Character lock + up to two supporting. Portraits are references, never auto start-frames.
- Approved reference gallery per character. Identity version increments when a still is added.
- A saved shot stores prompt, mode, model, seed, aspect, resolution, duration, enhance, lead + supporting, scene, start/end frames, and estimated cost. Reload restores every field.
- Gallery lightbox shows provenance and a Restore shot action.
Logs & packs
docs/INTENT-LOG.md— decisionsdocs/BUILD-LOG.md— what shippeddocs/QUESTIONS.md— consult questionsnpm run packwrites timestamped zips topacks/, keeps the last eight, scans for secrets.
Questions
Unresolved decisions live in docs/QUESTIONS.md. Visual direction is locked — Pinterest is not required.