A modern AI workflow automation app built with Next.js 15, React 19, Prisma, and PostgreSQL. Design and run workflows, manage triggers and actions, and monitor executions with a beautiful, responsive UI.
Stripe billing has been disabled and fully removed from the frontend. Paid plan UI remains for demonstration and links to Contact Sales.
- Next.js 15 (App Router)
- React 19
- TypeScript
- Prisma ORM (PostgreSQL)
- NextAuth for authentication
- Tailwind CSS 4
- Radix UI components
LangFlow/
├─ frontend/ # Next.js app
│ ├─ prisma/ # Prisma schema & migrations (frontend DB)
│ ├─ src/
│ │ ├─ app/ # Next.js app router routes
│ │ │ ├─ api/ # API routes
│ │ │ │ ├─ actions/ # Example action endpoints
│ │ │ │ ├─ hooks/ # Webhook catch endpoints
│ │ │ │ ├─ stripe/ # Stubbed billing endpoints (disabled)
│ │ │ │ └─ workflows/ # Workflow APIs
│ │ │ ├─ (pages...) # UI routes (dashboard, pricing, etc.)
│ │ ├─ components/ # UI components
│ │ ├─ lib/ # Server-side utilities (auth, prisma, etc.)
│ │ └─ styles/ # Global styles
│ ├─ package.json
│ └─ tsconfig.json
└─ hooks/ # Server-side workflow engine package
├─ prisma/ # Prisma schema & migrations (hooks DB)
├─ src/
│ ├─ workflow-engine.ts # Core engine
│ └─ index.ts # Exports
├─ package.json
└─ tsconfig.json
- Node.js 18+
- PostgreSQL database
Create a .env file under frontend/ with:
# Database
DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DB_NAME
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-strong-random-secret
# App
APP_URL=http://localhost:3000
Stripe keys are not needed because billing is disabled.
- Install dependencies
# From repo root (recommended)
npm install --workspaces
# Or install inside each package
cd frontend && npm install
cd ../hooks && npm install
- Generate Prisma client and run migrations
# Frontend database
cd frontend
npm run prisma:generate # or `npx prisma generate`
npx prisma migrate deploy
- Seed (optional)
npm run seed
- Run the dev server
npm run dev
# App at http://localhost:3000
- dev: start Next.js dev server
- build: prisma generate + next build
- start: start Next.js in production mode
- lint: next lint
- seed: run
prisma/seed.ts - vercel-build: prisma generate + prisma migrate deploy + next build
- Prisma schema:
frontend/prisma/schema.prisma - Generate client:
npx prisma generate - Migrate (prod):
npx prisma migrate deploy - Migrate (dev):
npx prisma migrate dev --name <migration_name>
The hooks/ package also has a Prisma schema for workflow engine–related data. If you use that package separately, configure its .env and migrations similarly.
- NextAuth is configured in
frontend/src/lib/auth.tsandapp/api/auth/[...nextauth]/route.ts - Default providers include email/password (via custom endpoints) and can be extended
app/api/workflowsandapp/api/workflows/[id]manage workflowsapp/api/actions/send-gmaildemonstrates a sample actionapp/api/hooks/catch/[userId]/[workflowId]receives workflow eventsapp/api/stripe/*are stubs returning disabled responses
- All Stripe client code is removed/stubbed.
- Pricing page shows "Contact Sales" for paid plans.
- To re-enable billing later, reintroduce the Stripe SDK, API routes, and environment variables.
- React Server Components (RSC) + App Router are used; keep server-only code in
src/lib/and API routes. - Components that use hooks like
useSessionmust be client components ('use client'). - Keep Prisma client as a singleton to avoid hot-reload issues (see
src/lib/prisma.ts).
- The project is ready for platforms like Vercel.
- On deploy, ensure the following are set:
DATABASE_URLNEXTAUTH_URLNEXTAUTH_SECRETAPP_URL
- Billing keys (Stripe) are not required.
- Migration errors: ensure your
DATABASE_URLis correct and the database is reachable. - TypeScript build failures: check for stale imports after enabling/disabling features.
- NextAuth callback URLs: ensure
NEXTAUTH_URLmatches your deployed origin.
Made with love by Alok Dangre