# seymenkonuk/php-video-platform architecture

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

- Interactive diagram: https://gitdiagram.com/seymenkonuk/php-video-platform
- Repository: https://github.com/seymenkonuk/php-video-platform

## Overview

This is a server-rendered video-sharing platform for discovering and watching videos, shorts, and music; managing channels and playlists; and interacting with content. The request path is routed to controllers, which call domain services and return page or component responses. Authenticated users also manage their content through Studio. The graph preserves these distinct product areas and the documented SQL-backed channel repository. Several service implementations and domain flows are unsampled, so their internal links are omitted rather than inferred.

Main entry points: [`routes/WebRoutes.php`](https://github.com/seymenkonuk/php-video-platform/blob/main/routes/WebRoutes.php) (Web routes), [`app/Domain/Services/Concrete/AuthService.php`](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/AuthService.php) (Authentication), [`app/Http/Controllers/Channel/ChannelController.php`](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Channel/ChannelController.php) (Channel pages), [`app/Http/Controllers/FeedController.php`](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/FeedController.php) (Feed pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Web requests"]
  node_routes["Web routes<br/>[WebRoutes.php]"]
end

subgraph group_content["Content discovery"]
  node_channel_pages["Channel pages"]
  node_feed_pages["Feed pages<br/>[FeedController.php]"]
  node_music_interactions["Music interactions"]
end

subgraph group_studio["Creator studio"]
  node_studio_channel["Studio channels"]
end

subgraph group_domain["Domain and persistence"]
  node_feed_service["Feed service<br/>[FeedService.php]"]
  node_channel_service["Channel service<br/>[ChannelService.php]"]
  node_studio_service["Studio service<br/>[StudioService.php]"]
  node_music_service["Music service<br/>[MusicService.php]"]
  node_auth_service["Authentication<br/>[AuthService.php]"]
  node_auth_contract["Auth contract<br/>[IAuthService.php]"]
  node_studio_contract["Studio contract<br/>[IStudioService.php]"]
  node_channel_repository["Channel repository"]
  node_channel_model["Channel model<br/>[Channel.php]"]
  node_user_model["User model<br/>[User.php]"]
  node_video_model["Video model<br/>[Video.php]"]
  node_auth_dto["Auth data<br/>[AuthDTO.php]"]
end

subgraph group_presentation["Presentation"]
  node_context_factory["View contexts"]
  node_app_layout["App layout<br/>[App.php]"]
  node_auth_layout["Auth layout<br/>[Auth.php]"]
end

node_visitor(("Visitor"))
node_mysql[("MySQL")]

node_visitor -->|"requests"| node_routes
node_routes -->|"registers"| node_channel_pages
node_routes -->|"registers"| node_feed_pages
node_routes -->|"registers"| node_studio_channel
node_routes -->|"registers"| node_music_interactions
node_channel_pages -->|"calls"| node_channel_service
node_feed_pages -->|"calls"| node_feed_service
node_studio_channel -->|"calls"| node_studio_service
node_music_interactions -->|"calls"| node_music_service
node_music_interactions -->|"gets auth"| node_auth_service
node_channel_pages -->|"gets auth"| node_auth_service
node_feed_pages -->|"gets auth"| node_auth_service
node_studio_channel -->|"gets auth"| node_auth_service
node_auth_service -->|"implements"| node_auth_contract
node_studio_service -.->|"implements"| node_studio_contract
node_channel_repository -->|"uses model"| node_channel_model
node_channel_repository -.->|"queries"| node_mysql
node_context_factory -.->|"supplies context"| node_app_layout

click node_routes "https://github.com/seymenkonuk/php-video-platform/blob/main/routes/WebRoutes.php"
click node_channel_pages "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Channel/ChannelController.php"
click node_feed_pages "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/FeedController.php"
click node_feed_service "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/FeedService.php"
click node_channel_service "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/ChannelService.php"
click node_studio_channel "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Studio/ChannelController.php"
click node_studio_service "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/StudioService.php"
click node_music_interactions "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Music/MusicInteractionController.php"
click node_music_service "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/MusicService.php"
click node_auth_service "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/AuthService.php"
click node_auth_contract "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Abstract/IAuthService.php"
click node_studio_contract "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Abstract/IStudioService.php"
click node_channel_repository "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Repositories/Sql/ChannelRepository.php"
click node_channel_model "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/Channel.php"
click node_user_model "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/User.php"
click node_video_model "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/Video.php"
click node_auth_dto "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Support/DTOs/AuthDTO.php"
click node_context_factory "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Support/Factories/ViewContextFactory.php"
click node_app_layout "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Views/Layouts/App.php"
click node_auth_layout "https://github.com/seymenkonuk/php-video-platform/blob/main/app/Views/Layouts/Auth.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_routes toneBlue
class node_channel_pages,node_feed_pages,node_music_interactions,node_mysql toneAmber
class node_studio_channel toneMint
class node_feed_service,node_channel_service,node_studio_service,node_music_service,node_auth_service,node_auth_contract,node_studio_contract,node_channel_repository,node_channel_model,node_user_model,node_video_model,node_auth_dto toneRose
class node_context_factory,node_app_layout,node_auth_layout,node_visitor toneIndigo
```

## Components

### Web requests

- [Web routes](https://github.com/seymenkonuk/php-video-platform/blob/main/routes/WebRoutes.php): `routes/WebRoutes.php`

### Content discovery

- [Channel pages](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Channel/ChannelController.php): `app/Http/Controllers/Channel/ChannelController.php`
- [Feed pages](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/FeedController.php): `app/Http/Controllers/FeedController.php`
- [Music interactions](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Music/MusicInteractionController.php): `app/Http/Controllers/Music/MusicInteractionController.php`

### Creator studio

- [Studio channels](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Http/Controllers/Studio/ChannelController.php): `app/Http/Controllers/Studio/ChannelController.php`

### Domain and persistence

- [Feed service](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/FeedService.php): `app/Domain/Services/Concrete/FeedService.php`
- [Channel service](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/ChannelService.php): `app/Domain/Services/Concrete/ChannelService.php`
- [Studio service](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/StudioService.php): `app/Domain/Services/Concrete/StudioService.php`
- [Music service](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/MusicService.php): `app/Domain/Services/Concrete/MusicService.php`
- [Authentication](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Concrete/AuthService.php): `app/Domain/Services/Concrete/AuthService.php`
- [Auth contract](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Abstract/IAuthService.php): `app/Domain/Services/Abstract/IAuthService.php`
- [Studio contract](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Services/Abstract/IStudioService.php): `app/Domain/Services/Abstract/IStudioService.php`
- [Channel repository](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Repositories/Sql/ChannelRepository.php): `app/Domain/Repositories/Sql/ChannelRepository.php`
- [Channel model](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/Channel.php): `app/Domain/Models/Channel.php`
- [User model](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/User.php): `app/Domain/Models/User.php`
- [Video model](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Domain/Models/Video.php): `app/Domain/Models/Video.php`
- [Auth data](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Support/DTOs/AuthDTO.php): `app/Support/DTOs/AuthDTO.php`

### Presentation

- [View contexts](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Support/Factories/ViewContextFactory.php): `app/Support/Factories/ViewContextFactory.php`
- [App layout](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Views/Layouts/App.php): `app/Views/Layouts/App.php`
- [Auth layout](https://github.com/seymenkonuk/php-video-platform/blob/main/app/Views/Layouts/Auth.php): `app/Views/Layouts/Auth.php`

### Other components

- **Visitor**
- **MySQL**

## Connections

- Visitor → Web routes: requests (evidence: `routes/WebRoutes.php`)
- Web routes → Channel pages: registers (evidence: `routes/WebRoutes.php`)
- Web routes → Feed pages: registers (evidence: `routes/WebRoutes.php`)
- Web routes → Studio channels: registers (evidence: `routes/WebRoutes.php`)
- Web routes → Music interactions: registers (evidence: `routes/WebRoutes.php`)
- Channel pages → Channel service: calls (evidence: `app/Http/Controllers/Channel/ChannelController.php`)
- Feed pages → Feed service: calls (evidence: `app/Http/Controllers/FeedController.php`)
- Studio channels → Studio service: calls (evidence: `app/Http/Controllers/Studio/ChannelController.php`)
- Music interactions → Music service: calls (evidence: `app/Http/Controllers/Music/MusicInteractionController.php`)
- Music interactions → Authentication: gets auth (evidence: `app/Http/Controllers/Music/MusicInteractionController.php`)
- Channel pages → Authentication: gets auth (evidence: `app/Http/Controllers/Channel/ChannelController.php`)
- Feed pages → Authentication: gets auth (evidence: `app/Http/Controllers/FeedController.php`)
- Studio channels → Authentication: gets auth (evidence: `app/Http/Controllers/Studio/ChannelController.php`)
- Authentication → Auth contract: implements (evidence: `app/Domain/Services/Concrete/AuthService.php`)
- Studio service → Studio contract: implements (evidence: `app/Domain/Services/Concrete/StudioService.php`)
- Channel repository → Channel model: uses model (evidence: `app/Domain/Repositories/Sql/ChannelRepository.php`)
- Channel repository → MySQL: queries
- View contexts → App layout: supplies context (evidence: `app/Support/Factories/ViewContextFactory.php`)
