Template

SaaS Architecture Template

A complete multi-tenant SaaS platform diagram. API gateway, auth, Stripe billing, tenant isolation, and background workers — ready to customize with AI.

Template preview

Copy this Mermaid code into Cybewave Studio or any Mermaid-compatible editor.

saas-architecture.mmd
graph TD
    Client[Web / Mobile Client] --> CDN[CDN - CloudFront]
    CDN --> LB[Load Balancer]
    LB --> GW[API Gateway]

    GW --> AuthSvc[Auth Service]
    AuthSvc --> JWT[JWT / OAuth 2.0]

    GW --> TenantMgr[Tenant Manager]
    TenantMgr --> TenantDB[(Tenant Registry)]

    GW --> BillingSvc[Billing Service]
    BillingSvc --> Stripe[Stripe API]
    BillingSvc --> PlanDB[(Plans & Subscriptions)]

    GW --> CoreAPI[Core API Service]
    CoreAPI --> PG[(PostgreSQL - RLS)]
    CoreAPI --> Redis[(Redis Cache)]

    GW --> NotifSvc[Notification Service]
    NotifSvc --> Email[Email Provider]
    NotifSvc --> Push[Push Notifications]

    CoreAPI --> S3[(S3 File Storage)]
    CoreAPI --> Queue[Job Queue - Redis]
    Queue --> Workers[Background Workers]

Why use this template?

Skip the blank canvas. Start from a proven SaaS foundation.

Multi-Tenancy Built In

Tenant manager with registry database and row-level security on PostgreSQL for data isolation.

Stripe Billing

Billing service integrated with Stripe for subscriptions, usage metering, and plan management.

Auth & Identity

Dedicated auth service with JWT and OAuth 2.0 support for SSO, RBAC, and session management.

Background Processing

Redis-backed job queue with workers for async tasks like email, webhooks, and data exports.

Frequently asked questions

What is included in the SaaS architecture template?

The template includes an API gateway, auth service (JWT/OAuth), tenant manager with registry, billing service (Stripe), core API with PostgreSQL and Redis, notification service, S3 file storage, and a background job queue.

How do I customize the multi-tenancy strategy?

Open the template in Cybewave Studio and ask the AI to switch between shared-DB with RLS, schema-per-tenant, or dedicated-DB per tenant. The AI will update the diagram and add the appropriate components.

Can I export this to a project scaffold?

Yes. Cybewave Studio can export the architecture to a ZIP with per-service folders, Dockerfiles, and API stubs. You get a working project skeleton from the diagram.

Launch your SaaS architecture

Free to start. 50 AI credits/month. No credit card required.

Get started for free →

Or explore pricing plans for teams.