AI Image-to-Video generation web frontend powered by ComfyUI.
Upload an image, write a prompt, and get a generated video delivered to Discord — with a queue, multi-model routing, and a full admin dashboard on top.
| Generation | Admin Dashboard |
|---|---|
![]() |
![]() |
-
Image-to-Video — Upload an image with a prompt, get a generated video
-
Multi-Model — Four workflow pipelines dispatched through a single capability-driven registry
Model End Image Audio Duration WAN 2.2 ✓ — 5–7s LTX (Anime) — ✓ 5–7s LTX (Real) ✓ ✓ 5–7s L+W (LTX + WAN hybrid) ✓ ✓ 5–8s -
Queue System — Serializable queue with atomic position assignment and real-time status tracking
-
LoRA Presets & Bundles — Drag-and-drop preset management, per-model availability gated by capability flags
-
Audio Presets — Upload and reuse audio clips for audio-capable models
-
Prompt Translation — Built-in translation endpoint for non-English prompts
-
Discord Integration — OAuth2 auth + in-process bot delivery of completed videos
-
Admin Dashboard — Model activation toggles, queue control and pause scheduling, live log viewer (SSE), ComfyUI monitoring, DB browser
-
Multi-Server — Auto-selects between local and cloud (RunPod) ComfyUI instances
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, TailwindCSS 4, Shadcn/ui |
| Backend | Next.js API Routes, Prisma 6, SQLite |
| Auth | Custom Discord OAuth2 (HttpOnly cookie sessions) |
| Validation | Zod v4 schemas across all route handlers |
| AI Backend | ComfyUI API (JSON workflow graphs) |
| Bot | Discord.js (in-process) |
| Testing | Vitest, SQLite test DB, route handler direct invocation |
| Logging | Custom unified logger (server + client → files + SSE) |
| Deployment | systemd + Nginx + SSL (Next.js standalone) |
src/
├── app/
│ ├── api/ # 46 API route handlers
│ │ ├── i2v/ # Video generation endpoint
│ │ ├── queue/ # Queue management + monitoring
│ │ ├── admin/ # Protected admin routes
│ │ └── auth/ # Discord OAuth2 flow
│ ├── i2v/ # Generation page
│ ├── admin/ # Admin dashboard
│ ├── profile/ # User profile
│ └── settings/ # User settings
├── lib/
│ ├── comfyui/ # Queue/job monitors, server management
│ │ └── workflows/ # Per-model builders (wan, ltxa, ltxr, ltx-wan) + registry
│ ├── database/ # Prisma service layer
│ ├── auth/ # Session management, withAuth/withAdmin HOF
│ ├── validations/ # Zod schemas + parse helpers
│ └── logger.ts # Client-safe unified logger
├── components/ # Shadcn/ui base + domain components
├── contexts/ # React Context (session, form state)
└── hooks/ # Custom React hooks
tests/
├── integration/api/ # Route handler tests (real DB sessions)
└── unit/ # Module tests
npm install
npm run prisma:migrate # Set up database
npm run dev # Dev server
npm test # 515 tests
npm run type-check # tsc --noEmit
npm run lint # ESLintRuns as a systemd service with Next.js standalone output. Environment variables live in .env (not version controlled — see .env.example for the template).
Production uses .env.production loaded via systemd EnvironmentFile.
npm run build
# Deploy .next/standalone + .next/static + public to target
# systemd EnvironmentFile loads .env.production
# ExecStart: node .next/standalone/server.js- ComfyUI workflows are JSON node graphs — each model has a completely different structure, dispatched via
workflow-router.ts - Model capabilities (end image, audio, duration, LoRA) live in a single registry that gates both UI and API validation
- Queue uses Serializable isolation for atomic position assignment
- Logger is split:
logger.tsstays client-safe (nofs), file I/O inlogger-file.tsconnected viainstrumentation.ts - Discord bot runs in-process (not a separate service)
- All state singletons use
globalThisto survive Next.js dev hot reload


