Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
Local Development
This page covers three local-dev modes — choose based on what you’re iterating on. The Quickstart uses Kind; this page also covers the docker-compose loop (faster) and port-forward to a shared dev cluster (slowest, but real platform).Pick a mode
| Mode | Use when | Setup time | Iteration time |
|---|---|---|---|
| docker-compose | Iterating on your service code only; platform services can be mocked or stubbed | ~2 min | <5s (hot reload) |
| Kind | You need a real Kubernetes context (probes, configmaps, ingress) | ~5 min | ~30s per redeploy |
| Port-forward to shared dev cluster | You need real platform services (real identity/authorization services, real Connections) | <1 min | ~30s per redeploy |
Mode 1: docker-compose with hot reload
This is the daily-driver loop. Your service runs on the host withuvicorn --reload; supporting services (Postgres for your DB, MinIO for shared storage, a local identity provider) run in containers.
Boot supporting services and run your app with hot reload
packages/api/src/api/*.py reloads the server inside ~1 second. Hit http://localhost:8000/echo?msg=hi to confirm.Mode 2: Kind cluster
Use Kind when you need real Kubernetes semantics (probes firing, ConfigMaps mounting, Ingress routing). The Quickstart walks through this end-to-end. Make iteration faster with this rebuild-and-load script:kind-load.sh
./kind-load.sh after each code change. ~30 seconds per cycle.
Mode 3: Port-forward to shared dev cluster
Use this when you need real platform behavior — real identity provider realms, real authorization data, real Connections. Run your code locally and forward platform services from a shareddev cluster.
port-forward drops (any error in the cluster), curl from your service will fail until you restart the forward. Wrap forwards in a tiny supervisor script (while true; do kubectl port-forward ... ; done) for long-running loops.
Mocking platform services
Three things are commonly mocked in unit tests:- JWT verification — generate a signed test token with a fixture private key; load the matching public key as
KEYCLOAK_JWKS_OVERRIDE(a path to a JSON file your auth code prefers over the JWKS endpoint when set). - Permission checks — patch the Governance SDK’s permission method to return
True(or the value under test). - LiteLLM gateway — point
LLM_GATEWAY_URLat a stub HTTP server that returns canned completions; or uselitellm’s built-in mock provider (model="mock-openai/...").
Common pitfalls
Kind: services on the cluster cannot reach localhost
Kind: services on the cluster cannot reach localhost
Containers in Kind cannot use
localhost to reach your host machine. Use host.docker.internal (macOS/Windows) or the host’s LAN IP (Linux). Or — better — run dependencies inside Kind with another helm install.MinIO: SignatureDoesNotMatch errors
MinIO: SignatureDoesNotMatch errors
MinIO requires path-style addressing. Set
OBSTORE_PATH_STYLE=true (or the equivalent in your S3 client config). Virtual-hosted style works on real S3 but not on MinIO without DNS magic.Hot reload not picking up changes
Hot reload not picking up changes
uvicorn --reload watches the working directory by default. If your source is in a non-default location (e.g., packages/api/src/api/), pass --reload-dir packages/api/src. For container-based reload, mount the source directory as a volume and run uvicorn inside the container.Missing X-Project-ID returning 400 from platform APIs
Missing X-Project-ID returning 400 from platform APIs
Every call to Governance, Assets, or Utils requires
X-Project-ID. In local dev, hardcode a fixture project ID (e.g., 00000000-0000-0000-0000-000000000001) until you wire user-driven project switching.CI smoke test
The Quickstart runs end-to-end in CI weekly via.github/workflows/quickstart-smoke.yml. The workflow provisions a Kind cluster, builds the example image, installs the chart, port-forwards, and asserts both endpoints respond. If it fails, an issue is opened automatically with the label solution-dev-guide — that is your signal to update the guide.
This is the strongest possible self-sustainability signal: the quickstart cannot rot silently.
Next steps
Authenticate users
Wire JWT validation into your local app.
Manage secrets
Move secrets out of
.env into the platform pipeline.Use shared storage
Replace MinIO test code with the obstore client.
Troubleshooting
Stuck? Check known causes by error symptom.

