Workflow automation tool (n8n-style) built with Next.js.
Create workflows, manage them in a dashboard, and run background jobs through Inngest.
- App Router + tRPC for the app/API layer
- Prisma + Postgres for persistence
- better-auth for authentication
- Inngest for background functions
- Polar integration for billing/subscriptions
- Install dependencies:
npm install- Configure local settings using
.env.example.
cp .env.example .envNotes:
npm run dev:allandnpm run ngrok:devusedotenv-cli, which loads env vars from.envby default.- Next.js will also read
.envautomatically (you can still use.env.localif you want, but keep.envin sync for the scripts above).
This project uses a local Postgres database via Docker Compose.
Start Postgres (standalone):
npm run db:upOr run everything together (starts Postgres too):
npm run dev:allSet DATABASE_URL in .env.local to match the Compose config (see docker-compose.yml):
DATABASE_URL="postgresql://nodebase_user:nodebase_pass@localhost:5433/nodebase"Stop Postgres:
npm run db:down- Set up the database:
npx prisma migrate dev && npx prisma generate- Run everything (recommended):
npm run dev:allnpm run dev:all uses mprocs.yaml to start the Next.js dev server, Inngest dev server, Prisma Studio, ngrok, and the local Postgres DB (Docker Compose).
Some triggers (e.g. the Google Form trigger) need a public URL so external services can call back into your local dev server. This repo uses ngrok to expose http://localhost:3000 to the internet.
- Install + authenticate ngrok:
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken <YOUR_NGROK_AUTHTOKEN>- Configure env vars in
.env.local:
NGROK_URL: your ngrok domain host (no protocol), e.g.my-app.ngrok-free.devNEXT_PUBLIC_APP_URL: the public base URL used to generate webhook URLs in the UI, e.g.https://my-app.ngrok-free.dev
Example:
NGROK_URL="my-app.ngrok-free.dev"
NEXT_PUBLIC_APP_URL="https://my-app.ngrok-free.dev"- Start the tunnel:
- With everything:
npm run dev:all(starts ngrok via mprocs.yaml) - Ngrok only:
npm run ngrok:dev
Notes:
npm run ngrok:devrunsngrok http --url=$NGROK_URL 3000, which expects you to have a static/reserved domain configured in ngrok.- If you use a random ngrok URL instead of a reserved one, remember to also update
NEXT_PUBLIC_APP_URLso newly generated webhook URLs point to the correct domain. - If Next.js warns about cross-origin dev requests from your ngrok domain, you may need to add your ngrok host to Next.js
allowedDevOriginsin next.config.ts.
- If you already have Postgres running on your machine, Compose uses
localhost:5433to avoid clashing with the default5432. - To wipe local DB data completely, run
docker compose down -v(this removes thenodebase_pgdatavolume).
npm run dev(Next.js)npm run inngest:dev(Inngest)npm run studio(Prisma Studio)npm run db:up/npm run db:up:d/npm run db:down(Local Postgres via Docker)npm run lint/npm run lint-format(Biome)
- The app redirects
/→/workflows