# morpheus65535/bazarr architecture

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

- Interactive diagram: https://gitdiagram.com/morpheus65535/bazarr
- Repository: https://github.com/morpheus65535/bazarr

## Overview

Bazarr manages subtitle requirements for shows and movies indexed by Sonarr and Radarr. Its main workflow is to synchronize that catalog, identify missing or upgradeable subtitles, search configured providers, download and process a selection, and retain history. Users can also search manually and manage subtitles through the UI. The tree shows API, integration, subtitle, and persistence areas; several subsystem links below are documented capabilities rather than verified calls, since most application source was not excerpted.

Main entry points: [`bazarr/subtitles/wanted`](https://github.com/morpheus65535/bazarr/tree/master/bazarr/subtitles/wanted) (Wanted subtitles), [`custom_libs/subliminal_patch/providers`](https://github.com/morpheus65535/bazarr/tree/master/custom_libs/subliminal_patch/providers) (Provider search), [`bazarr/subtitles/download.py`](https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/download.py) (Subtitle download), [`bazarr/sonarr/sync`](https://github.com/morpheus65535/bazarr/tree/master/bazarr/sonarr/sync) (Series sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_webui["Web interface<br/>[index.tsx]"]
  node_frontendapi["API client<br/>[client.ts]"]
  node_api["HTTP API"]
  node_manual["Manual search"]
end

subgraph group_catalog["Media catalog"]
  node_series_sync["Series sync"]
  node_movie_sync["Movie sync"]
  node_series_library["Series catalog"]
  node_movie_library["Movie catalog"]
end

subgraph group_subtitles["Subtitle workflow"]
  node_wanted["Wanted subtitles"]
  node_indexer["Subtitle indexing"]
  node_providers["Provider search"]
  node_download["Subtitle download<br/>[download.py]"]
  node_processing["Subtitle processing<br/>[processing.py]"]
  node_upgrade["Subtitle upgrades<br/>[upgrade.py]"]
  node_history["Download history<br/>[arr_history.py]"]
end

subgraph group_platform["Application platform"]
  node_languages["Language preferences"]
  node_database[("Application database<br/>[database.py]")]
  node_subtitle_storage[("Subtitle storage")]
  node_jobs["Background jobs<br/>[jobs_queue.py]"]
end

node_user(("User"))
node_sonarr["Sonarr"]
node_radarr["Radarr"]

node_user -->|"uses"| node_webui
node_webui -.->|"requests data"| node_frontendapi
node_frontendapi -.->|"calls"| node_api
node_user -->|"searches manually"| node_manual
node_sonarr -->|"provides series"| node_series_sync
node_radarr -->|"provides movies"| node_movie_sync
node_series_sync -.->|"updates catalog"| node_series_library
node_movie_sync -.->|"updates catalog"| node_movie_library
node_series_library -.->|"checks subtitles"| node_wanted
node_movie_library -.->|"checks subtitles"| node_wanted
node_wanted -.->|"finds missing"| node_indexer
node_indexer -.->|"searches providers"| node_providers
node_manual -.->|"searches providers"| node_providers
node_providers -.->|"returns candidates"| node_download
node_download -.->|"processes files"| node_processing
node_download -.->|"records download"| node_history
node_upgrade -.->|"searches replacements"| node_providers
node_languages -.->|"sets requirements"| node_wanted
node_processing -.->|"stores subtitle data"| node_subtitle_storage
node_jobs -.->|"schedules sync"| node_series_sync
node_jobs -.->|"schedules sync"| node_movie_sync

click node_webui "https://github.com/morpheus65535/bazarr/blob/master/frontend/src/App/index.tsx"
click node_frontendapi "https://github.com/morpheus65535/bazarr/blob/master/frontend/src/apis/raw/client.ts"
click node_api "https://github.com/morpheus65535/bazarr/tree/master/bazarr/api"
click node_manual "https://github.com/morpheus65535/bazarr/tree/master/bazarr/api/providers"
click node_series_sync "https://github.com/morpheus65535/bazarr/tree/master/bazarr/sonarr/sync"
click node_movie_sync "https://github.com/morpheus65535/bazarr/tree/master/bazarr/radarr/sync"
click node_series_library "https://github.com/morpheus65535/bazarr/tree/master/bazarr/sonarr"
click node_movie_library "https://github.com/morpheus65535/bazarr/tree/master/bazarr/radarr"
click node_wanted "https://github.com/morpheus65535/bazarr/tree/master/bazarr/subtitles/wanted"
click node_indexer "https://github.com/morpheus65535/bazarr/tree/master/bazarr/subtitles/indexer"
click node_providers "https://github.com/morpheus65535/bazarr/tree/master/custom_libs/subliminal_patch/providers"
click node_download "https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/download.py"
click node_processing "https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/processing.py"
click node_upgrade "https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/upgrade.py"
click node_history "https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/refiners/arr_history.py"
click node_languages "https://github.com/morpheus65535/bazarr/tree/master/bazarr/languages"
click node_database "https://github.com/morpheus65535/bazarr/blob/master/bazarr/app/database.py"
click node_subtitle_storage "https://github.com/morpheus65535/bazarr/blob/master/custom_libs/subzero/subtitle_storage.py"
click node_jobs "https://github.com/morpheus65535/bazarr/blob/master/bazarr/app/jobs_queue.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_webui,node_frontendapi,node_api,node_manual,node_user toneBlue
class node_series_sync,node_movie_sync,node_series_library,node_movie_library toneAmber
class node_wanted,node_indexer,node_providers,node_download,node_processing,node_upgrade,node_history toneMint
class node_languages,node_database,node_subtitle_storage,node_jobs toneRose
class node_sonarr,node_radarr toneIndigo
```

## Components

### User experience

- [Web interface](https://github.com/morpheus65535/bazarr/blob/master/frontend/src/App/index.tsx): `frontend/src/App/index.tsx`
- [API client](https://github.com/morpheus65535/bazarr/blob/master/frontend/src/apis/raw/client.ts): `frontend/src/apis/raw/client.ts`
- [HTTP API](https://github.com/morpheus65535/bazarr/tree/master/bazarr/api): `bazarr/api`
- [Manual search](https://github.com/morpheus65535/bazarr/tree/master/bazarr/api/providers): `bazarr/api/providers`

### Media catalog

- [Series sync](https://github.com/morpheus65535/bazarr/tree/master/bazarr/sonarr/sync): `bazarr/sonarr/sync`
- [Movie sync](https://github.com/morpheus65535/bazarr/tree/master/bazarr/radarr/sync): `bazarr/radarr/sync`
- [Series catalog](https://github.com/morpheus65535/bazarr/tree/master/bazarr/sonarr): `bazarr/sonarr`
- [Movie catalog](https://github.com/morpheus65535/bazarr/tree/master/bazarr/radarr): `bazarr/radarr`

### Subtitle workflow

- [Wanted subtitles](https://github.com/morpheus65535/bazarr/tree/master/bazarr/subtitles/wanted): `bazarr/subtitles/wanted`
- [Subtitle indexing](https://github.com/morpheus65535/bazarr/tree/master/bazarr/subtitles/indexer): `bazarr/subtitles/indexer`
- [Provider search](https://github.com/morpheus65535/bazarr/tree/master/custom_libs/subliminal_patch/providers): `custom_libs/subliminal_patch/providers`
- [Subtitle download](https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/download.py): `bazarr/subtitles/download.py`
- [Subtitle processing](https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/processing.py): `bazarr/subtitles/processing.py`
- [Subtitle upgrades](https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/upgrade.py): `bazarr/subtitles/upgrade.py`
- [Download history](https://github.com/morpheus65535/bazarr/blob/master/bazarr/subtitles/refiners/arr_history.py): `bazarr/subtitles/refiners/arr_history.py`

### Application platform

- [Language preferences](https://github.com/morpheus65535/bazarr/tree/master/bazarr/languages): `bazarr/languages`
- [Application database](https://github.com/morpheus65535/bazarr/blob/master/bazarr/app/database.py): `bazarr/app/database.py`
- [Subtitle storage](https://github.com/morpheus65535/bazarr/blob/master/custom_libs/subzero/subtitle_storage.py): `custom_libs/subzero/subtitle_storage.py`
- [Background jobs](https://github.com/morpheus65535/bazarr/blob/master/bazarr/app/jobs_queue.py): `bazarr/app/jobs_queue.py`

### Other components

- **User**
- **Sonarr**
- **Radarr**

## Connections

- User → Web interface: uses (evidence: `README.md`)
- Web interface → API client: requests data
- API client → HTTP API: calls
- User → Manual search: searches manually (evidence: `README.md`)
- Sonarr → Series sync: provides series (evidence: `README.md`)
- Radarr → Movie sync: provides movies (evidence: `README.md`)
- Series sync → Series catalog: updates catalog
- Movie sync → Movie catalog: updates catalog
- Series catalog → Wanted subtitles: checks subtitles
- Movie catalog → Wanted subtitles: checks subtitles
- Wanted subtitles → Subtitle indexing: finds missing
- Subtitle indexing → Provider search: searches providers
- Manual search → Provider search: searches providers
- Provider search → Subtitle download: returns candidates
- Subtitle download → Subtitle processing: processes files
- Subtitle download → Download history: records download
- Subtitle upgrades → Provider search: searches replacements
- Language preferences → Wanted subtitles: sets requirements
- Subtitle processing → Subtitle storage: stores subtitle data
- Background jobs → Series sync: schedules sync
- Background jobs → Movie sync: schedules sync
