C3 Component View
Last reviewed: 2026-06-30
The Worker codebase is organized by product capability modules.
| Component | File area | Responsibility |
|---|---|---|
| Router and surface gate | worker/src/index.ts |
Dispatch requests and hide routes by Worker surface. |
| Admin API | worker/src/enterprise-admin-api.ts |
Hono API for authenticated control plane routes. |
| Contracts | packages/contracts/src/openapi.ts, schemas.ts |
OpenAPI document and shared Zod schemas. |
| Enterprise store | worker/src/enterprise-store.ts |
Tenant/app/catalog/experience persistence. |
| Runtime config | worker/src/enterprise-runtime-config.ts |
Publish and load runtime app snapshots. |
| Decision/rendering | decision.ts, renderer.ts |
Resolve placements and render HTML experiences. |
| Store and billing | store.ts, google-play-billing.ts |
Purchase claims, entitlement validation and Google Play events. |
| Identity | identity-auth.ts, usage-analytics.ts |
Customer bootstrap, migration and identify flows. |
| Messaging/reviews/feedback | messaging.ts, review-prompts.ts, feedback.ts |
Runtime decisions and admin configuration. |
| Support | tickets.ts |
Tickets, mailbox setup, replies and inbound email. |
| Legal/refunds | legal-documents.ts, refund-protection.ts |
Legal publication and refund request handling. |
| Docs | api-docs.ts, apps/docs, scripts/sync-docs-* |
OpenAPI response and Worker-served Starlight docs. |