A full-stack app for creating and rendering 2D animation videos from chat-driven prompts.
- User sends a prompt from the browser UI.
main-appvalidates/authenticates, persists chat/video records in Postgres, then enqueues a render job in Redis.processorconsumes the queue job, runs rendering (Manim via Docker), and uploads output to S3-compatible storage.main-appexposes status endpoints that the client polls to show progress and final video URL.
main-app/: Next.js 15 application (UI + API routes + auth + DB access).processor/: Bun worker service that consumes Redis jobs and executes render pipeline.notify-server/(deployment target): companion backend process for notification/workflow support.
- Database: Postgres (recommended: Neon).
- Queue: Redis.
- Object storage: Cloudflare R2 or any S3-compatible provider.
- Hosting:
main-app: Vercel.processorandnotify-server: VPS (recommended: DigitalOcean).
main-app/- Next.js app.processor/- queue consumer/render worker.notify-server/- notification backend service.
There is no root package.json. Run package commands inside the package directory you are working on.
- Frontend/API: Next.js 15 + TypeScript
- Auth: Better Auth
- ORM/DB access: Drizzle ORM + Postgres
- Worker runtime: Bun
- Queue/message layer: Redis
- Rendering runtime: Dockerized Manim
- Storage: S3-compatible object storage
- Bun
- Docker
- Postgres database
- Redis instance
- S3-compatible bucket (or local alternative)
cd main-app && bun install
cd ../processor && bun installIn separate terminals:
cd main-app && bun run devcd processor && bun run startIf used in your setup, run notify-server with its configured start command.
Set environment variables per service. Typical production variables include:
-
main-app:NEXT_PUBLIC_BASE_URLDATABASE_URLBETTER_AUTH_SECRET- OAuth credentials (for enabled providers)
- model/API keys (for enabled providers)
REDIS_URLREDIS_QUEUE_NAMEINTERNAL_API_KEY
-
processor/notify-server:REDIS_PASSWORD(when self-hosting Redis with auth)API_URLINTERNAL_API_KEYREDIS_URL(for example:redis://:your-password@host:6379)REDIS_QUEUE_NAMES3_ACCESS_KEYS3_SECRET_KEYS3_BUCKETS3_ENDPOINTS3_PORTS3_SSL- optional
S3_PUBLIC_CUSTOM_DOMAIN
Keep secrets out of version control. Use hosting platform secret managers.
Recommended production split:
- Deploy
main-appto Vercel. - Deploy
processorandnotify-serveron a VPS. - Use managed Postgres and managed Redis where possible.
- Store rendered assets in S3-compatible object storage.
See DEPLOYMENT_PLAN.md for full rollout phases, checklist, and launch order.
- Prefer authenticated/internal access for status and internal APIs.
- Add request rate limiting for generation endpoints.
- Ensure queue operations fail loudly (avoid silent enqueue failures).
- Add idempotency strategy for queue jobs to prevent duplicate processing.
- Keep Redis non-public unless strictly required, and lock down network access.
DEPLOYMENT_PLAN.md- production deployment phases and checklist.IMPROVEMENT_FINDINGS.md- pending hardening and quality improvements.AGENTS.md- contributor/agent workflow and project conventions.