Production-grade DAG-based AI workflow orchestration platform built with Next.js App Router, strict TypeScript, TailwindCSS, and ShadCN-style component primitives.
- DAG validation with Zod: cycle detection, required-input checks, strict handle type compatibility.
- Deterministic level-based scheduler:
- same dependency level runs in parallel
- dependent levels run sequentially
- Strict orchestration/execution split:
- orchestration in
lib/engine/* - worker task handlers in
lib/tasks/*
- orchestration in
- Trigger-style task mapping per node:
- LLM -> Gemini (
@google/generative-ai) - Upload Image/Video -> Uploadcare -> Cloudinary persistence
- Crop / Extract Frame -> FFmpeg worker abstraction
- LLM -> Gemini (
- React Flow workflow studio:
- collapsible node palette
- drag-and-drop node creation
- animated typed edges
- MiniMap + zoom/pan
- inline node outputs
- reactive inputs (connected handles override + disable manual entry)
- Run history panel with node-level logs and statuses for full/partial/single runs.
- Next.js 14 (App Router)
- TypeScript (strict mode)
- React Flow
- TailwindCSS
- ShadCN-style UI components
- MongoDB + Mongoose
- Zod
app/-> pages + route handlerscomponents/-> UI and workflow canvas componentslib/nodes/-> node contracts, registry, demo graphlib/engine/-> validation, scheduler, run/workflow storeslib/tasks/-> task dispatch and worker handlerslib/services/-> Gemini, Uploadcare/Cloudinary, FFmpeg adapterslib/db/-> Mongo connection and modelstrigger/-> task exports for worker runtime boundary
- Install dependencies:
npm install- Configure env:
cp .env.example .env.local-
Start MongoDB locally or provide hosted Mongo URI.
-
Start app:
npm run devMONGODB_URIMONGODB_DB_NAMEGEMINI_API_KEYUPLOADCARE_PUBLIC_KEYCLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRET
The app bootstraps a prebuilt Product Marketing Kit Generator workflow with:
- Branch A: image upload -> crop -> LLM description with text prompts
- Branch B: video upload -> frame extraction
- Convergence: final LLM consumes branch outputs for social marketing copy
- Push repository to GitHub.
- Import into Vercel.
- Add environment variables in Vercel dashboard.
- Deploy.
- Upload and FFmpeg handlers currently expose production integration points and can be routed to dedicated Trigger.dev worker infrastructure.
- Scheduler and worker handlers are intentionally decoupled for horizontal scaling.