# shaneisrael/fireshare architecture

> Architecture diagram of the GitHub repository shaneisrael/fireshare, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shaneisrael/fireshare
- Repository: https://github.com/shaneisrael/fireshare
- Video tour (about a minute): https://gitdiagram.com/shaneisrael/fireshare/video

## Overview

Fireshare is a self-hosted media library for sharing game clips, videos, and images through public or link-only links. A viewer opens the web client, browses or follows a share link, and plays media; the client’s service layer communicates with Flask API routes, which use media models and stored files. Separate branches support ingestion and uploads, library administration, games and tags, and account security. The README documents additional capabilities such as transcoding, profiles, RSS, and notifications; some implementation links are omitted because their source was not sampled.

Main entry points: [`app/server/fireshare/api/__init__.py`](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/__init__.py) (API registration), [`app/server/fireshare/models.py`](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/models.py) (Media records), [`app/client/src/App.js`](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/App.js) (Client routing), [`app/client/src/views/Watch.js`](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Watch.js) (Video viewing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_client_app["Client routing<br/>[App.js]"]
  node_watch["Video viewing<br/>[Watch.js]"]
  node_browse["Media browsing<br/>[Home.js]"]
  node_video_player["Video player<br/>[VideoJSPlayer.js]"]
  node_client_services["API services<br/>[Api.js]"]
  node_auth_client["Login interface<br/>[Login.js]"]
end

subgraph group_api["Flask API"]
  node_api_routes["API registration<br/>[__init__.py]"]
  node_video_api["Video routes<br/>[video.py]"]
  node_image_api["Image routes<br/>[image.py]"]
  node_upload_api["Upload routes<br/>[upload.py]"]
  node_scan_api["Library scanning<br/>[scan.py]"]
  node_admin_api["Library administration<br/>[admin.py]"]
  node_transcoding["Transcoding<br/>[transcoding.py]"]
  node_game_api["Games and metadata<br/>[game.py]"]
  node_tag_api["Tags<br/>[tag.py]"]
  node_folder_api["Folder sharing<br/>[folder.py]"]
  node_rss_notifications["RSS and notifications"]
end

subgraph group_media["Media library"]
  node_media_models["Media records<br/>[models.py]"]
  node_media_store[("Media database<br/>[models.py]")]
  node_media_files[("Media files")]
end

subgraph group_accounts["Accounts and security"]
  node_auth_api["Login and MFA<br/>[auth.py]"]
  node_user_api["Users and profiles<br/>[users.py]"]
  node_permissions["Permission rules<br/>[permissions.py]"]
end

node_viewer(("Viewer"))
node_external_services(("External integrations"))

node_viewer -->|"uses"| node_client_app
node_client_app -->|"routes to"| node_watch
node_client_app -->|"routes to"| node_browse
node_watch -.->|"renders"| node_video_player
node_watch -.->|"requests media"| node_client_services
node_client_services -.->|"sends API requests"| node_api_routes
node_api_routes -->|"registers"| node_video_api
node_api_routes -->|"registers"| node_image_api
node_api_routes -->|"registers"| node_upload_api
node_api_routes -->|"registers"| node_scan_api
node_api_routes -->|"registers"| node_admin_api
node_api_routes -->|"registers"| node_transcoding
node_api_routes -->|"registers"| node_game_api
node_api_routes -->|"registers"| node_tag_api
node_api_routes -->|"registers"| node_folder_api
node_video_api -->|"uses records"| node_media_models
node_video_api -.->|"serves originals"| node_media_files
node_media_models -->|"persists records"| node_media_store
node_scan_api -.->|"updates catalog"| node_media_models
node_upload_api -.->|"accepts uploads"| node_media_files
node_transcoding -.->|"creates renditions"| node_media_files
node_admin_api -->|"manages records"| node_media_models
node_viewer -->|"signs in"| node_auth_client
node_auth_client -.->|"uses services"| node_client_services
node_auth_api -->|"checks access"| node_permissions
node_user_api -.->|"applies rules"| node_permissions
node_api_routes -->|"registers"| node_user_api
node_game_api -.->|"uses records"| node_media_models
node_tag_api -.->|"uses records"| node_media_models
node_folder_api -.->|"uses records"| node_media_models
node_external_services -.->|"receives notices"| node_rss_notifications

click node_client_app "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/App.js"
click node_watch "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Watch.js"
click node_browse "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Home.js"
click node_video_player "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/components/player/VideoJSPlayer.js"
click node_client_services "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/services/Api.js"
click node_api_routes "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/__init__.py"
click node_video_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/video.py"
click node_image_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/image.py"
click node_upload_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/upload.py"
click node_scan_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/scan.py"
click node_admin_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/admin.py"
click node_transcoding "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/transcoding.py"
click node_media_models "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/models.py"
click node_media_store "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/models.py"
click node_game_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/game.py"
click node_tag_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/tag.py"
click node_folder_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/folder.py"
click node_auth_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/auth.py"
click node_user_api "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/users.py"
click node_permissions "https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/permissions.py"
click node_auth_client "https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Login.js"
click node_rss_notifications "https://github.com/shaneisrael/fireshare/tree/main/app/server/fireshare"

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_client_app,node_watch,node_browse,node_video_player,node_client_services,node_auth_client,node_viewer toneBlue
class node_api_routes,node_video_api,node_image_api,node_upload_api,node_scan_api,node_admin_api,node_transcoding,node_game_api,node_tag_api,node_folder_api,node_rss_notifications toneAmber
class node_media_models,node_media_store,node_media_files toneMint
class node_auth_api,node_user_api,node_permissions toneRose
class node_external_services toneIndigo
```

## Components

### Web client

- [Client routing](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/App.js): `app/client/src/App.js`
- [Video viewing](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Watch.js): `app/client/src/views/Watch.js`
- [Media browsing](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Home.js): `app/client/src/views/Home.js`
- [Video player](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/components/player/VideoJSPlayer.js): `app/client/src/components/player/VideoJSPlayer.js`
- [API services](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/services/Api.js): `app/client/src/services/Api.js`
- [Login interface](https://github.com/shaneisrael/fireshare/blob/main/app/client/src/views/Login.js): `app/client/src/views/Login.js`

### Flask API

- [API registration](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/__init__.py): `app/server/fireshare/api/__init__.py`
- [Video routes](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/video.py): `app/server/fireshare/api/video.py`
- [Image routes](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/image.py): `app/server/fireshare/api/image.py`
- [Upload routes](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/upload.py): `app/server/fireshare/api/upload.py`
- [Library scanning](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/scan.py): `app/server/fireshare/api/scan.py`
- [Library administration](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/admin.py): `app/server/fireshare/api/admin.py`
- [Transcoding](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/transcoding.py): `app/server/fireshare/api/transcoding.py`
- [Games and metadata](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/game.py): `app/server/fireshare/api/game.py`
- [Tags](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/tag.py): `app/server/fireshare/api/tag.py`
- [Folder sharing](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/folder.py): `app/server/fireshare/api/folder.py`
- [RSS and notifications](https://github.com/shaneisrael/fireshare/tree/main/app/server/fireshare): `app/server/fireshare`

### Media library

- [Media records](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/models.py): `app/server/fireshare/models.py`
- [Media database](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/models.py): `app/server/fireshare/models.py`
- **Media files**

### Accounts and security

- [Login and MFA](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/auth.py): `app/server/fireshare/auth.py`
- [Users and profiles](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/api/users.py): `app/server/fireshare/api/users.py`
- [Permission rules](https://github.com/shaneisrael/fireshare/blob/main/app/server/fireshare/permissions.py): `app/server/fireshare/permissions.py`

### Other components

- **Viewer**
- **External integrations**

## Connections

- Viewer → Client routing: uses (evidence: `README.md`)
- Client routing → Video viewing: routes to (evidence: `app/client/src/App.js`)
- Client routing → Media browsing: routes to (evidence: `app/client/src/App.js`)
- Video viewing → Video player: renders
- Video viewing → API services: requests media
- API services → API registration: sends API requests
- API registration → Video routes: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Image routes: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Upload routes: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Library scanning: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Library administration: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Transcoding: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Games and metadata: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Tags: registers (evidence: `app/server/fireshare/api/__init__.py`)
- API registration → Folder sharing: registers (evidence: `app/server/fireshare/api/__init__.py`)
- Video routes → Media records: uses records (evidence: `app/server/fireshare/api/video.py`)
- Video routes → Media files: serves originals
- Media records → Media database: persists records (evidence: `app/server/fireshare/models.py`)
- Library scanning → Media records: updates catalog
- Upload routes → Media files: accepts uploads
- Transcoding → Media files: creates renditions
- Library administration → Media records: manages records (evidence: `app/server/fireshare/api/admin.py`)
- Viewer → Login interface: signs in (evidence: `README.md`)
- Login interface → API services: uses services
- Login and MFA → Permission rules: checks access (evidence: `app/server/fireshare/auth.py`)
- Users and profiles → Permission rules: applies rules
- API registration → Users and profiles: registers (evidence: `app/server/fireshare/api/__init__.py`)
- Games and metadata → Media records: uses records
- Tags → Media records: uses records
- Folder sharing → Media records: uses records
- External integrations → RSS and notifications: receives notices
