Local Setup Reference
This page is a complete reference for local development configuration. For the step-by-step setup guide, see Getting Started.Environment Variables Reference
All variables are sourced from.env.example. Copy to .env.local before running:
Core Settings
| Variable | Default | Description |
|---|---|---|
CGO_ENABLED | 1 | Must be 1 — enables native Go bindings for bd (Beads CLI) |
Firebase Configuration
| Variable | Description |
|---|---|
NEXT_PUBLIC_FIREBASE_API_KEY | Firebase Web API key |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN | Firebase auth domain |
NEXT_PUBLIC_FIREBASE_PROJECT_ID | Firebase project ID |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET | Firebase Storage bucket |
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID | Firebase Messaging sender ID |
NEXT_PUBLIC_FIREBASE_APP_ID | Firebase App ID |
NEXT_PUBLIC_FIREBASE_DATABASE_ID | Firestore database ID |
Firebase Emulator (Optional)
Uncomment in.env.local for fully offline development:
| Variable | Description |
|---|---|
NEXT_PUBLIC_FIREBASE_USE_EMULATOR | Set to true to use local Firebase emulator |
NEXT_PUBLIC_FIREBASE_EMULATOR_HOST | Emulator host (default: localhost) |
NEXT_PUBLIC_FIREBASE_EMULATOR_PORT | Emulator port (default: 8080) |
External Service Tokens
| Variable | Description |
|---|---|
GITHUB_TOKEN | GitHub personal access token |
ERASER_API_TOKEN | Eraser MCP API token (diagram generation) |
BASEHUB_TOKEN | BaseHub CMS token |
LIVEBLOCKS_SECRET_KEY | Liveblocks real-time collaboration key |
Docs MFE
| Variable | Default | Description |
|---|---|---|
DOCS_MODE | placeholder | Controls /docs route behavior: placeholder | redirect | embed |
DOCS_URL | https://docs.shokunin.app | External Mintlify docs URL |
Production / Cloud Run
| Variable | Description |
|---|---|
GOOGLE_SERVICE_ACCOUNT_KEY | GCP service account JSON key (single line) for Cloud Run OIDC auth |
Terraform (Local Applies Only)
| Variable | Description |
|---|---|
TF_VAR_dolt_db_password | Dolt DB password for ./terraform/scripts/tf apply |
TF_VAR_beads_api_key | Beads API key for Terraform applies |
Docker Compose Services
docker-compose.yml defines three services:
beads-backend
Dolt SQL Server — the persistent data store for Beads (task tracking).
- Image: Custom (
./infrastructure/beads-backend) - Host port:
3307→ container port3306 - Volume:
beads-data(persists Dolt data across container restarts) - Environment:
DOLT_ROOT_PASSWORD=beads(local dev password)
beads-api
Beads HTTP API — consumed by the bd CLI and (in future) the platform web app.
- Image: Custom (
./infrastructure/beads-api) - Host port:
8080 - Database:
beads_v0-shokunin-ai-platformonbeads-backend - Auth: Open/dev mode locally (
BEADS_API_KEYnot set)
platform-web
The Next.js frontend (Shokunin Platform web app).
- Host port:
3000 - Command:
bun run dev(hot reload enabled) - Note: For active development, run
bun run devdirectly instead
Beads CLI Configuration
After starting the Docker services, configurebd to connect to your local Dolt backend:
infrastructure/beads-backend/README.md.
Troubleshooting
bd fails with native binding errors
- Set
CGO_ENABLED=1in your shell or.env.local
- Another MySQL/Dolt instance is running. Stop it or edit the port mapping in
docker-compose.yml
- Check
.env.localhas valid Firebase credentials - For local dev: use Firebase emulator (uncomment emulator vars)
- See
infrastructure/beads-backend/README.mdfor initializing the Dolt database schema