An AI-powered workflow automation platform built with Next.js, enabling users to create visual workflows that connect various services and AI models. Similar to n8n, but with a focus on AI integration.
- Visual Workflow Editor - Drag-and-drop interface powered by React Flow
- AI Integration - Support for OpenAI, Anthropic (Claude), and Google Gemini
- Multiple Integrations:
- Triggers: Manual, Google Forms, Stripe webhooks
- Actions: HTTP Request, Discord, Slack
- Secure Credential Management - Encrypted storage for API keys and credentials
- Execution Tracking - Monitor workflow executions with real-time status updates
- Background Processing - Powered by Inngest for reliable workflow execution
- User Authentication - Secure authentication with Better Auth
- Framework: Next.js 15 (App Router)
- UI: React 19, Tailwind CSS, Radix UI
- Database: PostgreSQL with Prisma ORM
- Authentication: Better Auth
- API: tRPC
- State Management: Jotai, TanStack Query
- Workflow Engine: Inngest
- Visual Editor: React Flow (@xyflow/react)
- Code Quality: Biome (linting & formatting)
- Node.js 20+
- PostgreSQL database
- npm, yarn, pnpm, or bun
git clone https://github.com/kiralightyagami/n7n.git
cd n7nnpm install
# or
yarn install
# or
pnpm install
# or
bun installcp .env.example .env# Generate Prisma Client
npx prisma generate
# Run migrations
npx prisma migrate devnpm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 in your browser.
In a separate terminal, run:
npm run inngest:devnpm run dev- Start the Next.js development servernpm run build- Build the application for productionnpm run start- Start the production servernpm run lint- Run Biome linternpm run format- Format code with Biomenpm run inngest:dev- Start Inngest development server
n7n/
├── prisma/ # Database schema and migrations
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js app router pages
│ │ ├── (auth)/ # Authentication pages
│ │ ├── (dashboard)/ # Dashboard pages
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ ├── ui/ # UI component library
│ │ └── react-flow/ # Workflow editor components
│ ├── features/ # Feature modules
│ │ ├── auth/ # Authentication
│ │ ├── credentials/# Credential management
│ │ ├── editor/ # Workflow editor
│ │ ├── executions/ # Workflow execution
│ │ ├── triggers/ # Trigger components
│ │ └── workflows/ # Workflow management
│ ├── ingest/ # Inngest functions and channels
│ ├── lib/ # Utility libraries
│ └── trpc/ # tRPC routers and setup
└── README.md
Create visual workflows by connecting nodes. Each workflow consists of:
- Nodes: Individual steps in your workflow (triggers, actions, AI models)
- Connections: Links between nodes that define data flow
- Credentials: Secure API keys stored encrypted in the database
Triggers:
- Manual Trigger - Manually start workflows
- Google Form Trigger - Trigger on form submissions
- Stripe Trigger - Trigger on Stripe webhook events
Actions:
- HTTP Request - Make HTTP requests
- OpenAI - Use OpenAI models
- Anthropic - Use Claude models
- Gemini - Use Google Gemini models
- Discord - Send messages to Discord
- Slack - Send messages to Slack
Every workflow run creates an execution record that tracks:
- Execution status (Running, Success, Failed)
- Start and completion times
- Error messages and stack traces
- Output data
This project uses Prisma with PostgreSQL. Key models include:
User- User accountsWorkflow- Workflow definitionsNode- Individual workflow nodesConnection- Links between nodesCredential- Encrypted API credentialsExecution- Workflow execution records
- Next.js Documentation
- Prisma Documentation
- Inngest Documentation
- React Flow Documentation
- tRPC Documentation
[Add your license here]