A workflow automation platform built with Turborepo that allows you to create automated workflows with triggers and actions (similar to Zapier).
This is a monorepo containing multiple applications and packages:
- web: Next.js frontend application (runs on port 3000)
- primary-backend: Express.js REST API backend (runs on port 3001)
- hooks: Express.js webhook service (runs on port 3002)
- processor: Kafka processor service for handling flow runs
- worker: Kafka worker service for executing actions (email, Solana transactions, etc.)
- @repo/database: Prisma-based database package with PostgreSQL schemas
- @repo/types: Shared TypeScript type definitions
- @repo/eslint-config: ESLint configurations
- @repo/typescript-config: Shared TypeScript configurations
Before running this application locally, ensure you have the following installed:
- Node.js >= 18
- npm 10.6.0 or higher
- PostgreSQL database
- Apache Kafka (for processor and worker services)
git clone <repository-url>
cd WebFlowsnpm installCreate a .env file in the root directory and configure the following:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/webflows?schema=public"
# Backend URLs (for web app)
BACKEND_URL="http://localhost:3001"
HOOKS_URL="http://localhost:3002"
# JWT Secret (optional, for backend)
# JWT_PASSWORD="your-secret-key"Additional environment variables may be required for:
- Worker service: Email configuration (SMTP settings) and Solana wallet credentials
- Processor/Worker: Kafka broker configuration
Run Prisma migrations to set up your PostgreSQL database:
cd packages/database
npx prisma migrate dev
npx prisma generate
cd ../..Make sure Apache Kafka is running on your system. If using Docker:
docker run -d --name kafka -p 9092:9092 apache/kafka:latestRun all applications in development mode:
npm run devThis will start:
- Web app at
http://localhost:3000 - Primary backend at
http://localhost:3001 - Hooks service at
http://localhost:3002 - Processor service
- Worker service
To run individual applications:
# Web app only
npm run dev --filter=web
# Backend only
npm run dev --filter=primary-backend
# Hooks service only
npm run dev --filter=hooks
# Worker service only
npm run dev --filter=worker
# Processor service only
npm run dev --filter=processorOpen your browser and navigate to:
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:3001/api/v1 - Hooks endpoint:
http://localhost:3002/hooks
Build all apps and packages:
npm run buildStart production servers:
npm run startnpm run dev- Start all apps in development modenpm run build- Build all apps and packagesnpm run start- Start all apps in production modenpm run lint- Lint all apps and packagesnpm run format- Format code with Prettier
- Frontend: Next.js 14, React, TailwindCSS, TypeScript
- Backend: Express.js, TypeScript
- Database: PostgreSQL with Prisma ORM
- Message Queue: Apache Kafka (KafkaJS)
- Integrations: Solana Web3.js, Nodemailer
- Monorepo: Turborepo
WebFlows/
├── apps/
│ ├── web/ # Next.js frontend
│ ├── primary-backend/ # Express.js API
│ ├── hooks/ # Webhook service
│ ├── processor/ # Kafka processor
│ └── worker/ # Action worker
├── packages/
│ ├── database/ # Prisma schemas
│ ├── types/ # Shared types
│ ├── eslint-config/ # ESLint configs
│ └── typescript-config/ # TypeScript configs
└── turbo.json # Turborepo configuration
Comprehensive API documentation is available in API_DOCS.md.
The documentation includes:
- All REST API endpoints
- Request/response schemas
- Authentication details
- Example usage with curl commands
- Error handling
- Webhook integration guide
Learn more about the technologies used: