Skip to content

Quick start

This guide gets you from a fresh clone to a running /api/v1/* service against the Firebase emulators in about 5 minutes.

  • Node.js 22+
  • Firebase CLInpm install -g firebase-tools
  • (Optional) A Firebase project if you want to run against real Firebase instead of the emulators.
Terminal window
git clone https://github.com/bbthorson/vox-pop-core.git
cd vox-pop-core
npm install

In one terminal:

Terminal window
npx firebase emulators:start --only auth,firestore,storage --project demo-vox-pop

The demo- project prefix tells the CLI not to require credentials — the emulators run entirely locally.

In a second terminal:

Terminal window
VOXPOP_USE_EMULATOR=true npm run dev -w @vox-pop/core-api

The service listens on http://localhost:8080. Smoke test:

Terminal window
curl http://localhost:8080/health
# → {"ok":true}
curl http://localhost:8080/
# → {"service":"vox-pop-core-api", ...}

Most /api/v1/* endpoints require an authenticated bearer token. For local exploration, mint an emulator ID token via the Firebase Auth emulator UI (http://localhost:9099), then:

Terminal window
curl http://localhost:8080/api/v1/users/me \
-H "Authorization: Bearer $ID_TOKEN"