About this project

OpenStory is an open-source platform for turning a written script into a styled video production. It analyzes the script into a scene breakdown with camera angles, mood treatments and continuity tracking, then generates a sequence of AI frames — images, motion video and audio — while keeping characters, locations, color palettes and lighting consistent across scenes. The project describes itself as handling prompt engineering, generation and compositing so teams can focus on the creative work. Key capabilities described in the README: - Script analysis: paste a script and receive an automatic scene breakdown with camera angles, mood treatments and continuity tracking. - AI image generation through Fal.ai, with multiple model options. - Image-to-video motion: convert still frames into motion video clips. - Style consistency: characters, locations, color palettes and lighting carry across scenes automatically. - Team workspaces are listed as coming soon, covering shared libraries of styles, characters, VFX and audio. - Passkey authentication via Better Auth for passwordless sign-in. - Edge deployment on Cloudflare Workers with a global CDN. Architecture and stack: the app is built with TanStack Start, TanStack Router and Vite, running on Bun (>= 1.3.9). Data is stored in Cloudflare D1 (SQLite) through Drizzle ORM. AI features use TanStack AI, Fal.ai and OpenRouter, with PostHog for LLM observability. Long-running generation is handled by Cloudflare Workflows for durable execution, while Cloudflare Durable Objects provide realtime SSE progress updates. Assets live in Cloudflare R2 (S3-compatible). The UI uses Tailwind v4 and shadcn/ui. Quality tooling includes oxlint, oxfmt, tsgo, Lefthook and Knip; testing uses Vitest and Playwright. Getting started requires only Bun. Local development runs the full stack — D1, R2, Workflows, Durable Objects and email — inside Workerd via Miniflare, so no Docker, external database or Cloudflare account is needed. After cloning and running bun install, bun dev bootstraps .env.local with auth and encryption secrets, migrates and seeds the local database, and starts the dev server on port 3000. AI generation requires two keys: FAL_KEY for image, video and audio generation, and OPENROUTER_KEY for LLM script analysis; bun setup adds them interactively. Optional configuration covers Google OAuth, Stripe, PostHog and remote R2. The repository documents a broad set of scripts for development, quality checks, testing, database migrations and deployment. Deployment targets Cloudflare Workers, with a one-click deploy button that clones the repo, provisions resources declared in wrangler.jsonc and sets up CI. Cloudflare Workers Builds auto-deploys on pushes to main, and pull requests receive GitHub Actions preview deployments with dedicated D1 databases. The project is MIT licensed and welcomes contributions, pointing newcomers to good first issue labels and a CONTRIBUTING guide.