Skip to content

Service Architecture

Service Architecture

Service Inventory

ServiceRuntimeResponsibilityPrimary Contracts
sirloinGoMain API, billing, credits, media state, shop, admin, storageproto/sirloin/v5/, apps/sirloin/internal/pkg/pb/
brainNestJSGeneration records, character metadata, queues, provider integrationsHTTP/OpenAPI client in apps/sirloin/pkg/brain-client/; NestJS gRPC microservice in apps/brain/src/main.ts
roundGoInternal ONNX model serving over gRPCproto/round/v1/
brisketNext.jsUser-facing frontendproto-generated TS package, tRPC
stripGo SSRInternal/admin-style SSR frontendproto/sirloin/v5/ strip subset
flankTanStack StartVisual workflow builder and execution surfaceproto/flank/v1/, sirloin FlankStorageService
fennecReactUI appapp-local package scripts
shankReact templatesUI templatesapp-local package scripts
chuckStrapi CMSCMS content served over HTTP to Brisketapps/chuck/meat package scripts

Boundary Rules

Sirloin is the authoritative owner for billing, credits, media user-facing state, shop purchase state, admin/audit state, and most cross-service API contracts.

Brain owns generation records, character metadata, training/provider integrations, and BullMQ async work.

Round is internal-only model serving and has no user auth boundary.

Frontends validate user identity at their edge. Sirloin generally trusts upstream auth for user-facing calls and uses Clerk SDK for lookups.

Contract Sources

  • Proto contracts live under proto/.
  • Generated proto docs live at api/server.md.
  • Brain HTTP/OpenAPI client docs live under apps/sirloin/pkg/brain-client/.
  • Brain also exposes a NestJS gRPC microservice from apps/brain/src/main.ts, and Brain calls Round over gRPC; Brain does not call Sirloin.

Runtime Coupling

Sirloin calls Brain and Flank over internal service contracts. Brain calls Round for model-serving work. Flank stores workflows, adapters, secrets, and execution state through sirloin storage contracts, then exposes workflow execution back to sirloin.

Cross-Cutting Conventions

Auth is service-specific: brisket uses Clerk middleware, strip uses custom Fiber middleware, brain uses NestJS guards, and sirloin trusts upstream auth for user-facing calls while using Clerk for lookups. Error handling and logging are also local to each service, so new cross-service behavior should follow the owner service’s existing conventions before introducing shared helpers.