Architecture and Runtime
How the production runtime is split today and how the large services should be decomposed next.
Production boundary
- Cloudflare
lizzflix-backendis the canonical backend for studio state, uploads, jobs, billing, the model catalog, and generation orchestration. - Vercel serves the frontend, auth/session shell, and Stripe redirect flows.
Maintainability rules
- Active studio UI should use
studio-client-api.ts. - Active product routes should not depend on
src/lib/studio/service.ts. - Inline bilingual UI copy should live in dictionaries or dedicated localized content modules.
- Oversized modules should be guarded by CI.
Recommended split
Web runtime
Split src/lib/studio-runtime/service.ts into:
queriescommandsjobsbillingcatalogmediamappersprompts
Worker runtime
Split cloudflare-worker/src/index.ts into route modules:
authbillingcataloguploadsjobsstudio-readstudio-write
Split cloudflare-worker/src/studio.ts into:
seriescharacterslocationsepisodesscenes
Split cloudflare-worker/src/studio-workflows.ts into:
voicesdialoguestart-framesrendersscene-proposals