Skip to main content

Local Dev Environment

After completing the Getting Started guide, this is what your development environment looks like. Use this page to understand what each component is, where it runs, and how it connects to everything else.

Architecture at a Glance

Local dev environment architecture Everything in your environment spans three zones: your local machine (Docker Compose services), GCP (shared cloud infrastructure), and third-party services (SaaS APIs). The dev container is the hub — it holds your authenticated gcloud session and is the trust anchor that connects all three.

Component Map

Local — Docker Compose

These services run on your machine via docker-compose up -d. No cloud required to start them.
beads-backend is a local replica using a Dolt SQL Server running in Docker Compose. Team data for staging and production lives in dedicated GCP Dolt VMs — not accessible from local dev.

GCP — Shared Dev Infrastructure

These resources live in GCP project shokunin-480309 and are shared across the team. Your dev container connects to them via your authenticated gcloud session.
The dev-shared GCP environment does not run a Dolt VM or Beads API Cloud Run service — those exist in staging and production only. Local dev uses Docker Compose services (beads-api and beads-backend) exclusively.
Your personal Firestore database (dev-<handle>) was created by ./scripts/dev-setup when you applied your sandbox terraform. It is isolated from other developers’ databases.

Third-Party Integrations

These are SaaS APIs consumed by the platform. Tokens are stored in GCP Secret Manager and pulled into your .env by ./scripts/env-sync.

Connection Map

How the platform reaches each external system:

Secrets Reference

All secrets are populated into your .env by ./scripts/env-sync. This table shows where each one comes from and what uses it.

Identity & Access Summary

Who is authenticating as what when you work locally:
Your personal GCP user account has two roles on the project, both granted by your sandbox terraform (./scripts/dev-setup):
  • roles/secretmanager.secretAccessor — read secret values
  • roles/secretmanager.viewer — list secrets (required for env-sync to enumerate)
The serviceAccountTokenCreator binding (needed to impersonate the platform SA for terraform) is granted separately via foundation, before your sandbox is created.

Environment Variables Reference

For a complete list of all variables and their defaults, see .env.example in the repo root. To re-populate your .env at any time:
To force-update a specific variable that was already set, delete its line from .env and re-run.