# mediabrowser/emby architecture

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

- Interactive diagram: https://gitdiagram.com/mediabrowser/emby
- Repository: https://github.com/mediabrowser/emby

## Overview

Emby Server is a personal media server offering a REST API and apps across many device types. A typical client workflow is to make an API request and receive server-managed media results; the README documents the API, while the source tree identifies the implementation subsystems. The graph also preserves distinct library, metadata, playback, live-TV, channel, and DLNA capabilities. Evidence is limited: sampled source establishes only some internal calls, so other likely relationships are omitted rather than inferred.

Main entry points: [`Emby.Server.Implementations/Devices/DeviceManager.cs`](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Devices/DeviceManager.cs) (Device management), [`MediaBrowser.Providers/Manager/ProviderManager.cs`](https://github.com/mediabrowser/emby/blob/master/MediaBrowser.Providers/Manager/ProviderManager.cs) (Metadata providers), [`Emby.Dlna/PlayTo/PlayToController.cs`](https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/PlayTo/PlayToController.cs) (DLNA playback control), [`Emby.Dlna/Profiles`](https://github.com/mediabrowser/emby/tree/master/Emby.Dlna/Profiles) (DLNA profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Client API"]
  node_rest["REST API<br/>[MediaBrowser.Api]"]
end

subgraph group_media["Media Library"]
  node_library["Library management<br/>[LibraryManager.cs]"]
  node_search["Library search<br/>[SearchEngine.cs]"]
  node_providers["Metadata providers<br/>[ProviderManager.cs]"]
  node_photos["Photo metadata<br/>[PhotoProvider.cs]"]
  node_playlists["Playlists<br/>[PlaylistManager.cs]"]
end

subgraph group_playback["Playback &amp; Devices"]
  node_sessions["Playback sessions<br/>[SessionManager.cs]"]
  node_devices["Device management<br/>[DeviceManager.cs]"]
  node_deviceid["Server device ID<br/>[DeviceId.cs]"]
  node_playto["DLNA playback control"]
  node_dlna_device["DLNA device control<br/>[Device.cs]"]
  node_dlna_profiles["DLNA profiles<br/>[Profiles]"]
  node_dlna_descriptions["DLNA descriptions"]
end

subgraph group_services["Media Services"]
  node_live_tv["Live TV<br/>[LiveTvManager.cs]"]
  node_channels["Channels<br/>[ChannelManager.cs]"]
  node_notifications["Notifications"]
  node_image_processing["Image processing<br/>[ImageProcessor.cs]"]
end

subgraph group_platform["Server Platform"]
  node_authentication[("Authentication storage")]
  node_sqlite[("SQLite base repository")]
  node_http_client["HTTP client"]
end

node_clients(("Emby apps"))

node_clients -->|"requests"| node_rest
node_providers -->|"gets library options"| node_library
node_playto -->|"reports playback"| node_sessions
node_devices -->|"uses ID"| node_deviceid
node_devices -->|"uses device"| node_dlna_device
node_authentication -->|"uses repository base"| node_sqlite
node_dlna_profiles -.->|"builds descriptions"| node_dlna_descriptions

click node_rest "https://github.com/mediabrowser/emby/tree/master/MediaBrowser.Api"
click node_library "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Library/LibraryManager.cs"
click node_search "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Library/SearchEngine.cs"
click node_providers "https://github.com/mediabrowser/emby/blob/master/MediaBrowser.Providers/Manager/ProviderManager.cs"
click node_photos "https://github.com/mediabrowser/emby/blob/master/Emby.Photos/PhotoProvider.cs"
click node_playlists "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Playlists/PlaylistManager.cs"
click node_sessions "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Session/SessionManager.cs"
click node_devices "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Devices/DeviceManager.cs"
click node_deviceid "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Devices/DeviceId.cs"
click node_playto "https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/PlayTo/PlayToController.cs"
click node_dlna_device "https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/PlayTo/Device.cs"
click node_dlna_profiles "https://github.com/mediabrowser/emby/tree/master/Emby.Dlna/Profiles"
click node_dlna_descriptions "https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/Server/DescriptionXmlBuilder.cs"
click node_live_tv "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/LiveTv/LiveTvManager.cs"
click node_channels "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Channels/ChannelManager.cs"
click node_notifications "https://github.com/mediabrowser/emby/blob/master/Emby.Notifications/NotificationManager.cs"
click node_image_processing "https://github.com/mediabrowser/emby/blob/master/Emby.Drawing/ImageProcessor.cs"
click node_authentication "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Security/AuthenticationRepository.cs"
click node_sqlite "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Data/BaseSqliteRepository.cs"
click node_http_client "https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs"

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_rest toneBlue
class node_library,node_search,node_providers,node_photos,node_playlists toneAmber
class node_sessions,node_devices,node_deviceid,node_playto,node_dlna_device,node_dlna_profiles,node_dlna_descriptions toneMint
class node_live_tv,node_channels,node_notifications,node_image_processing toneRose
class node_authentication,node_sqlite,node_http_client,node_clients toneIndigo
```

## Components

### Client API

- [REST API](https://github.com/mediabrowser/emby/tree/master/MediaBrowser.Api): `MediaBrowser.Api`

### Media Library

- [Library management](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Library/LibraryManager.cs): `Emby.Server.Implementations/Library/LibraryManager.cs`
- [Library search](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Library/SearchEngine.cs): `Emby.Server.Implementations/Library/SearchEngine.cs`
- [Metadata providers](https://github.com/mediabrowser/emby/blob/master/MediaBrowser.Providers/Manager/ProviderManager.cs): `MediaBrowser.Providers/Manager/ProviderManager.cs`
- [Photo metadata](https://github.com/mediabrowser/emby/blob/master/Emby.Photos/PhotoProvider.cs): `Emby.Photos/PhotoProvider.cs`
- [Playlists](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Playlists/PlaylistManager.cs): `Emby.Server.Implementations/Playlists/PlaylistManager.cs`

### Playback & Devices

- [Playback sessions](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Session/SessionManager.cs): `Emby.Server.Implementations/Session/SessionManager.cs`
- [Device management](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Devices/DeviceManager.cs): `Emby.Server.Implementations/Devices/DeviceManager.cs`
- [Server device ID](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Devices/DeviceId.cs): `Emby.Server.Implementations/Devices/DeviceId.cs`
- [DLNA playback control](https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/PlayTo/PlayToController.cs): `Emby.Dlna/PlayTo/PlayToController.cs`
- [DLNA device control](https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/PlayTo/Device.cs): `Emby.Dlna/PlayTo/Device.cs`
- [DLNA profiles](https://github.com/mediabrowser/emby/tree/master/Emby.Dlna/Profiles): `Emby.Dlna/Profiles`
- [DLNA descriptions](https://github.com/mediabrowser/emby/blob/master/Emby.Dlna/Server/DescriptionXmlBuilder.cs): `Emby.Dlna/Server/DescriptionXmlBuilder.cs`

### Media Services

- [Live TV](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/LiveTv/LiveTvManager.cs): `Emby.Server.Implementations/LiveTv/LiveTvManager.cs`
- [Channels](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Channels/ChannelManager.cs): `Emby.Server.Implementations/Channels/ChannelManager.cs`
- [Notifications](https://github.com/mediabrowser/emby/blob/master/Emby.Notifications/NotificationManager.cs): `Emby.Notifications/NotificationManager.cs`
- [Image processing](https://github.com/mediabrowser/emby/blob/master/Emby.Drawing/ImageProcessor.cs): `Emby.Drawing/ImageProcessor.cs`

### Server Platform

- [Authentication storage](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Security/AuthenticationRepository.cs): `Emby.Server.Implementations/Security/AuthenticationRepository.cs`
- [SQLite base repository](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/Data/BaseSqliteRepository.cs): `Emby.Server.Implementations/Data/BaseSqliteRepository.cs`
- [HTTP client](https://github.com/mediabrowser/emby/blob/master/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs): `Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs`

### Other components

- **Emby apps**

## Connections

- Emby apps → REST API: requests (evidence: `README.md`)
- Metadata providers → Library management: gets library options (evidence: `MediaBrowser.Providers/Manager/ProviderManager.cs`)
- DLNA playback control → Playback sessions: reports playback (evidence: `Emby.Dlna/PlayTo/PlayToController.cs`)
- Device management → Server device ID: uses ID (evidence: `Emby.Server.Implementations/Devices/DeviceManager.cs`)
- Device management → DLNA device control: uses device (evidence: `Emby.Server.Implementations/Devices/DeviceManager.cs`)
- Authentication storage → SQLite base repository: uses repository base (evidence: `Emby.Server.Implementations/Security/AuthenticationRepository.cs`)
- DLNA profiles → DLNA descriptions: builds descriptions
