# control-interface

Единый UI и API-gateway. Namespace: `control-interface`.

```mermaid
flowchart LR
    User([👤 User]):::ext
    GW[Istio Gateway]:::infra
    Redis[(Redis)]:::data
    KC[Keycloak]:::idp

    subgraph NS["ns: control-interface"]
        UI[deployment: ui<br/>Service :80]:::comp
    end

    Django[django]:::peer
    PM[pm]:::peer
    Projects[projects]:::peer
    Workspaces[workspaces]:::peer

    User -->|HTTPS| GW --> UI
    UI -->|API| Django
    UI -->|API| PM
    UI -->|API| Projects
    UI -->|API| Workspaces
    UI -->|session| Redis
    UI -. OIDC .-> KC

    classDef comp fill:#ec4899,stroke:#9d174d,stroke-width:2px,color:#fff
    classDef peer fill:#fce7f3,stroke:#9d174d,color:#000
    classDef data fill:#10b981,stroke:#065f46,color:#fff
    classDef infra fill:#0ea5e9,stroke:#075985,color:#fff
    classDef idp fill:#f59e0b,stroke:#92400e,color:#fff
    classDef ext fill:#1f2937,stroke:#9ca3af,color:#fff
    style NS fill:#fdf2f8,stroke:#ec4899,stroke-width:2px
```
