Skip to content

Local Development

The local stack mirrors the production topology using Docker Compose for infrastructure and Go's native process runner for services. Tilt adds hot reload and a web UI for day-to-day development.

Prerequisites

ToolVersionNotes
Docker + Docker ComposeLatest stableDesktop or Engine
Go1.23+go.work workspace used
Node.js22+For apps/web-admin
TiltLatestOptional but recommended; curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash

Quick Start

bash
# 1. Start the full infrastructure stack
make local-up

# 2. Build and start all Go services in the background
make run-all

# Service logs land in /tmp/olly-logs/<service>.log
tail -f /tmp/olly-logs/claims.log

make local-up starts Docker Compose and then runs make keycloak-set-passwords automatically to reset all test user passwords to Olly2026.

Docker Compose Services

The compose file defines a core profile (always on) and an observe profile (--profile observe) for the full observability stack.

ServicePort(s)Purpose
postgres5432PostgreSQL 16 — shared cluster for all service databases
redis (Valkey)6380Valkey 7 cache — note: 6379 is reserved by SSH tunnel
kafka (Redpanda)9092 (Kafka API), 9644 (Admin)Kafka-compatible message broker
kafka-ui (Redpanda Console)8081Web UI for browsing topics and messages
keycloak8093Identity provider — Keycloak 25, imports realm on startup
openbao8200OpenBao secrets engine (dev mode, root token: root)
opensearch9200OpenSearch 2 — provider directory, log analytics
temporal7233Temporal workflow engine
temporal-ui8233Temporal web UI
mirth8443, 8661Mirth Connect EDI engine (NextGen)
mailpit1025 (SMTP), 8025 (UI)Local email catcher — inspect outgoing notifications
api-docs8098Scalar API docs (OpenAPI specs)
gatus8099Service health status dashboard
otel-collector4317 (gRPC), 4318 (HTTP)OpenTelemetry Collector — always on
etcd2379etcd — APISIX config store
apisix9080 (HTTP), 9443 (HTTPS), 9180 (Admin)Apache APISIX API gateway
broker-api4011Broker API service (Docker-managed)
document-service4009Document Service (Docker-managed)
member-portal-api4012Member Portal BFF (Docker-managed)
web-admin3000React Admin web app (Docker-managed)
prometheus9090--profile observe
loki3100--profile observe
tempo3200--profile observe
grafana3010--profile observe

Go Services (run directly, not via Docker)

These services are started by make run-all as native Go processes:

ServicePort
claims4001
eligibility4002
enrollment4003
billing4004
provider4005
notifications4006
policy-admin4007
triage4008
care4010
group-scheme-service4013

Make Targets Reference

TargetDescription
make local-upStart core Docker Compose stack + reset Keycloak passwords
make local-up-allStart core stack + observability profile (Grafana, Tempo, Loki, Prometheus)
make local-downStop stack (volumes preserved)
make local-down-cleanStop stack and wipe all volumes
make keycloak-set-passwordsReset test user passwords to Olly2026 in the olly realm
make run-allStart all Go services in background (logs → /tmp/olly-logs/)
make stop-allStop background Go services
make buildBuild all Go services (go build ./...)
make testRun unit tests across all services
make lintRun golangci-lint across all services
make fmtRun gofmt across all services

Tilt

Tilt provides hot reload and a developer UI. With the Docker Compose stack already running:

bash
tilt up

Tilt watches Go source files. When a file changes, it rebuilds the affected service binary and restarts the process — no manual make stop-all && make run-all needed.

Tilt UI: http://localhost:10350 — shows build/run status, live logs, and health for every resource.

Press Ctrl-C to stop Tilt (Docker Compose services continue running).

E2E Tests

E2E tests live in tests/e2e/ as a standalone Go module. They require the local stack and all Go services to be running.

bash
# Run all E2E tests
cd tests/e2e && GOWORK=off go test ./... -v -timeout 90s -count=1

# Run by service
cd tests/e2e && GOWORK=off go test ./claims/... -v -timeout 90s -count=1

# Run specific test pattern
cd tests/e2e && GOWORK=off go test . -run 'TestFullMemberJourney' -v -timeout 90s -count=1

GOWORK=off is required to prevent the Go workspace from interfering with the standalone tests/e2e/go.mod. Tests call skipIfUnreachable(t, err) and skip gracefully when services are down, so they do not fail in environments where only some services are running.

Test Credentials

All test users have password Olly2026.

Keycloak admin UI is available at http://localhost:8093 (admin / admin).

MCP Server

The local MCP server for tooling integrations is available at:

http://localhost:3100/mcp

Database Access

All service databases share the same Postgres instance:

Host:     localhost:5432
User:     olly
Password: olly

Each service has its own database (claims, eligibility, enrollment, billing, provider, notifications, policy_admin, etc.). Connect with:

bash
psql -h localhost -U olly -d claims

Kafka (Redpanda) Access

Browse topics and messages at http://localhost:8081 (Redpanda Console).

Produce/consume via rpk:

bash
rpk topic list --brokers localhost:9092
rpk topic consume claims.claim.submitted --brokers localhost:9092

Olly Health Insurance Platform