# mifada2543/meel-hub architecture

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

- Interactive diagram: https://gitdiagram.com/mifada2543/meel-hub
- Repository: https://github.com/mifada2543/meel-hub

## Overview

MEeL-HUB is a self-hosted media platform for browsing and streaming video and music, reading books, and managing files in a cloud drive. A typical video-viewing flow reaches the watch controller, which obtains media and interaction data through MediaViewer and prepares playback details, including HLS and subtitles. The README also describes social, account-security, administration, and media-processing capabilities. Some of those subsystems are represented at their exact enclosing directory because their implementation was not sampled; their internal wiring is not inferred.

Main entry points: [`controllers/api/WatchController.php`](https://github.com/mifada2543/meel-hub/blob/main/controllers/api/WatchController.php) (Watch controller), [`video/watch.php`](https://github.com/mifada2543/meel-hub/blob/main/video/watch.php) (Video watch), [`books/read.php`](https://github.com/mifada2543/meel-hub/blob/main/books/read.php) (Book reader), [`drive/index.php`](https://github.com/mifada2543/meel-hub/blob/main/drive/index.php) (Drive browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_media["Media library"]
  node_video_library["Video library<br/>[index.php]"]
  node_video_watch["Video watch<br/>[watch.php]"]
  node_watch_controller["Watch controller"]
  node_media_viewer["Media viewer<br/>[MediaViewer.php]"]
  node_search["Media search<br/>[SearchEngine.php]"]
  node_music_library["Music library<br/>[index.php]"]
  node_music_watch["Music watch<br/>[watch.php]"]
  node_media_storage["Media files<br/>[storage.php]"]
  node_transcoding["Transcoding"]
end

subgraph group_books["Book reading"]
  node_books_library["Book library<br/>[index.php]"]
  node_book_reader["Book reader<br/>[read.php]"]
  node_book_files["Book delivery<br/>[file.php]"]
end

subgraph group_drive["Cloud drive"]
  node_drive_ui["Drive browser<br/>[index.php]"]
  node_drive_service["Drive service<br/>[DriveService.php]"]
  node_drive_files["Drive operations"]
end

subgraph group_identity["Identity and community"]
  node_auth["Authentication and MFA"]
  node_social["Comments and interactions"]
  node_profile["User profiles<br/>[index.php]"]
end

subgraph group_operations["Administration and processing"]
  node_admin["Admin console<br/>[index.php]"]
  node_admin_actions["Admin actions"]
  node_admin_state[("Application data")]
  node_downloader["URL downloader"]
end

node_visitor(("Visitor / member"))
node_external_tools["yt-dlp and FFmpeg"]

node_visitor -->|"browse"| node_video_library
node_visitor -->|"watch"| node_video_watch
node_video_watch -->|"prepare view"| node_watch_controller
node_watch_controller -->|"fetch media"| node_media_viewer
node_watch_controller -->|"load interactions"| node_media_viewer
node_visitor -->|"browse"| node_music_library
node_visitor -->|"listen"| node_music_watch
node_visitor -->|"search"| node_search
node_visitor -->|"browse"| node_books_library
node_visitor -->|"read"| node_book_reader
node_book_reader -->|"request pages"| node_book_files
node_visitor -->|"manage files"| node_drive_ui
node_drive_ui -->|"use storage"| node_drive_service
node_visitor -->|"sign in"| node_auth
node_visitor -->|"view profile"| node_profile
node_visitor -->|"interact"| node_social
node_visitor -->|"administer"| node_admin
node_admin -->|"dispatch actions"| node_admin_actions
node_admin_actions -->|"read and write"| node_admin_state
node_visitor -->|"submit URL"| node_downloader
node_downloader -->|"invoke"| node_external_tools
node_transcoding -->|"encode media"| node_external_tools

click node_video_library "https://github.com/mifada2543/meel-hub/blob/main/video/index.php"
click node_video_watch "https://github.com/mifada2543/meel-hub/blob/main/video/watch.php"
click node_watch_controller "https://github.com/mifada2543/meel-hub/blob/main/controllers/api/WatchController.php"
click node_media_viewer "https://github.com/mifada2543/meel-hub/blob/main/modules/media/MediaViewer.php"
click node_search "https://github.com/mifada2543/meel-hub/blob/main/modules/media/SearchEngine.php"
click node_music_library "https://github.com/mifada2543/meel-hub/blob/main/music/index.php"
click node_music_watch "https://github.com/mifada2543/meel-hub/blob/main/music/watch.php"
click node_media_storage "https://github.com/mifada2543/meel-hub/blob/main/modules/core/helpers/storage.php"
click node_transcoding "https://github.com/mifada2543/meel-hub/tree/main/modules/transcoder"
click node_books_library "https://github.com/mifada2543/meel-hub/blob/main/books/index.php"
click node_book_reader "https://github.com/mifada2543/meel-hub/blob/main/books/read.php"
click node_book_files "https://github.com/mifada2543/meel-hub/blob/main/books/file.php"
click node_drive_ui "https://github.com/mifada2543/meel-hub/blob/main/drive/index.php"
click node_drive_service "https://github.com/mifada2543/meel-hub/blob/main/drive/DriveService.php"
click node_drive_files "https://github.com/mifada2543/meel-hub/tree/main/drive"
click node_auth "https://github.com/mifada2543/meel-hub/tree/main/auth"
click node_social "https://github.com/mifada2543/meel-hub/tree/main/controllers/api"
click node_profile "https://github.com/mifada2543/meel-hub/blob/main/profile/index.php"
click node_admin "https://github.com/mifada2543/meel-hub/blob/main/admin/index.php"
click node_admin_actions "https://github.com/mifada2543/meel-hub/tree/main/controllers/admin"
click node_downloader "https://github.com/mifada2543/meel-hub/blob/main/modules/transcoder/DownloadService.php"

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_video_library,node_video_watch,node_watch_controller,node_media_viewer,node_search,node_music_library,node_music_watch,node_media_storage,node_transcoding toneBlue
class node_books_library,node_book_reader,node_book_files toneAmber
class node_drive_ui,node_drive_service,node_drive_files toneMint
class node_auth,node_social,node_profile toneRose
class node_admin,node_admin_actions,node_admin_state,node_downloader,node_visitor,node_external_tools toneIndigo
```

## Components

### Media library

- [Video library](https://github.com/mifada2543/meel-hub/blob/main/video/index.php): `video/index.php`
- [Video watch](https://github.com/mifada2543/meel-hub/blob/main/video/watch.php): `video/watch.php`
- [Watch controller](https://github.com/mifada2543/meel-hub/blob/main/controllers/api/WatchController.php): `controllers/api/WatchController.php`
- [Media viewer](https://github.com/mifada2543/meel-hub/blob/main/modules/media/MediaViewer.php): `modules/media/MediaViewer.php`
- [Media search](https://github.com/mifada2543/meel-hub/blob/main/modules/media/SearchEngine.php): `modules/media/SearchEngine.php`
- [Music library](https://github.com/mifada2543/meel-hub/blob/main/music/index.php): `music/index.php`
- [Music watch](https://github.com/mifada2543/meel-hub/blob/main/music/watch.php): `music/watch.php`
- [Media files](https://github.com/mifada2543/meel-hub/blob/main/modules/core/helpers/storage.php): `modules/core/helpers/storage.php`
- [Transcoding](https://github.com/mifada2543/meel-hub/tree/main/modules/transcoder): `modules/transcoder`

### Book reading

- [Book library](https://github.com/mifada2543/meel-hub/blob/main/books/index.php): `books/index.php`
- [Book reader](https://github.com/mifada2543/meel-hub/blob/main/books/read.php): `books/read.php`
- [Book delivery](https://github.com/mifada2543/meel-hub/blob/main/books/file.php): `books/file.php`

### Cloud drive

- [Drive browser](https://github.com/mifada2543/meel-hub/blob/main/drive/index.php): `drive/index.php`
- [Drive service](https://github.com/mifada2543/meel-hub/blob/main/drive/DriveService.php): `drive/DriveService.php`
- [Drive operations](https://github.com/mifada2543/meel-hub/tree/main/drive): `drive`

### Identity and community

- [Authentication and MFA](https://github.com/mifada2543/meel-hub/tree/main/auth): `auth`
- [Comments and interactions](https://github.com/mifada2543/meel-hub/tree/main/controllers/api): `controllers/api`
- [User profiles](https://github.com/mifada2543/meel-hub/blob/main/profile/index.php): `profile/index.php`

### Administration and processing

- [Admin console](https://github.com/mifada2543/meel-hub/blob/main/admin/index.php): `admin/index.php`
- [Admin actions](https://github.com/mifada2543/meel-hub/tree/main/controllers/admin): `controllers/admin`
- **Application data**
- [URL downloader](https://github.com/mifada2543/meel-hub/blob/main/modules/transcoder/DownloadService.php): `modules/transcoder/DownloadService.php`

### Other components

- **Visitor / member**
- **yt-dlp and FFmpeg**

## Connections

- Visitor / member → Video library: browse
- Visitor / member → Video watch: watch
- Video watch → Watch controller: prepare view
- Watch controller → Media viewer: fetch media
- Watch controller → Media viewer: load interactions
- Visitor / member → Music library: browse
- Visitor / member → Music watch: listen
- Visitor / member → Media search: search
- Visitor / member → Book library: browse
- Visitor / member → Book reader: read
- Book reader → Book delivery: request pages
- Visitor / member → Drive browser: manage files
- Drive browser → Drive service: use storage
- Visitor / member → Authentication and MFA: sign in
- Visitor / member → User profiles: view profile
- Visitor / member → Comments and interactions: interact
- Visitor / member → Admin console: administer
- Admin console → Admin actions: dispatch actions
- Admin actions → Application data: read and write
- Visitor / member → URL downloader: submit URL
- URL downloader → yt-dlp and FFmpeg: invoke
- Transcoding → yt-dlp and FFmpeg: encode media
