Fastest safe path for you to run the app, understand the auth bootstrap flow, and avoid the common local setup traps.
- Node.js 18+
- npm
- two terminal tabs
npm installcp .env.example .envLocal development rules:
- Leave
NODE_ENVunset in.env - Keep
ALLOW_DEMO_MODE=trueunless you are explicitly testing a stricter setup - Use the default frontend origin
http://localhost:5173
Why: the backend falls back to localhost-safe CORS defaults in dev. If you force NODE_ENV=production in .env, you will break that behavior and usually end up with browser Failed to fetch errors.
npm run start:devBackend default:
http://localhost:3001
In a second terminal:
npm run devOpen:
http://localhost:5173
Important:
- If Vite jumps to
5174, the backend CORS defaults will not match. - Kill the stale frontend process and restart so Vite comes back on
5173.
The app stores accounts in data/accounts.json, created at runtime by the backend.
Bootstrap behavior:
- if no accounts exist, the first successful registration becomes
admin - after that, only an authenticated admin can create more users
- admins can either invite users by email or create them directly in Settings
Run this once after booting the app:
- Register the first admin account.
- Sign out and sign back in.
- Run a plain-English test prompt.
- Paste a Jira key or URL if Jira credentials are configured.
- Open Settings and verify admin-only user management is visible.
- Trigger forgot-password and confirm the UX path works.
You can develop most of the UI without real credentials.
Demo mode:
ALLOW_DEMO_MODE=true- no real OpenAI/QA Backend/Jira requirement
- invite/reset email links fall back to backend-side demo behavior when Customer.io is not configured
Live mode in local dev:
- fill in the relevant keys in
.env - restart the backend after env changes
Most useful variables:
OPENAI_API_KEYQA_BACKEND_API_BASE_URLQA_BACKEND_API_KEYJIRA_BASE_URLJIRA_EMAILJIRA_API_TOKENSLACK_WEBHOOK_URLZOHO_CLIQ_WEBHOOK_URLCUSTOMERIO_APP_API_KEYCUSTOMERIO_INVITE_TEMPLATE_IDCUSTOMERIO_RESET_TEMPLATE_IDAPP_PUBLIC_URL
npm test
npm run build
npm run checklistIf you want to inspect runtime mode quickly:
curl http://localhost:3001/healthUse this only when validating production config behavior.
cp .env.production.example .env.productionFill in real values, then run:
npm run start:prodWhat this does:
- Refuses to start without
.env.production - Runs
npm run check:prod - Starts the backend with
NODE_ENV=productionon the child process only
For the frontend:
npm run build
npm run previewThis project is not yet designed for multi-instance deployment.
- account data is stored in a local JSON file
- rate limits are in-memory per process
- concurrent writes are not coordinated across multiple Node instances
For day-to-day local development, that is fine. For a broader internal deployment, developers should treat this as a single-instance service until persistence and rate limiting move to shared infrastructure.
Failed to fetch in the browser:
- confirm the backend is running on
3001 - confirm Vite is running on
5173 - confirm
NODE_ENVis not set in.env - confirm the frontend backend URL in Settings is still
http://localhost:3001
npm run start:prod fails immediately:
.env.productionis missing- required production env vars are still placeholders
ALLOW_DEMO_MODEis stilltrue- no admin account exists in
data/accounts.json
No invite or reset emails arrive:
- if Customer.io is not configured, expect demo-only behavior
- check backend logs first
- confirm
APP_PUBLIC_URLmatches the frontend origin users should open