OllinDocs
API reference

Configuration

Every environment variable of ollin-study-api, with defaults and derivations.

Configuration is env-driven (src/config.ts), with sensible defaults for local fixture serving. Nothing is required to boot the fixtures mode.

Environment table

EnvDefaultMeaning
PORT8080Listen port (Cloud Run injects this).
STUDY_DATA_MODElocallocal reads fixture packs from disk; gcs reads the serving bucket.
CAMPAIGNberserk_v1Campaign id.
SERVING_STAMP20260721T131354ZImmutable dataset stamp, pinned per deployment.
SERVING_TIERv0-rootsPostflop tier directory under the stamp.
PREFLOP_TIERpreflop-v0Preflop tier directory under the stamp.
FIXTURES_ROOTfixtureslocal mode: root dir (same layout as the GCS prefix). Point it at fixtures-real for the trimmed real packs.
GCS_BUCKETollin-solver-datagcs mode: bucket.
GCS_PREFIXserving/<campaign>/<stamp>/<tier>gcs mode: postflop object prefix.
PREFLOP_GCS_PREFIXserving/<campaign>/<stamp>/<preflopTier>gcs mode: preflop object prefix.
PACK_CACHE_MB256In-process pack LRU budget (MB).
MANIFEST_TTL_MS300000Catalog trust window + background refresh interval — how quickly newly uploaded families appear.
GCS_ACCESS_TOKENunsetLocal-dev only: a short-lived token (gcloud auth print-access-token) used instead of ADC when the ADC refresh token needs an interactive re-login. Cloud Run never sets it.

Derived paths (not env): local mode reads <FIXTURES_ROOT>/serving/<campaign>/<stamp>/<tier> — mirroring the GCS layout exactly, so fixtures and the bucket are interchangeable.

Modes

Reads manifest.json + packs/ from the fixtures directory. This is what tests run against (pnpm test — AGPL deny-gate, then 35 vitest tests, no network) and the default for pnpm dev.

Docker / Cloud Run

docker build -t ollin-study-api .
docker run -p 8080:8080 ollin-study-api          # fixtures mode
# Cloud Run: set STUDY_DATA_MODE=gcs; reads run as the service account.

On this page