Skip to content
FlowScript templates

Engineering — service architecture

Engineering vertical — system / service / datastore / actor. Typed FlowScript for software architecture. Keywords: C4, container, system context, architecture.

Template previewFlowScript
Multi-tenant SaaSC4 — container view · Platform teamCustomer[user]SYSTEM BOUNDARYEDGECOREDATAWeb app[Container: Next.js on Vercel]EDGEAPI[Container: Go / gRPC]COREBackground worker[Container: Go]COREPrimary store[Datastore: postgres]DATAUser uploads & exports[Datastore: s3]DATACustomer → Web app

Make it your own.

// Engineering vertical — system / service / datastore / actor.
// The containers view at the foot of the document draws through the
// c4_container renderer (c4 is its registered alias).

system saas_platform {
  title: "Multi-tenant SaaS"
  owner: "Platform team"
}

actor customer {
  title: "Customer"
  kind: "user"
  depends: [web]
}

service web {
  title: "Web app"
  runtime: "Next.js on Vercel"
  tier: "edge"
}

service api {
  title: "API"
  runtime: "Go / gRPC"
  depends: [web]
  tier: "core"
}

service worker {
  title: "Background worker"
  runtime: "Go"
  depends: [api]
  tier: "core"
}

datastore primary_db {
  kind: "postgres"
  title: "Primary store"
}

datastore object_store {
  kind: "s3"
  title: "User uploads & exports"
}

view containers: c4_container(saas_platform)