Skip to content

Anshv784/Nodebase

Repository files navigation

Nodebase

Workflow automation tool (n8n-style) built with Next.js.

Create workflows, manage them in a dashboard, and run background jobs through Inngest.

What’s inside

  • 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

Local development

  1. Install dependencies:
npm install
  1. Configure local settings using .env.example.
cp .env.example .env

Notes:

  • npm run dev:all and npm run ngrok:dev use dotenv-cli, which loads env vars from .env by default.
  • Next.js will also read .env automatically (you can still use .env.local if you want, but keep .env in sync for the scripts above).

Local Postgres (Docker)

This project uses a local Postgres database via Docker Compose.

Start Postgres (standalone):

npm run db:up

Or run everything together (starts Postgres too):

npm run dev:all

Set 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
  1. Set up the database:
npx prisma migrate dev && npx prisma generate
  1. Run everything (recommended):
npm run dev:all

npm 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).

Ngrok (public URL for webhooks)

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.

  1. Install + authenticate ngrok:
brew install ngrok/ngrok/ngrok
ngrok config add-authtoken <YOUR_NGROK_AUTHTOKEN>
  1. Configure env vars in .env.local:
  • NGROK_URL: your ngrok domain host (no protocol), e.g. my-app.ngrok-free.dev
  • NEXT_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"
  1. Start the tunnel:
  • With everything: npm run dev:all (starts ngrok via mprocs.yaml)
  • Ngrok only: npm run ngrok:dev

Notes:

  • npm run ngrok:dev runs ngrok 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_URL so 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 allowedDevOrigins in next.config.ts.

Troubleshooting

  • If you already have Postgres running on your machine, Compose uses localhost:5433 to avoid clashing with the default 5432.
  • To wipe local DB data completely, run docker compose down -v (this removes the nodebase_pgdata volume).

Useful scripts

  • 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)

Routes

  • The app redirects //workflows

About

Nodebase – a node-based workflow automation platform for developers. Orchestrate APIs, background jobs, and integrations visually, similar to n8n, but with a focus on flexibility and performance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors