# aswina1636/homeserver-v2-release architecture

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

- Interactive diagram: https://gitdiagram.com/aswina1636/homeserver-v2-release
- Repository: https://github.com/aswina1636/homeserver-v2-release

## Overview

HomeServer V2 is a self-hosted private-cloud platform. Users register or sign in, verify identity, then manage files in personal or shared workspaces; administrators additionally manage users, storage, backups, and diagnostics. The map separates the web client, API entry and identity/workspace workflows, file/storage handling, and operational administration. The README documents several product capabilities whose route implementations were not sampled; relationships for those are limited to indexed references or documented behavior.

Main entry points: [`backend/app/main.py`](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/main.py) (API application), [`backend/app/models/entities.py`](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/models/entities.py) (Domain records), [`frontend/src/App.tsx`](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/App.tsx) (Web application), [`frontend/src/api.ts`](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/api.ts) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_admin_ui["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_network_ui["Network tools UI"]
  node_storage_ui["Storage UI"]
end

subgraph group_identity["Identity and workspaces"]
  node_api_entry["API application<br/>[main.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_workspace_routes["Workspace membership<br/>[workspaces.py]"]
  node_security["Session security<br/>[security.py]"]
  node_email_service["Email delivery<br/>[email.py]"]
  node_entities["Domain records<br/>[entities.py]"]
end

subgraph group_files["Files and storage"]
  node_file_routes["File operations<br/>[files.py]"]
  node_storage_routes["Storage management<br/>[storage.py]"]
  node_storage_service["Storage service<br/>[storage.py]"]
end

subgraph group_operations["Administration and operations"]
  node_admin_routes["Admin controls<br/>[admin.py]"]
  node_network_routes["Network diagnostics<br/>[network.py]"]
  node_network_service["Network tools<br/>[networking.py]"]
  node_backup_routes["Backup endpoints<br/>[backups.py]"]
  node_backup_service["Backup restore<br/>[backups.py]"]
  node_database[("Application database<br/>[database.py]")]
end

node_user(("User"))
node_email_provider["SMTP or Resend"]
node_host_helper["Host storage helper"]

node_user -->|"uses"| node_webapp
node_webapp -->|"requests through"| node_api_client
node_webapp -->|"renders"| node_admin_ui
node_webapp -->|"renders"| node_network_ui
node_webapp -->|"renders"| node_storage_ui
node_admin_ui -->|"calls"| node_api_client
node_network_ui -->|"calls"| node_api_client
node_storage_ui -->|"calls"| node_api_client
node_api_client -.->|"HTTP requests"| node_api_entry
node_api_entry -->|"mounts routes"| node_auth_routes
node_api_entry -->|"mounts routes"| node_file_routes
node_api_entry -->|"mounts routes"| node_workspace_routes
node_api_entry -->|"mounts routes"| node_storage_routes
node_api_entry -->|"mounts routes"| node_admin_routes
node_api_entry -->|"mounts routes"| node_network_routes
node_api_entry -->|"mounts routes"| node_backup_routes
node_auth_routes -->|"hashes tokens"| node_security
node_auth_routes -->|"delivers codes"| node_email_service
node_auth_routes -->|"reads and writes"| node_entities
node_workspace_routes -->|"reads and writes"| node_entities
node_workspace_routes -->|"sends invitations"| node_email_service
node_file_routes -->|"uses storage"| node_storage_service
node_file_routes -->|"tracks files"| node_entities
node_storage_routes -->|"delegates storage"| node_storage_service
node_storage_routes -->|"manages locations"| node_entities
node_storage_service -->|"RPC requests"| node_host_helper
node_admin_routes -->|"manages records"| node_entities
node_admin_routes -->|"runs diagnostics"| node_network_service
node_network_routes -->|"runs tools"| node_network_service
node_network_routes -->|"records activity"| node_entities
node_backup_routes -->|"delegates backup"| node_backup_service
node_email_service -.->|"sends mail"| node_email_provider
node_database -->|"maps records"| node_entities

click node_webapp "https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/App.tsx"
click node_api_client "https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/api.ts"
click node_admin_ui "https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/AdminDashboard.tsx"
click node_network_ui "https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/NetworkManagement.tsx"
click node_storage_ui "https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/StorageManagement.tsx"
click node_api_entry "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/main.py"
click node_auth_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/auth.py"
click node_workspace_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/workspaces.py"
click node_security "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/core/security.py"
click node_file_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/files.py"
click node_storage_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/storage.py"
click node_storage_service "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/storage.py"
click node_admin_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/admin.py"
click node_network_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/network.py"
click node_network_service "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/networking.py"
click node_backup_routes "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/backups.py"
click node_backup_service "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/backups.py"
click node_email_service "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/email.py"
click node_entities "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/models/entities.py"
click node_database "https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/core/database.py"

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_webapp,node_api_client,node_admin_ui,node_network_ui,node_storage_ui,node_user toneBlue
class node_api_entry,node_auth_routes,node_workspace_routes,node_security,node_email_service,node_entities,node_host_helper toneAmber
class node_file_routes,node_storage_routes,node_storage_service toneMint
class node_admin_routes,node_network_routes,node_network_service,node_backup_routes,node_backup_service,node_database toneRose
class node_email_provider toneIndigo
```

## Components

### Web client

- [Web application](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/api.ts): `frontend/src/api.ts`
- [Admin dashboard](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/AdminDashboard.tsx): `frontend/src/AdminDashboard.tsx`
- [Network tools UI](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/NetworkManagement.tsx): `frontend/src/NetworkManagement.tsx`
- [Storage UI](https://github.com/aswina1636/homeserver-v2-release/blob/main/frontend/src/StorageManagement.tsx): `frontend/src/StorageManagement.tsx`

### Identity and workspaces

- [API application](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Workspace membership](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/workspaces.py): `backend/app/api/workspaces.py`
- [Session security](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [Email delivery](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/email.py): `backend/app/services/email.py`
- [Domain records](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/models/entities.py): `backend/app/models/entities.py`

### Files and storage

- [File operations](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/files.py): `backend/app/api/files.py`
- [Storage management](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/storage.py): `backend/app/api/storage.py`
- [Storage service](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/storage.py): `backend/app/services/storage.py`

### Administration and operations

- [Admin controls](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/admin.py): `backend/app/api/admin.py`
- [Network diagnostics](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/network.py): `backend/app/api/network.py`
- [Network tools](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/networking.py): `backend/app/services/networking.py`
- [Backup endpoints](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/api/backups.py): `backend/app/api/backups.py`
- [Backup restore](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/services/backups.py): `backend/app/services/backups.py`
- [Application database](https://github.com/aswina1636/homeserver-v2-release/blob/main/backend/app/core/database.py): `backend/app/core/database.py`

### Other components

- **User**
- **SMTP or Resend**
- **Host storage helper**

## Connections

- User → Web application: uses (evidence: `README.md`)
- Web application → API client: requests through (evidence: `frontend/src/App.tsx`)
- Web application → Admin dashboard: renders (evidence: `frontend/src/App.tsx`)
- Web application → Network tools UI: renders (evidence: `frontend/src/App.tsx`)
- Web application → Storage UI: renders (evidence: `frontend/src/App.tsx`)
- Admin dashboard → API client: calls (evidence: `frontend/src/AdminDashboard.tsx`)
- Network tools UI → API client: calls (evidence: `frontend/src/NetworkManagement.tsx`)
- Storage UI → API client: calls (evidence: `frontend/src/StorageManagement.tsx`)
- API client → API application: HTTP requests
- API application → Authentication: mounts routes (evidence: `backend/app/main.py`)
- API application → File operations: mounts routes (evidence: `backend/app/main.py`)
- API application → Workspace membership: mounts routes (evidence: `backend/app/main.py`)
- API application → Storage management: mounts routes (evidence: `backend/app/main.py`)
- API application → Admin controls: mounts routes (evidence: `backend/app/main.py`)
- API application → Network diagnostics: mounts routes (evidence: `backend/app/main.py`)
- API application → Backup endpoints: mounts routes (evidence: `backend/app/main.py`)
- Authentication → Session security: hashes tokens (evidence: `backend/app/api/auth.py`)
- Authentication → Email delivery: delivers codes (evidence: `backend/app/api/auth.py`)
- Authentication → Domain records: reads and writes (evidence: `backend/app/api/auth.py`)
- Workspace membership → Domain records: reads and writes (evidence: `backend/app/api/workspaces.py`)
- Workspace membership → Email delivery: sends invitations (evidence: `backend/app/api/workspaces.py`)
- File operations → Storage service: uses storage (evidence: `backend/app/api/files.py`)
- File operations → Domain records: tracks files (evidence: `backend/app/api/files.py`)
- Storage management → Storage service: delegates storage (evidence: `backend/app/api/storage.py`)
- Storage management → Domain records: manages locations (evidence: `backend/app/api/storage.py`)
- Storage service → Host storage helper: RPC requests (evidence: `backend/app/services/storage.py`)
- Admin controls → Domain records: manages records (evidence: `backend/app/api/admin.py`)
- Admin controls → Network tools: runs diagnostics (evidence: `backend/app/api/admin.py`)
- Network diagnostics → Network tools: runs tools (evidence: `backend/app/api/network.py`)
- Network diagnostics → Domain records: records activity (evidence: `backend/app/api/network.py`)
- Backup endpoints → Backup restore: delegates backup (evidence: `backend/app/api/backups.py`)
- Email delivery → SMTP or Resend: sends mail (evidence: `README.md`)
- Application database → Domain records: maps records (evidence: `backend/app/models/entities.py`)
