---
title: rdev Component Diagram
---
flowchart TB
    subgraph Handlers["HTTP Handlers"]
        PH[Projects Handler]
        KH[Keys Handler]
        HH[Health Handler]
        CH[Claude Config Handler]
    end

    subgraph Middleware
        Auth[Auth Middleware]
        Rate[Rate Limiter]
        Metrics[Metrics]
    end

    subgraph Services
        PS[Project Service]
        AS[Auth Service]
    end

    subgraph Ports["Port Interfaces"]
        PR[ProjectRepository]
        EX[CommandExecutor]
        SM[StreamManager]
    end

    subgraph Adapters
        K8sRepo[K8s Project Repository]
        K8sExec[K8s Executor]
        CachedRepo[Cached Repository]
        PgRepo[Postgres Repository]
    end

    subgraph Domain
        Models[Domain Models]
        Errors[Domain Errors]
    end

    %% Connections
    PH --> PS
    KH --> AS

    Middleware --> Handlers

    PS --> PR
    PS --> EX
    PS --> SM
    AS --> PgRepo

    CachedRepo --> K8sRepo
    PR -.-> CachedRepo
    EX -.-> K8sExec

    Services --> Domain
    Adapters --> Domain
