Appearance
Getting Started
This walks through setting up the app on your machine. For production setup, see deployment.md.
1. Clone and install
bash
git clone <repo-url> my-app
cd my-app
bun install2. Configure environment variables
bash
cp .env.example .envFill in .env. See environment-variables.md for what every variable does - the short version for local dev:
DATABASE_URLandREDIS_URLalready match the services started in the next step, no changes needed.BETTER_AUTH_SECRET- generate one:openssl rand -base64 32.BETTER_AUTH_URL- leave ashttp://localhost:3000.INNGEST_APP_ID- any string.NEXT_PUBLIC_INNGEST_BASE_URL- leave ashttp://localhost:8288.- Everything else (OAuth,
OPENROUTER_API_KEY, Polar) is optional - leave unset to skip that integration for now.
3. Start external services
PostgreSQL, Redis, and the Inngest dev server are configured in docker-compose.yml:
bash
docker compose up -dThis starts:
- Postgres on
:5432 - Redis on
:6379 - Inngest dev server on
:8288- polls your locally-running Next.js app (bun run dev) at/api/inngestto discover background job functions. Dashboard: http://localhost:8288.
To stop the services:
bash
docker compose down # stop containers, keep data
docker compose down -v # stop containers and delete dataPrefer running Inngest without Docker? Use
bun run dev:allinstead ofbun run devin step 6 - it runs the Next.js dev server andinngest-cli devtogether viamprocs. Just make sure the Dockerinngestcontainer isn't also running, since both bind port8288.
4. Set up the database
bash
bun run prisma:migrate # creates DB tables
bun run prisma:generate # generates the TypeScript clientSee database.md for the schema and migration workflow in more detail.
5. Configure Polar.sh (optional)
Skip this to run without payments - see auth-and-billing.md for what changes when Polar is left unconfigured. To enable it:
- Create an account at polar.sh
- Create a product (e.g. "Pro Plan")
- Copy your Product ID and replace
YOUR_PRODUCT_IDinsrc/lib/auth.ts - Set
POLAR_ACCESS_TOKEN,POLAR_SUCCESS_URL, andPOLAR_SERVER=sandboxin.env
6. Configure OAuth providers (optional)
See auth-and-billing.md for the Google Cloud Console / GitHub Developer Settings steps.
7. Start development
bash
bun run dev # Next.js on :3000 - Inngest dev server is already running via Docker (step 3)Open http://localhost:3000 - you'll be redirected to /dashboard. Sign up to create your first account.
Try the background job demo at /demo/inngest - click "Trigger Job" and watch it execute step-by-step on the Inngest dashboard. The other demos live under /demo/* in the sidebar (AI chat, booking wizard, customers table, posts CRUD) - see features.md for what each one demonstrates.
Reading these docs as a website
This docs/ folder is also a VitePress site (nav, sidebar, search) - you don't need it just to read the Markdown files on GitHub, but it's nicer for browsing:
bash
bun run docs:dev # local dev server with hot reload
bun run docs:build # static build to docs/.vitepress/dist
bun run docs:preview # serve the production build locallyWindows + Bun troubleshooting: if
docs:dev/docs:buildfails with something likeCannot find module @rollup/rollup-win32-x64-msvcor@esbuild/win32-x64 could not be found, Bun has installed the wrong CPU-architecture binary for one of Vite's native dependencies (a known Bun issue on some Windows setups - the same class of bug this template already works around for@parcel/watcherinpackage.json). Fix it with:bashbun install --minimum-release-age=0If that still doesn't pull the right binary, delete
node_modules/@rollupandnode_modules/@esbuild, then reinstall the same way.
Next steps
architecture.md- stack overview, request flow, where everything lives.features.md- tour of the existing demo features and how to add your own.deployment.md- making this production-ready.