Skip to content

Service Architecture

Service Runtime Responsibility Primary Contracts
sirloin Go Main API, billing, credits, media state, shop, admin, storage proto/sirloin/v5/, apps/sirloin/internal/pkg/pb/
brain NestJS Workflows, generation records, character metadata, queues, provider integrations HTTP/OpenAPI; Round gRPC client
round Go Internal ONNX model serving over gRPC proto/round/v1/
brisket Next.js User-facing frontend proto-generated TS package, tRPC
strip Go SSR Internal/admin-style SSR frontend proto/sirloin/v5/ strip subset
flank TanStack Start Visual workflow editor for the brain-owned workflow engine brain HTTP workflow API (apps/flank/app/lib/brain-http-client.ts)
fennec React Creator/admin dashboard Brain HTTP API and generated client
shank React templates UI templates app-local package scripts
chuck Strapi CMS CMS content served over HTTP to Brisket apps/chuck/meat package scripts
horns Cloudflare Workers Scheduled operational automations Worker-local HTTP/scheduled contracts

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.

  • 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 calls Round over gRPC. When configured, Brain posts terminal workflow completion notifications to Sirloin’s webhook HTTP server.

Sirloin calls Brain over its generated HTTP client and both services call Round over gRPC. Flank uses Brain HTTP for workflows and Sirloin gRPC only for playground character search. The former Sirloin/Flank storage and execution gRPC link is removed. Fennec uses Brain HTTP; Brisket consumes Chuck over HTTP.

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.