Control Plane architecture

Control Plane architecture An architecture diagram generated by Archify. Cradle web app · React client components · Architecture component Cradle web app React client components Farm Agent · Machine, not a user · Architecture component Farm Agent Machine, not a user App API · /api/auth · /api/workspaces · Architecture component · withWorkspace() · can() App API /api/auth · /api/workspaces withWorkspace() · can() Contract API · /api/v1/* · Architecture component · authenticateAgent() Contract API /api/v1/* authenticateAgent() operations · Cross-domain orchestration · Architecture component operations Cross-domain orchestration Domain modules · workspaces · devices · accounts · media · posts · jobs · Architecture component · 12 bounded contexts Domain modules workspaces · devices · accounts · media · posts · jobs 12 bounded contexts Scheduler tick · Due posts · expired leases · retries · Architecture component Scheduler tick Due posts · expired leases · retries DynamoDB · Repositories · Infrastructure adapters — replaceable DynamoDB Repositories S3 · Media objects · Infrastructure adapters — replaceable S3 Media objects Secrets Manager · Credential vault · Infrastructure adapters — replaceable Secrets Manager Credential vault Cognito · Product users · Infrastructure adapters — replaceable Cognito Product users HTTPS · session cookie Farm Agent Contract v1 application services job lifecycle composes materialises work repositories presigned URLs credential vault product sign-in Infrastructure adapters — replaceable Legend Frontend Backend Database Cloud Security Message bus External

One shape for every route

  • • route() turns any failure into a safe typed response
  • • withWorkspace() proves session, membership and permission
  • • parseJson() validates the body with Zod before anything runs

Module boundaries

  • • Two public entries per module: server and /client
  • • Enforced by ESLint and by server-only at build time
  • • operations is the only module that composes write paths

Replaceable adapters

  • • DynamoTable exposes no scan — every read is a key query
  • • SocialCredentialVault is an interface, not a vendor
  • • Swapping an adapter changes no domain code