Local Development

Run the full stack locally: emulator-backed Firestore, Turbopack dev server, and the standard troubleshooting playbook.

Prerequisites

Node 20.19+, pnpm 11, Python 3.11+ (backend), Java (Firestore emulator). Copy .env.firebase client keys into .env.local. For real cloud data, add a Firebase service-account (FIREBASE_CLIENT_EMAIL, FIREBASE_PRIVATE_KEY); otherwise the Firestore emulator covers local development.

Starting Everything

Run exactly ONE web server: pnpm dev (Turbopack) on http://localhost:3000. A second server (port 3001, or pnpm start against a stale build) serves old code and causes phantom 500s — kill duplicates before debugging anything. Start the Firestore emulator with firebase emulators:start --only firestore (port 9199) so sessions, keys, devices, and deliveries persist for real. Start the Python backend for /v1 proxy calls (JIRO_BACKEND_URL, default http://127.0.0.1:8000).

bash

Degraded Mode

With no emulator and no service-account key, the app stays up in degraded mode: sign-in works (JWT-only sessions), dashboard shows empty data with a FREE plan, API keys fall back to Firestore-only issuance, and every Firestore read fails over within ~5 seconds. Add credentials or start the emulator for full data. Watch /status (or GET /api/health) for live backend state.

Troubleshooting

• routes-manifest.json ENOENT / corrupt webpack cache → OneDrive is locking .next: use the Turbopack dev server and keep a single instance running. • Unable to detect a Project Id → emulator down and no admin credentials: start the emulator or add the service-account key. • Cannot issue API key: user record not found → stale pre-database session: sign out and back in (accounts self-heal on next request). • CSRF token missing on API POSTs → fetch GET /api/auth/csrf and send x-csrf-token. • Hydration mismatch naming rtrvr-* attributes → a browser extension mutating the DOM: the built-in scrubber handles it; allowlist localhost if it persists. • ssr: false is not allowed in Server Components → the file needs "use client" above the dynamic import.

Need help?

Check our error codes or reach out to the team.