Coding Standard — Deployment & Local Infrastructure

By Engineering Team•October 8, 2026•4 min read

This page is the Coding Standards home for this platform’s deployment/local-infrastructure conventions — the rules a new service follows regardless of which language it’s written in. The full command reference (stack lifecycle, per-service Docker commands, data-store/emulator resets) and the complete Port Matrix live in SR-009 — Local Development Environment Topology and Architecture — Local Development Environment Topology; this page states only the standing principles, not repeated there.

Gateway topology — two containers, one enforcement point

cdn-edge is the single public entry point, routing both API traffic and media. nginx-api-router sits entirely behind it, on the internal Docker network only (no host port), and owns every enforcement decision — auth (auth_request /_auth_verify), Firebase App Check, and path routing — for every route, including health checks. There is no auth-bypassed route anywhere in this platform’s gateway config: a request never reaches a microservice without first clearing both layers.

Port uniqueness — with one documented, carried-forward exception

Every service’s published host port is expected to be unique. One standing exception is carried forward rather than silently fixed: tenant-service and inventory-service both claim host port 8083. This is flagged, not resolved — fixing the collision is a configuration change, not a documentation change, and a task touching either service should flag the collision and confirm which port is actually in effect rather than silently assuming one.

Fail-fast required configuration — a boot-time check, not a first-request surprise

A new service, in any language, validates all required environment variables at process boot and refuses to start if any are missing, rather than failing lazily the first time that configuration is actually used. tenant-migration/tenant-migration-orchestrator (Node) are the reference implementation of this principle; a new Go or Rust service applies the same idea via its own typed-error constructor (errors.NewConfigError in Go) at startup. The specific required-variable list for a given service stays local to that service’s own CLAUDE.md/.env.example — this page states the principle, not a per-service list.