Architecture

Stack

LayerTechnology
PortalRust / Leptos (WASM)
APIRust / Axum
EngineRust
CoreRust
DatabasePostgreSQL / sqlx
SecretsHashiCorp Vault
AuthEntra ID (OIDC / OAuth2)

Component Diagram

 Browser (WASM)
      │
      ▼
┌──────────┐
│  Portal  │  Leptos SPA, same-origin
│ portal-ui│
└────┬─────┘
     │ HTTP (JSON)
     ▼
┌──────────┐
│   API    │  Axum server, CORS (same-origin only)
│ ryuki-api│
└────┬─────┘
     │
     ▼
┌──────────┐
│  Engine  │  Business logic, auth, request lifecycle
│ryuki-eng │
└────┬─────┘
     │
     ▼
┌──────────┐     ┌──────────┐     ┌──────────┐
│   Core   │     │ PostgreSQL│     │  Vault   │
│ryuki-core│     │  (sqlx)  │     │ (secrets)│
└──────────┘     └──────────┘     └──────────┘
     │
     ▼
┌──────────────┐
│   Adapters   │  Pluggable provider implementations
│  (vsphere,   │
│  hyperv,     │
│  proxmox)    │
└──────────────┘

Key Decisions

Network Policy

Browser ──► Portal (same-origin) ──► API ──► Database
                                        ├───► Vault
                                        └───► Adapters

Only the API server has access to the database, Vault, and provider adapters. The Portal communicates exclusively with the API.