Technical enablement · 02
Components & services catalogue
A reference for every building block of {{product.name}}: what it is responsible for, its interfaces, what it depends on and how to operate it. Every entry follows the same four-part structure so readers can compare components consistently. Filter by category or search, and click an entry to expand it.
One application, several layers. {{product.name}} is a modular monolith: most "components" below are directories in one repository that ship in one container image. Paths are relative to the repository root, so you can verify each entry against source.
How each component is documented
| Section | Answers |
|---|---|
| Responsibility | What single job it does, and what it does not do. |
| Interfaces | Routes, functions or events it exposes. |
| Dependencies | What it calls and what happens when that is down. |
| Operations | Source path, runtime, configuration keys and tests. |
Experience & API
What users and calling systems touch. Route groups under app/ separate the internal workspace from the client workspace.
actions.ts, checkpoint-actions.ts). Navigation is filtered by role in components/nav/sidebar.tsx.lib/db/repositories/; domain library; session from lib/auth.[tenantSlug] resolved against the session's authorised tenants. Period selection is a URL search parameter (?period=YYYY-MM), so views are bookmarkable. Mode can be set with ?mode=.lib/ip-mode/project.ts); repositories; domain library.tier (diagnostic, tier_1, tier_2, tier_3) that gates parts of the navigation. Tenants flagged as demo show a DEMO badge.ingest/litellm, ingest/outcomes; gate-a; agentic/sessions/[sessionId]/events (SSE); checkpoints (+ decide, escalate); escalations (+ resolve, route-l3); optimise (+ authorise, execute, measure); export/{govern,attribute,agentic,savings}; ayci; saas/connectors; jobs/{sync-billing,reconcile,recompute}; health./api/jobs, /api/ingest, /api/gate-a) are exempt from the session check and authenticate with their own credential./api/health is a public liveness probe returning status and timestamp only; it does not check the database or Redis.govern, attribute, agentic, optimise, checkpoints, connections, calibration, admin, engagements), plus navigation, brand and help. One checkpoint console component serves every gate.components/brand/inferred-marker.tsx) rather than a dismissible modal.Core logic
The calculation and policy code. It is deliberately free of I/O so it can be tested against fixtures.
cpvo.ts), Verified Yield (verified-yield.ts), AYCI (ayci.ts), zone evaluation (zones.ts), Gate A policy (gate-a.ts), checkpoint confidence and options (confidence.ts, checkpoint-options.ts), drivers and opportunities, optimisation categories, baselines and gateway-key resolution. It does not read the database or the network.OK (ADR 009).tests/domain/. A structural test asserts CPVO code never references the real-time table. Shared formulas such as Verified Yield are imported, never reimplemented.project.ts) and holds the protected-field policy (protected.ts). Resolves the effective mode: client roles are locked to client mode whatever the toggle says.resolveMode, isInternalRole, isClientRole and the projection functions used by route handlers and server components.tests/ip-mode/ (leakage, tenancy, redaction) run in CI and block merge. Every new domain result type needs a declared client-mode shape (ADR 004).config/.capability_owner and platform_admin. Values are marked calibrated or default, and confidence is capped when defaults are in use.Data & ingestion
Everything between a provider's data and the tables the calculations read.
schema.ts), normalises records (normalise.ts), reconciles real-time against billing (reconcile.ts) and scores data completeness (completeness.ts). The schema is locked (ADR 006): adding a column is safe, renaming one is not.ProviderAdapter contract in adapters/base.ts, registered in adapters/registry.ts, which is the single list of providers that can actually sync.adapters/retry.ts.tests/domain/adapters-*.test.ts. See Integrations.verify() (promotes a connection to active and reports the granted scope) and fetchPeriod() (pulls billing for a window).credentials.ts. Generic SaaS connections are configurable but have no sync adapter, so they stay disconnected by design and the UI says so. Where Google publishes no cost API and no billing export is configured, Vertex cost is estimated from list prices and marked as estimated.schema.ts), tenant context (tenant-context.ts), migrations, seed data and tenant-scoped repositories: admin, agentic, attribute, checkpoints, gateway-keys, govern, optimise, tenants, workloads.DATABASE_URL.scripts/migrate-*.ts run before the release that needs them. See migrations.getRedis().REDIS_URL. Gateway callbacks need it for replay protection, so make deploy refuses to run without it.Platform & shared
Cross-cutting services: identity, scheduling, the gateway and packaging.
config.ts), session helpers (index.ts), log redaction (redact.ts). The proxy applies the session check to every route that is not public or machine-authenticated./api/auth/callback/azure-ad. Environment variables: AUTH_SECRET, AUTH_URL, AUTH_TRUST_HOST, ENTRA_CLIENT_ID, ENTRA_CLIENT_SECRET, ENTRA_TENANT_ID.user table for the provisioned role.AUTH_URL as a redirect-URI mismatch. AUTH_BYPASS=true grants a fixed admin session and is local development only.lib/jobs/ holds the shared secret check (cron-auth.ts), the recompute engine and spend attribution.JOBS_BASE_URL, CRON_SECRET, JOBS_LOOKBACK_HOURS (default 72). Does not follow redirects, because a 3xx means something intercepted the request.ca-ai-yield-cron. See scheduled jobs.POST /api/ingest/litellm; secret LITELLM_CALLBACK_SECRET must match the gateway's.[litellm] prefix. Gateway traffic never changes a CPVO figure; it feeds the real-time stream only.node server.js) and the scheduled job (node /app/scripts/run-jobs.mjs).Owner: the product team owns every area listed here; there is no per-area split. Support route: the contact address and support link in the page footer; infrastructure and deploy issues go to whoever holds admin access to the Azure resource group, and privacy questions to the Data Privacy Officer. Proposed: name one owner each for the web app, scheduled jobs, connection adapters and gateway integration once the team grows. For the user-facing view of these components see the feature reference.