This repository is a Zapier-style workflow automation platform built as a Turbo monorepo. Users can sign up, create Zaps with one trigger and multiple ordered actions, publish them, and invoke webhook URLs that create ZapRun jobs for downstream processing.
apps/web: Next.js frontend for auth, dashboard, and the Zap editorapps/server: Express API for auth, triggers, actions, and Zap CRUDapps/hooks: Webhook ingress service that createsZapRunandZapRunOutboxrecordsapps/processor: Outbox poller that publishes pending Zap runs to Kafka
packages/db: Prisma schema and shared Prisma clientpackages/kafka: shared Kafka clientpackages/email: email utility used during signuppackages/types: shared Zod schemas and TypeScript typespackages/ui: shared React UI componentspackages/utils: shared frontend helpers
web (3000) -> server (5000) -> postgres
|
v
hooks (8000) -> zap_run_outbox
|
v
processor -> kafka (9092)
Main request flow:
- Users authenticate in
web. webcallsserverto create or update Zaps.- Each Zap has one trigger and many ordered actions.
- External systems hit
hooksusing the generated webhook URL. hookswrites aZapRunand matchingZapRunOutboxrecord in one transaction.processorreads pending outbox rows and publishes them to Kafka.
- Node.js 20+ recommended
- npm
- PostgreSQL
- Kafka running locally on
localhost:9092
Create environment files before starting the services.
Root or service-level variables you will need:
DATABASE_URL="postgresql://USER:PASSWORD@localhost:5432/zapier"
JWT_SECRET="replace-me"
SERVER_PORT=5000
HOOKS_PORT=8000
SMTP_HOST="smtp.gmail.com"
SMTP_USER="your-email@example.com"
SMTP_PASSWORD="your-app-password"
SENDER_EMAIL="your-email@example.com"The frontend currently uses hardcoded local API URLs:
http://localhost:5000for the APIhttp://localhost:8000for webhook URLs
npm install
npx prisma generate --schema packages/db/prisma/schema.prisma
npx prisma db push --schema packages/db/prisma/schema.prismaIf you use sample trigger/action rows, seed them before opening the editor. The UI expects AvailableTriggers and AvailableActions data to exist in the database.
Run the apps in separate terminals if Turbo is unavailable locally:
npm run devOr per app:
npm --workspace apps/web run dev
npm --workspace apps/server run dev
npm --workspace apps/hooks run dev
npm --workspace apps/processor run devDefault local ports:
web:3000server:5000hooks:8000kafka:9092
npm run build
npm run check-types
npm run lint
npm run format- The frontend assumes local development URLs and does not yet read API hosts from environment variables.
- Signup sends a confirmation email; if SMTP is not configured, signup may still create the user but email delivery will fail.
- The processor only publishes queued Zap runs to Kafka. Action execution consumers are not implemented in this repository.
apps/
web/
server/
hooks/
processor/
packages/
db/
kafka/
email/
types/
ui/
utils/