An AI-powered workflow automation platform built with Next.js, enabling users to create, manage, and execute automated workflows with integrations to popular services like Discord, Slack, Notion, and Google Drive.
- 🔄 Visual Workflow Editor - Drag-and-drop interface for building automation workflows
- 🤖 AI Integration - Connect to OpenAI, Anthropic, Google AI, and local Ollama models
- 🔗 Service Connections - Discord, Slack, Notion, Google Drive integrations
- 📊 Cost Tracking - Monitor AI usage and set budget alerts
- 📝 Execution Logs - Track workflow runs with detailed logs
- 🔐 Authentication - Secure user authentication with Clerk
- 💳 Billing - Stripe integration for subscription management
- Framework: Next.js 14 (App Router)
- Database: PostgreSQL with Prisma ORM
- Authentication: Clerk
- Payments: Stripe
- Styling: Tailwind CSS + shadcn/ui
- State Management: Zustand
- Node.js 18+ or Bun
- PostgreSQL database
- Clerk account
- (Optional) Stripe account for billing
git clone https://github.com/yourusername/flow-lab.git
cd flow-labnpm install
# or
bun installCopy the example environment file:
cp .env.example .env.localEdit .env.local and configure the required variables:
# Required: Clerk Authentication
# Get from: https://dashboard.clerk.com
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxxxx
CLERK_SECRET_KEY=sk_test_xxxxx
# Required: Database Connection
# Format: postgresql://USER:PASSWORD@HOST:PORT/DATABASE
DATABASE_URL=postgresql://user:password@localhost:5432/flowlab
DIRECT_DATABASE_URL=postgresql://user:password@localhost:5432/flowlab
# Optional: Stripe (for billing features)
STRIPE_SECRET=sk_test_xxxxx# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev
# (Optional) Seed the database
npx prisma db seednpm run dev
# or
bun devOpen http://localhost:3000 to see the application.
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Yes | Clerk publishable key |
CLERK_SECRET_KEY |
Yes | Clerk secret key |
DATABASE_URL |
Yes | PostgreSQL connection string |
DIRECT_DATABASE_URL |
Yes | Direct PostgreSQL connection (same as DATABASE_URL for local dev) |
STRIPE_SECRET |
No | Stripe secret key for billing |
GOOGLE_CLIENT_ID |
No | Google OAuth client ID |
GOOGLE_CLIENT_SECRET |
No | Google OAuth client secret |
DISCORD_CLIENT_ID |
No | Discord OAuth client ID |
DISCORD_CLIENT_SECRET |
No | Discord OAuth client secret |
SLACK_BOT_TOKEN |
No | Slack bot token |
NOTION_API_SECRET |
No | Notion integration secret |
OPENAI_API_KEY |
No | OpenAI API key for AI features |
ANTHROPIC_API_KEY |
No | Anthropic API key for Claude |
GOOGLE_API_KEY |
No | Google AI (Gemini) API key |
src/
├── app/ # Next.js App Router pages
│ ├── (main)/ # Main app layout
│ │ └── (pages)/ # Dashboard pages
│ │ ├── billing/ # Billing & subscription
│ │ ├── connections/ # Service connections
│ │ ├── dashboard/ # Main dashboard
│ │ ├── logs/ # Execution logs
│ │ ├── settings/ # User settings
│ │ └── workflows/ # Workflow editor
│ ├── api/ # API routes
│ └── auth/ # Authentication pages
├── components/ # React components
│ ├── global/ # Global components
│ ├── ui/ # shadcn/ui components
│ └── ...
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── providers/ # React context providers
└── store.tsx # Zustand store
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run test # Run tests
npx prisma studio # Open Prisma database viewer- Push your code to GitHub
- Import the project to Vercel
- Configure environment variables in Vercel dashboard
- Deploy
See DEPLOYMENT.md for detailed deployment instructions.
MIT