Services
Every Olly capability lives behind a thin, JWT-protected REST API. Each service owns its own PostgreSQL schema, publishes domain events to Kafka via the outbox pattern, and emits OpenTelemetry traces. The Go services share a single binary skeleton (handler / repo / outbox / migrations); the triage agent is Python (PydanticAI) but follows the same external contract.
Prior auth + claim submission + adjudication
Coverage & benefit accumulators
Policy issuance + member enrolment
Invoicing, payments, ledger, dunning
Provider network, credentialing, directory
Thin adapter over Novu
Product + plan + ruleset config
AI triage - v5 narrower + RF sidecar
Care pathways, episodes, appointments
Group-scheme lifecycle
Broker quote/bind + commissions
Consent capture + audit
Document storage + e-sign
Member portal BFF
Login, tokens, onboarding sessions
Cross-cutting
Capabilities that don't live in a single service - they're libraries or planned components consumed across the platform.
Factor-based premium calculation (base rate × risk factors = PMPM). Lives in packages/go/rating, consumed by policy-admin and broker-api.
Spatial queries - boundaries, rating zones, nearest-provider, serviceability. Lives in packages/go/geo.
FWA detection across claims, enrollment, billing, provider activity.
Common patterns
Every service follows the same startup sequence and internal layout. See Architecture → Service Structure for full details.
- Authentication. All externally accessible routes require a Keycloak Bearer token validated against the JWKS endpoint. Routes prefixed
/internal/bypass JWT and are protected at the APISIX gateway level. - Kafka / outbox. Services publish domain events transactionally via an
outboxtable. A background poller reads undelivered rows, publishes to Kafka, then deletes them. This guarantees at-least-once delivery without distributed transactions. - Migrations. Each service runs Goose SQL migrations on startup against its dedicated database schema.
- Observability. All services emit OpenTelemetry traces and structured JSON logs. Health endpoints at
/healthz(liveness) and/readyz(readiness + DB ping) are standard.
