Quick start
Run the local demo and configure your first customer intake.
Requirements
Use Node.js ^22.17.0, ^24.0.0, or >=26.0.0, and the repository's pnpm
version (currently 12.3.4). Wrangler runs local D1; no production database is
needed for the demo. apps/site is a separate pnpm workspace.
Install and initialize
Shellgit clone https://github.com/backrunner/onfire.gitcd onfirepnpm install --frozen-lockfilecp .dev.vars.example .dev.varscp .env.example .env.localopenssl rand -base64 48
Put your generated secret in .dev.vars as AUTH_SECRET. Keep the local
BETTER_AUTH_URL and routing domains aligned between both files. Then run:
Shellpnpm db:migrate:localpnpm db:seedpnpm db:seed:ticketspnpm dev
pnpm dev runs ToC at http://localhost:3000 and ToB at
http://localhost:3001. Alternatively use pnpm dev:toc and pnpm dev:tob
in separate terminals. The demo login is admin@local.onfire / admin.
pnpm db:reset deletes the local D1 state, migrates and reseeds it; use it only
when you intend to reset your local demo.
First configuration
- Sign in to the dashboard. Review the demo tenant, product and default team.
- Create or inspect a product-owned ticket type and its active form version.
- Assign active support agents to the routed team; an account role alone is not support-agent membership.
- Use a product key or identity resolver to open the customer portal.
- Configure optional email, AI and personal notification endpoints separately.
The portal requires a verified customer identity. The product API key must stay on your server; it is not a browser application secret. External providers, Vectorize and real Cloudflare mail need their own configured environment.
Verify
Shellpnpm cf-typegen --checkpnpm lintpnpm testpnpm build:worker
Local checks do not establish production email delivery or a remote Access policy. Continue with deployment for a real instance.