Skip to content

Architecture

This section outlines the primary services, storage layers, and communication paths in a self-hosted Dreadnode stack.

┌─────────────────────────────────────────────────────────────────┐
│ Frontend (SvelteKit) │
│ packages/frontend/ │
└─────────────────────────────┬───────────────────────────────────┘
│ HTTP/REST
┌─────────────────────────────────────────────────────────────────┐
│ API Server (FastAPI) │
│ packages/api/ │
└─────────────────────────────┬───────────────────────────────────┘
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ PostgreSQL │ │ ClickHouse │ │ S3/MinIO │
│ │ │ │ │ │
│ Users, Orgs │ │ OTEL Traces │ │ Packages │
│ RBAC, Meta │ │ Run Data │ │ Storage │
└──────────────┘ └──────────────┘ └──────────────┘
ComponentPurposeTechnology
APIBackend service and business logicFastAPI, SQLAlchemy, Pydantic
FrontendWeb UI for usersSvelteKit, TypeScript
PostgreSQLState data (users, orgs, RBAC)Postgres 16
ClickHouseEvent data and telemetryClickHouse 24.x
S3/MinIOObject storage for artifactsAWS S3 or MinIO
  1. State Data (PostgreSQL): users, organizations, projects, RBAC metadata.
  2. Event Data (ClickHouse): OTEL traces, run telemetry, high-volume logs.
  3. Object Storage (S3/MinIO): packages, artifacts, file uploads.

The API follows a Domain-Driven Design layout. Each domain is isolated under app/[domain]/:

app/
├── api/v1/ # Router aggregation only
├── core/ # Foundational infrastructure (no external deps)
├── infra/ # External integrations (DB, S3, ClickHouse)
└── [domain]/ # Business domains (auth, users, projects, etc.)
├── models.py # SQLAlchemy models
├── schemas.py # Pydantic schemas
├── service.py # Business logic
├── repository.py # Data access
└── router_v1.py # HTTP routes
PackagePurposeTechnology
packages/apiBackend API serverFastAPI, SQLAlchemy, Pydantic
packages/sdkPython client SDKhttpx, Pydantic
packages/frontendWeb applicationSvelteKit, TypeScript, Tailwind
infraAWS infrastructurePulumi (Python)
  • The frontend communicates with the API via HTTP/REST.
  • The API reads and writes state data in Postgres, event data in ClickHouse, and objects in S3/MinIO.