Skip to content

System Architecture Overview

System Architecture Overview

Seed & Source follows a layered, hexagonal architecture across all templates. This page explains the high-level structure.

Template layers

+-------------------------------------+
| UI / Driving Adapters |
| (FastAPI routes, React, Rails) |
+-------------------------------------+
| Core / Domain |
| use_cases/ -> entities/ -> ports/ |
+-------------------------------------+
| Infrastructure / Driven Adapters |
| (PostgreSQL, Redis, Stripe, S3) |
+-------------------------------------+

Service topology (local)

graph LR
    Browser --> ReactClient["React Client :3002"]
    Browser --> StaticLanding["Static Landing :4000"]
    ReactClient --> RailsAPI["Rails API :3001"]
    ReactClient --> PythonAPI["Python SaaS :8000"]
    RailsAPI --> Postgres[("PostgreSQL")]
    PythonAPI --> Postgres
    PythonAPI --> LicenseServer["License Server :8001"]
    LicenseServer --> Stripe[("Stripe")]

Key design rules

  1. Dependency inversion — core code never imports infrastructure code
  2. Feature injection — capabilities (payments, auth) are added via sscli inject without touching core logic
  3. Docker-first — all services run in containers locally; production mirrors the same image
  4. Single deploy artifact — each template builds to one Docker image with a render.yaml for Render

Template-specific architecture docs