v5 CORE ENGINE
ONLINE
Architecture & Overview
Core Architecture
Alaf Platform v5 Architecture
# Alaf Platform v5 Architecture Overview
This directory is the canonical architecture reference for Alaf Platform distributed cloud orchestrator.
## 3 Major Building Blocks
```text
User / REST API / Git Webhook
↓
Alaf Platform Control Plane
↓ HTTP (over /run/alaf/flux.sock)
Flux Connection Broker
↓ Outbound gRPC Agent.Stream
alafd on each host (Alaf Host Agent)
↓
Podman / Networks / Firewall (nftables/iptables) / DNS / Corrosion Mesh
```
## Building Blocks Breakdown
1. **Alaf Platform Control Plane:**
- Owns user intent, durable state, RBAC, deployment state machines, placement decisions, secrets, proxy config, and audit logs.
- Avoids holding thousands of persistent agent sockets by offloading connectivity to Flux.
2. **Flux Connection Broker:**
- Owns long-lived agent connectivity.
- Host agents dial out to Flux over gRPC, enabling operation behind NAT and restrictive firewalls.
- Routes typed primitive requests to connected hosts.
3. **alafd (Alaf Host Agent):**
- Runs once per host.
- Exposes a closed set of host primitives and executes privileged local operations (Podman, firewall, DNS, Corrosion mesh).
- Denies raw passthrough to ensure strict isolation.
## Core Invariant
> **Alaf Platform** owns user intent and application state. **Flux** routes requests. **alafd** executes explicit host primitives. alafd must not grow app, team, RBAC, deployment, or billing concepts.
Alaf Teknoloji A.Ş. • Sovereign Cloud Core
Projeyi Dağıt →