# iain-crowe/atlas-web architecture

> Architecture diagram of the GitHub repository iain-crowe/atlas-web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iain-crowe/atlas-web
- Repository: https://github.com/iain-crowe/atlas-web

## Overview

Atlas is a browser-based homelab control console. Users sign in, then inspect host and managed-service status, select a service for details or controls, and view network or historical telemetry. The React app coordinates polling and API requests; dedicated panels render service-specific telemetry and charts. The README is the default Vite template and documents no additional Atlas capabilities, so this map reflects the supplied source index and excerpts; backend behavior is not shown.

Main entry points: [`src/App.tsx`](https://github.com/iain-crowe/atlas-web/blob/main/src/App.tsx) (Atlas App), [`src/api.tsx`](https://github.com/iain-crowe/atlas-web/blob/main/src/api.tsx) (API Client), [`src/components/ServiceDetail.tsx`](https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceDetail.tsx) (Service Detail), [`src/hooks/useAuth.ts`](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useAuth.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Console"]
  node_app["Atlas App<br/>[App.tsx]"]
  node_login["Login View<br/>[LoginView.tsx]"]
  node_auth["Authentication<br/>[useAuth.ts]"]
  node_api["API Client<br/>[api.tsx]"]
end

subgraph group_management["Service Management"]
  node_services["Service Polling<br/>[useServices.ts]"]
  node_polling["Polling Hook<br/>[usePolling.ts]"]
  node_servicecards["Service Cards<br/>[ServiceCard.tsx]"]
  node_detail["Service Detail<br/>[ServiceDetail.tsx]"]
  node_identity["Service Identity"]
  node_statusutil["Status Mapping<br/>[serviceStatus.ts]"]
  node_confirm["Action Confirmation"]
end

subgraph group_telemetry["Telemetry"]
  node_system["Host Status<br/>[useSystemStatus.ts]"]
  node_minecraft["Minecraft Status"]
  node_historyhook["History Fetching<br/>[useHistory.ts]"]
  node_history["History Charts<br/>[HistoryPanel.tsx]"]
  node_media["Media Panel<br/>[MediaPanel.tsx]"]
  node_network["Network Panel<br/>[NetworkPanel.tsx]"]
  node_pihole["Pi-hole Panel<br/>[PiHolePanel.tsx]"]
  node_jellyfin["Jellyfin Panel<br/>[JellyfinPanel.tsx]"]
  node_overview["System Overview<br/>[SystemOverview.tsx]"]
  node_runtime["Runtime Summary<br/>[RuntimeSummary.tsx]"]
end

subgraph group_shared["Shared UI"]
  node_freshness["Freshness Indicator<br/>[Freshness.tsx]"]
  node_statusbanner["Status Banner<br/>[StatusBanner.tsx]"]
  node_now["Clock Hook<br/>[useNow.ts]"]
end

node_user(("Operator"))
node_backend{{"Atlas API"}}

node_user -->|"uses console"| node_app
node_app -->|"checks session"| node_auth
node_app -->|"shows sign-in"| node_login
node_login -->|"submits credentials"| node_auth
node_auth -->|"checks session"| node_api
node_auth -->|"authenticates"| node_backend
node_api -->|"sends API requests"| node_backend
node_app -->|"loads services"| node_services
node_app -->|"loads host status"| node_system
node_app -->|"loads game status"| node_minecraft
node_services -->|"polls services"| node_polling
node_system -->|"polls status"| node_polling
node_minecraft -->|"fetches telemetry"| node_api
node_polling -->|"fetches data"| node_api
node_app -->|"renders services"| node_servicecards
node_app -->|"renders selection"| node_detail
node_app -->|"confirms action"| node_confirm
node_app -->|"posts service action"| node_api
node_app -->|"renders media view"| node_media
node_app -->|"renders network view"| node_network
node_app -->|"renders host history"| node_history
node_app -->|"renders overview"| node_overview
node_app -->|"renders summary"| node_runtime
node_detail -->|"renders identity"| node_identity
node_detail -->|"displays status"| node_minecraft
node_detail -->|"renders game history"| node_history
node_detail -->|"renders service panel"| node_jellyfin
node_detail -->|"renders service panel"| node_pihole
node_servicecards -->|"maps runtime state"| node_statusutil
node_identity -->|"labels runtime state"| node_statusutil
node_history -->|"loads history"| node_historyhook
node_historyhook -->|"fetches history"| node_api
node_media -->|"fetches telemetry"| node_api
node_network -->|"fetches telemetry"| node_api
node_pihole -->|"fetches telemetry"| node_api
node_jellyfin -->|"fetches telemetry"| node_api
node_overview -->|"shows status"| node_statusbanner
node_history -->|"shows freshness"| node_freshness
node_freshness -->|"reads current time"| node_now

click node_app "https://github.com/iain-crowe/atlas-web/blob/main/src/App.tsx"
click node_login "https://github.com/iain-crowe/atlas-web/blob/main/src/LoginView.tsx"
click node_auth "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useAuth.ts"
click node_api "https://github.com/iain-crowe/atlas-web/blob/main/src/api.tsx"
click node_services "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useServices.ts"
click node_polling "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/usePolling.ts"
click node_servicecards "https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceCard.tsx"
click node_detail "https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceDetail.tsx"
click node_identity "https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceIdentity.tsx"
click node_statusutil "https://github.com/iain-crowe/atlas-web/blob/main/src/utils/serviceStatus.ts"
click node_confirm "https://github.com/iain-crowe/atlas-web/blob/main/src/components/ConfirmServiceAction.tsx"
click node_system "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useSystemStatus.ts"
click node_minecraft "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useMinecraftStatus.ts"
click node_historyhook "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useHistory.ts"
click node_history "https://github.com/iain-crowe/atlas-web/blob/main/src/components/HistoryPanel.tsx"
click node_media "https://github.com/iain-crowe/atlas-web/blob/main/src/components/MediaPanel.tsx"
click node_network "https://github.com/iain-crowe/atlas-web/blob/main/src/components/NetworkPanel.tsx"
click node_pihole "https://github.com/iain-crowe/atlas-web/blob/main/src/components/PiHolePanel.tsx"
click node_jellyfin "https://github.com/iain-crowe/atlas-web/blob/main/src/components/JellyfinPanel.tsx"
click node_overview "https://github.com/iain-crowe/atlas-web/blob/main/src/components/SystemOverview.tsx"
click node_runtime "https://github.com/iain-crowe/atlas-web/blob/main/src/components/RuntimeSummary.tsx"
click node_freshness "https://github.com/iain-crowe/atlas-web/blob/main/src/components/Freshness.tsx"
click node_statusbanner "https://github.com/iain-crowe/atlas-web/blob/main/src/components/StatusBanner.tsx"
click node_now "https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useNow.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_login,node_auth,node_api toneBlue
class node_services,node_polling,node_servicecards,node_detail,node_identity,node_statusutil,node_confirm toneAmber
class node_system,node_minecraft,node_historyhook,node_history,node_media,node_network,node_pihole,node_jellyfin,node_overview,node_runtime,node_backend toneMint
class node_freshness,node_statusbanner,node_now toneRose
class node_user toneIndigo
```

## Components

### Console

- [Atlas App](https://github.com/iain-crowe/atlas-web/blob/main/src/App.tsx): `src/App.tsx`
- [Login View](https://github.com/iain-crowe/atlas-web/blob/main/src/LoginView.tsx): `src/LoginView.tsx`
- [Authentication](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useAuth.ts): `src/hooks/useAuth.ts`
- [API Client](https://github.com/iain-crowe/atlas-web/blob/main/src/api.tsx): `src/api.tsx`

### Service Management

- [Service Polling](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useServices.ts): `src/hooks/useServices.ts`
- [Polling Hook](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/usePolling.ts): `src/hooks/usePolling.ts`
- [Service Cards](https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceCard.tsx): `src/components/ServiceCard.tsx`
- [Service Detail](https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceDetail.tsx): `src/components/ServiceDetail.tsx`
- [Service Identity](https://github.com/iain-crowe/atlas-web/blob/main/src/components/ServiceIdentity.tsx): `src/components/ServiceIdentity.tsx`
- [Status Mapping](https://github.com/iain-crowe/atlas-web/blob/main/src/utils/serviceStatus.ts): `src/utils/serviceStatus.ts`
- [Action Confirmation](https://github.com/iain-crowe/atlas-web/blob/main/src/components/ConfirmServiceAction.tsx): `src/components/ConfirmServiceAction.tsx`

### Telemetry

- [Host Status](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useSystemStatus.ts): `src/hooks/useSystemStatus.ts`
- [Minecraft Status](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useMinecraftStatus.ts): `src/hooks/useMinecraftStatus.ts`
- [History Fetching](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useHistory.ts): `src/hooks/useHistory.ts`
- [History Charts](https://github.com/iain-crowe/atlas-web/blob/main/src/components/HistoryPanel.tsx): `src/components/HistoryPanel.tsx`
- [Media Panel](https://github.com/iain-crowe/atlas-web/blob/main/src/components/MediaPanel.tsx): `src/components/MediaPanel.tsx`
- [Network Panel](https://github.com/iain-crowe/atlas-web/blob/main/src/components/NetworkPanel.tsx): `src/components/NetworkPanel.tsx`
- [Pi-hole Panel](https://github.com/iain-crowe/atlas-web/blob/main/src/components/PiHolePanel.tsx): `src/components/PiHolePanel.tsx`
- [Jellyfin Panel](https://github.com/iain-crowe/atlas-web/blob/main/src/components/JellyfinPanel.tsx): `src/components/JellyfinPanel.tsx`
- [System Overview](https://github.com/iain-crowe/atlas-web/blob/main/src/components/SystemOverview.tsx): `src/components/SystemOverview.tsx`
- [Runtime Summary](https://github.com/iain-crowe/atlas-web/blob/main/src/components/RuntimeSummary.tsx): `src/components/RuntimeSummary.tsx`

### Shared UI

- [Freshness Indicator](https://github.com/iain-crowe/atlas-web/blob/main/src/components/Freshness.tsx): `src/components/Freshness.tsx`
- [Status Banner](https://github.com/iain-crowe/atlas-web/blob/main/src/components/StatusBanner.tsx): `src/components/StatusBanner.tsx`
- [Clock Hook](https://github.com/iain-crowe/atlas-web/blob/main/src/hooks/useNow.ts): `src/hooks/useNow.ts`

### Other components

- **Operator**
- **Atlas API**

## Connections

- Operator → Atlas App: uses console (evidence: `src/App.tsx`)
- Atlas App → Authentication: checks session (evidence: `src/App.tsx`)
- Atlas App → Login View: shows sign-in (evidence: `src/App.tsx`)
- Login View → Authentication: submits credentials (evidence: `src/LoginView.tsx`)
- Authentication → API Client: checks session (evidence: `src/hooks/useAuth.ts`)
- Authentication → Atlas API: authenticates (evidence: `src/hooks/useAuth.ts`)
- API Client → Atlas API: sends API requests (evidence: `src/api.tsx`)
- Atlas App → Service Polling: loads services (evidence: `src/App.tsx`)
- Atlas App → Host Status: loads host status (evidence: `src/App.tsx`)
- Atlas App → Minecraft Status: loads game status (evidence: `src/App.tsx`)
- Service Polling → Polling Hook: polls services (evidence: `src/hooks/useServices.ts`)
- Host Status → Polling Hook: polls status (evidence: `src/hooks/useSystemStatus.ts`)
- Minecraft Status → API Client: fetches telemetry (evidence: `src/hooks/useMinecraftStatus.ts`)
- Polling Hook → API Client: fetches data (evidence: `src/hooks/usePolling.ts`)
- Atlas App → Service Cards: renders services (evidence: `src/App.tsx`)
- Atlas App → Service Detail: renders selection (evidence: `src/App.tsx`)
- Atlas App → Action Confirmation: confirms action (evidence: `src/App.tsx`)
- Atlas App → API Client: posts service action (evidence: `src/App.tsx`)
- Atlas App → Media Panel: renders media view (evidence: `src/App.tsx`)
- Atlas App → Network Panel: renders network view (evidence: `src/App.tsx`)
- Atlas App → History Charts: renders host history (evidence: `src/App.tsx`)
- Atlas App → System Overview: renders overview (evidence: `src/App.tsx`)
- Atlas App → Runtime Summary: renders summary (evidence: `src/App.tsx`)
- Service Detail → Service Identity: renders identity (evidence: `src/components/ServiceDetail.tsx`)
- Service Detail → Minecraft Status: displays status (evidence: `src/App.tsx`)
- Service Detail → History Charts: renders game history (evidence: `src/components/ServiceDetail.tsx`)
- Service Detail → Jellyfin Panel: renders service panel (evidence: `src/components/ServiceDetail.tsx`)
- Service Detail → Pi-hole Panel: renders service panel (evidence: `src/components/ServiceDetail.tsx`)
- Service Cards → Status Mapping: maps runtime state (evidence: `src/components/ServiceCard.tsx`)
- Service Identity → Status Mapping: labels runtime state (evidence: `src/components/ServiceIdentity.tsx`)
- History Charts → History Fetching: loads history (evidence: `src/components/HistoryPanel.tsx`)
- History Fetching → API Client: fetches history (evidence: `src/hooks/useHistory.ts`)
- Media Panel → API Client: fetches telemetry (evidence: `src/components/MediaPanel.tsx`)
- Network Panel → API Client: fetches telemetry (evidence: `src/components/NetworkPanel.tsx`)
- Pi-hole Panel → API Client: fetches telemetry (evidence: `src/components/PiHolePanel.tsx`)
- Jellyfin Panel → API Client: fetches telemetry (evidence: `src/components/JellyfinPanel.tsx`)
- System Overview → Status Banner: shows status (evidence: `src/components/SystemOverview.tsx`)
- History Charts → Freshness Indicator: shows freshness (evidence: `src/components/HistoryPanel.tsx`)
- Freshness Indicator → Clock Hook: reads current time (evidence: `src/components/Freshness.tsx`)
