Skip to main content

homelab diagram

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#263238', 'primaryTextColor': '#fff', 'primaryBorderColor': '#fff', 'lineColor': '#b0bec5', 'tertiaryColor': '#fff', 'mainBkg': '#1e1e1e'}}}%%
flowchart TDLR
    %% ==========================================
    %% 1. GLOBALSTYLES STYLES(High Contrast)
    %% ==========================================
    classDef cloud fill:#0d47a1,stroke:#fff,stroke-width:2px,color:#fff
    classDef home fill:#1b5e20,stroke:#fff,stroke-width:2px,color:#fff
    classDef server fill:#37474f,stroke:#90a4ae,stroke-width:2px,color:#fff
    classDef stack fill:#263238,stroke:#546e7a,stroke-width:1px,stroke-dasharray: 5 5,color:#eceff1
    
    %% Traffic Line Styles
    linkStyle default stroke:#b0bec5,#607d8b,stroke-width:2px;1px;
    
    %% ==========================================
    %% 2. TOPTHE LEVEL:SOURCE INTERNET(Far Left)
    %% ==========================================
    Internet((Internet))
    style Internet fill:#fff,stroke:#333,color:#000

    %% ==========================================
    %% 3. LEVEL 2:LOCATION: ORACLE CLOUD (Top Lane)
    %% ==========================================
    subgraph OracleCloud [Oracle Cloud - Free Tier]
        direction TB
        style OracleCloud fill:#0d47a1,stroke:#fff,stroke-width:3px,color:#fff
        
        %% Dobby (Left)
        subgraph DobbyBox [Dobby - Game Node 2]
            direction TB
            style DobbyBox fill:#37474f,#1565c0,stroke:#fff,stroke-width:2px,color:#fff

        D_Wing[Pterodactyl Wing]:::service
            D_MC[Minecraft Cluster]:::service
        end

        %% Phoenix--- PHOENIX (Right)The Gateway) ---
        subgraph PhoenixBox [Phoenix - Gateway]
            direction TB
            styleclass PhoenixBox fill:#37474f,stroke:#fff,stroke-width:2px,color:#fffserver
            
            P_Traefik[Traefik Proxy]:::service
            P_Stack[WGP_WG[WireGuard Interface<br/>Fail2Ban<br/>Watchtower]:::serviceInterface]
            
            subgraph P_Infra [Infrastructure]
                class P_Infra stack
                direction TB
                P_Fail2Ban[Fail2Ban]
                P_Agent[Portainer Agent]
            end
        end

        %% --- DOBBY (The Game Node) ---
        subgraph DobbyBox [Dobby - Game Node]
            direction TB
            class DobbyBox server
            
            subgraph D_Games [Game Stack]
                class D_Games stack
                direction TB
                D_Wing[Pterodactyl Wing]
                D_MC[Minecraft Cluster]
            end
            
            D_Agent[Portainer Agent]
        end
    end

    %% ==========================================
    %% 4. LEVEL 3:LOCATION: HOME NETWORK (Bottom Lane)
    %% ==========================================
    subgraph HomeNet [Home Network - Deltona]
        direction TB
        style HomeNet fill:#1b5e20,#2e7d32,stroke:#fff,stroke-width:3px,2px,color:#fff

        %% --- UNIFI (The Router) ---
        Unifi[Unifi Router]:::deviceserver

        %% --- FIREBOLT (Center)The Core) ---
        subgraph FireboltBox [Firebolt - Main Server]
            direction TB
            styleclass FireboltBox fill:#37474f,stroke:#fff,stroke-width:2px,color:#fffserver
            
            F_Traefik[Traefik Internal]:::service
            F_WG[WireGuard Interface]

            %% InternalStacks Stacksorganized visually
            subgraph F_Stacks [Apps & Services]
                direction TB
                style F_Stacks fill:none,stroke:none

                subgraph F_Infra [Infrastructure]
                    direction TB
                styleclass F_Infra fill:#263238,stroke:#90a4ae,stroke-dasharray: 5 5,color:#fffstack
                    F_Auth[Authentik IDP]:::serviceAuthentik]
                    F_Portainer[Portainer Server]:::servicePortainer]
                    F_Homepage[Homepage]:::service
                end

                subgraph F_Media [Media Stack]
                    class F_Media stack
                    F_Plex[Plex]
                    F_Arr[Sonarr/Radarr]
                    F_Down[qBit/VPN]
                end

                subgraph F_Admin [Admin Tools]
                    direction TB
                styleclass F_Admin fill:#263238,stroke:#90a4ae,stroke-dasharray:stack
                    5F_Bit[Vaultwarden]
                    5,color:#fffF_Book[BookStack]
                    F_Bitwarden[Vaultwarden]:::service
                F_Bookstack[BookStack]:::service
                F_Duplicati[F_Dup[Duplicati]:::service
                end

                subgraph F_Media [Media Stack]
                direction TB
                style F_Media fill:#263238,stroke:#90a4ae,stroke-dasharray: 5 5,color:#fff
                F_Plex[Plex Media Server]:::service
                F_Arr[Sonarr/Radarr/Prowlarr]:::service
                F_Download[qBit/Unpackerr]:::service
            end

            subgraph F_GamesF_GameStack [Game Stack]
                    directionclass TBF_GameStack style F_Games fill:#263238,stroke:#90a4ae,stroke-dasharray: 5 5,color:#fffstack
                    F_Panel[Ptero Panel]:::service
                    F_Wing[Ptero Wing]:::service
                end
            end
        end

        %% --- NORBERT (BelowStorage) Firebolt)---
        subgraph NorbertBox [Norbert - Storage]
            direction TB
            styleclass NorbertBox fill:#37474f,stroke:#fff,stroke-width:2px,color:#fffserver
            
            N_Stack[N_WG[WireGuard]
            N_Store[Media Storage]

            subgraph N_Apps [App Stack]
                class N_Apps stack
                N_Hass[Home Assistant<br/>Assistant]
                N_LLM[LLMCord AI]:::service
            N_Games[end

            subgraph N_Games [Game Node 1<br/>Wing1]
                /class N_Games stack
                N_Wing[Ptero Wing]
                N_Ark[Ark / MC Test]:::service
            N_Storage[Media Storage]:::serviceend
        end

        %% --- PIHOLE (Bottom)---
        subgraph PiHoleBox [Raspberry Pi]
            direction TB
            styleclass PiHoleBox fill:#37474f,stroke:#fff,stroke-width:2px,color:#fffserver
            PI_SVC[DNS Sinkhole]:::service
            PI_VPN[PiVPN Ingress]:::service
        end
    end

    %% ==========================================
    %% 5. THETRAFFIC VERTICAL ANCHORS (THE FIX)
    %% ==========================================
    %% These invisible links force the layers to separate vertically
    
    %% Force Internet above Oracle
    Internet ~~~ P_Traefik
    
    %% FORCE ORACLE ABOVE HOMEWIRING (The criticalClean fix)
    %% We link the BOTTOM node of Oracle to the TOP node of Home
    P_Stack ~~~ F_Traefik
    D_MC ~~~ Unifi

    %% Force Firebolt internal order
    F_Traefik ~~~ F_Infra ~~~ F_Admin ~~~ F_Media ~~~ F_Games
    
    %% Force Firebolt above Norbert above PiHole
    F_Games ~~~ N_Stack
    N_Storage ~~~ PI_SVC

    %% ==========================================
    %% 6. CONNECTIONSPart)
    %% ==========================================

    %% --- MAINPUBLIC INGRESSINTERNET TRAFFIC (Green) ---
    Internet == HTTPS ==>|HTTPS| P_Traefik
    Internet --==>|Ports| PortsD_Games
    --Internet ==>|Ports| Unifi
    InternetlinkStyle --0,1,2 Ports --> D_MCstroke:#00e676,stroke-width:3px;

    %% --- THE TUNNEL (Orange) ---
    P_Traefik --> P_WG
    P_WG ==>|WireGuard Tunnel| F_TraefikF_WG
    linkStyle 3,4 stroke:#ff9100,stroke-width:4px;

    %% --- UNIFIINTERNAL ROUTING (Blue) ---
    F_WG --> F_Traefik
    F_Traefik --> F_Infra & F_Media & F_Admin & F_GameStack
    F_Traefik -.-> N_Apps & PI_SVC
    linkStyle 5,6,7 stroke:#2979ff,stroke-width:2px;

    %% --- SPLIT ROUTING (Special Case) ---
    P_WG -.->|Direct Route| N_WG
    N_WG -.-> N_Games

    %% --- PORT FORWARDING (Green Dotted) ---
    Unifi -.->|32400| F_Plex
    Unifi -.->|Game Ports| F_GamesF_GameStack
    Unifi -.->|Game Ports| N_Games
    Unifi -.->|UDP 51820| PI_VPN
    %%linkStyle ---10,11,12,13 INTERNALstroke:#00e676,stroke-width:2px,stroke-dasharray: ROUTING5 ---
    F_Traefik --> F_Infra & F_Admin & F_Media & F_Games
    F_Traefik -.-> N_Stack & PI_SVC
    
    %% --- SPLIT ROUTE ---
    P_Stack -.-> N_Games5;

    %% --- MANAGEMENT & STORAGE (Grey) ---
    F_Portainer -.-> P_StackP_Agent & N_StackD_Agent
    F_DownloadF_Down -.->|NFS| N_StorageN_Store
    %%F_Panel CLASS-.-> DEFINITIONSD_Wing classDef& deviceN_Wing fill:#37474f,stroke:#fff,stroke-width:2px,color:#fff& classDef service fill:#212121,stroke:#90a4ae,stroke-width:1px,color:#fffF_Wing