Architecture
This section outlines the primary services, storage layers, and communication paths in a self-hosted Dreadnode stack.
System diagram
Section titled “System diagram”┌─────────────────────────────────────────────────────────────────┐│ 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 │└──────────────┘ └──────────────┘ └──────────────┘Components
Section titled “Components”| Component | Purpose | Technology |
|---|---|---|
| API | Backend service and business logic | FastAPI, SQLAlchemy, Pydantic |
| Frontend | Web UI for users | SvelteKit, TypeScript |
| PostgreSQL | State data (users, orgs, RBAC) | Postgres 16 |
| ClickHouse | Event data and telemetry | ClickHouse 24.x |
| S3/MinIO | Object storage for artifacts | AWS S3 or MinIO |
Data flow
Section titled “Data flow”- State Data (PostgreSQL): users, organizations, projects, RBAC metadata.
- Event Data (ClickHouse): OTEL traces, run telemetry, high-volume logs.
- Object Storage (S3/MinIO): packages, artifacts, file uploads.
API architecture (DDD)
Section titled “API architecture (DDD)”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 routesPackage overview
Section titled “Package overview”| Package | Purpose | Technology |
|---|---|---|
packages/api | Backend API server | FastAPI, SQLAlchemy, Pydantic |
packages/sdk | Python client SDK | httpx, Pydantic |
packages/frontend | Web application | SvelteKit, TypeScript, Tailwind |
infra | AWS infrastructure | Pulumi (Python) |
Communication paths
Section titled “Communication paths”- 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.