-
-
Notifications
You must be signed in to change notification settings - Fork 151
Full Stack Development
Kimin Kim edited this page Feb 4, 2026
·
3 revisions
We use Docker and Docker Compose V2 to run the app locally using containers. To build and run the full app with a snapshot of the dev database:
yarn compose up --buildor
yarn dev:up- Firebase emulators run functions code and a local Firestore instance, seeded with a snapshot of the development environment
- A Typesense container runs local search
- A Next.js container builds and serves the frontend with hot-reload
- A Typescript container watches the functions directory and rebuilds on save
- Purpose: Runs the Firebase emulators for Functions, Firestore, Auth, and Storage.
-
Details:
- Executes your Cloud Functions code locally.
- Provides a local Firestore instance, seeded with a snapshot of the development database for testing.
- Shares the project directory with other containers for live code updates.
- Health check ensures the emulators are ready before dependent services start.
- Purpose: Runs a local Typesense search engine.
-
Details:
- Provides full-text search capabilities for bills, hearings, and testimonies.
- Use the API key
test-api-keyfor local access. - Data is persisted in a Docker volume so your search collections survive container restarts.
- Health check ensures Typesense is available before dependent services start.
- Purpose: Builds and serves the Next.js frontend with hot-reload.
-
Details:
- Watches for code changes and instantly reloads the frontend.
- Connects to the local Firebase emulators and Typesense container
-
Purpose: Watches the
/functionsdirectory and rebuilds Cloud Functions automatically on save. -
Details:
- Ensures your local Cloud Functions code is always up-to-date without manual rebuilds.
- Purpose: One-time run that populates Typesense collections for bills, hearings, and testimonies.
-
Details:
- Runs the backfill script (
yarn dev:backfill) after both Firebase and Typesense are healthy.- This calls pub/sub function
checkSearchIndexVersion, which will compare the schema on the dev/local environment, based on env variables and update them if necessary
- This calls pub/sub function
- Reads from the local Firestore emulator and writes to the local Typesense instance.
- Ensures your search collections are populated with realistic data for development and testing.
- Runs the backfill script (
-
yarn typesense-admin -e local consolestarts a node console with aclientglobal for the local environment. -
yarn firebase-admin -e local consolestarts a node console withfirebase,db,auth,admin, andapi(MA Legislature API) globals for the local environment.