# jilvo/senscritique-to-seerr architecture

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

- Interactive diagram: https://gitdiagram.com/jilvo/senscritique-to-seerr
- Repository: https://github.com/jilvo/senscritique-to-seerr

## Overview

SensCritique → Seerr is a CLI tool for checking film and series collections against Seerr, reporting availability, and optionally creating requests. The main workflow fetches collections, matches titles to Seerr/TMDB records, combines media and request statuses, then reports results; request commands use the resulting matches to submit requests. The README also documents series-season handling, cache rebuilding, and CSV output. Arrows reflect shown calls or documented behavior; unsampled CLI and service details are represented only where the README supports them.

Main entry points: [`src/sc_to_seerr/cli.py`](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cli.py) (Commands), [`src/sc_to_seerr/pipeline.py`](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/pipeline.py) (Status pipeline), [`src/sc_to_seerr/services/seerr.py`](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/seerr.py) (Seerr client), [`src/sc_to_seerr/services/senscritique.py`](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/senscritique.py) (Collection client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["CLI and output"]
  node_cli["Commands<br/>[cli.py]"]
  node_settings["Configuration<br/>[config.py]"]
  node_logging["Logging<br/>[logging_setup.py]"]
  node_report["Reports and CSV<br/>[report.py]"]
end

subgraph group_workflow["Matching workflow"]
  node_pipeline["Status pipeline<br/>[pipeline.py]"]
  node_matching["Title matching<br/>[matching.py]"]
  node_cache[("Match cache<br/>[cache.py]")]
  node_models["Domain models<br/>[models.py]"]
end

subgraph group_integrations["Remote services"]
  node_senscritique["Collection client<br/>[senscritique.py]"]
  node_seerr["Seerr client<br/>[seerr.py]"]
  node_http["HTTP base client<br/>[base.py]"]
end

subgraph group_requests["Requests and series"]
  node_requester["Movie requests<br/>[requester.py]"]
  node_series["Series and seasons<br/>[cli.py]"]
end

node_user(("CLI user"))
node_sc_api(("SensCritique GraphQL"))
node_seerr_api(("Seerr API"))
node_cache_file[("JSON cache files")]

node_user -->|"runs commands"| node_cli
node_cli -->|"loads settings"| node_settings
node_cli -->|"configures logs"| node_logging
node_cli -->|"runs checks"| node_pipeline
node_pipeline -->|"fetches collections"| node_senscritique
node_pipeline -->|"fetches statuses"| node_seerr
node_pipeline -->|"searches titles"| node_seerr
node_pipeline -->|"checks candidates"| node_matching
node_pipeline -->|"reads and saves"| node_cache
node_pipeline -->|"provides results"| node_report
node_cli -->|"prints and exports"| node_report
node_senscritique -->|"reads collections"| node_sc_api
node_seerr -->|"queries and requests"| node_seerr_api
node_senscritique -->|"uses client"| node_http
node_seerr -->|"uses client"| node_http
node_cli -->|"submits movie requests"| node_requester
node_requester -->|"creates requests"| node_seerr
node_cli -->|"handles series commands"| node_series
node_series -->|"checks seasons and requests"| node_seerr
node_cache -->|"reads and writes"| node_cache_file

click node_cli "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cli.py"
click node_settings "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/config.py"
click node_logging "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/logging_setup.py"
click node_report "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/report.py"
click node_pipeline "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/pipeline.py"
click node_matching "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/matching.py"
click node_cache "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cache.py"
click node_models "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/models.py"
click node_senscritique "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/senscritique.py"
click node_seerr "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/seerr.py"
click node_http "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/base.py"
click node_requester "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/requester.py"
click node_series "https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cli.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_cli,node_settings,node_logging,node_report,node_user toneBlue
class node_pipeline,node_matching,node_cache,node_models,node_cache_file toneAmber
class node_senscritique,node_seerr,node_http,node_seerr_api toneMint
class node_requester,node_series toneRose
class node_sc_api toneIndigo
```

## Components

### CLI and output

- [Commands](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cli.py): `src/sc_to_seerr/cli.py`
- [Configuration](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/config.py): `src/sc_to_seerr/config.py`
- [Logging](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/logging_setup.py): `src/sc_to_seerr/logging_setup.py`
- [Reports and CSV](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/report.py): `src/sc_to_seerr/report.py`

### Matching workflow

- [Status pipeline](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/pipeline.py): `src/sc_to_seerr/pipeline.py`
- [Title matching](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/matching.py): `src/sc_to_seerr/matching.py`
- [Match cache](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cache.py): `src/sc_to_seerr/cache.py`
- [Domain models](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/models.py): `src/sc_to_seerr/models.py`

### Remote services

- [Collection client](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/senscritique.py): `src/sc_to_seerr/services/senscritique.py`
- [Seerr client](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/seerr.py): `src/sc_to_seerr/services/seerr.py`
- [HTTP base client](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/services/base.py): `src/sc_to_seerr/services/base.py`

### Requests and series

- [Movie requests](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/requester.py): `src/sc_to_seerr/requester.py`
- [Series and seasons](https://github.com/jilvo/senscritique-to-seerr/blob/main/src/sc_to_seerr/cli.py): `src/sc_to_seerr/cli.py`

### Other components

- **CLI user**
- **SensCritique GraphQL**
- **Seerr API**
- **JSON cache files**

## Connections

- CLI user → Commands: runs commands (evidence: `README.md`)
- Commands → Configuration: loads settings (evidence: `src/sc_to_seerr/cli.py`)
- Commands → Logging: configures logs (evidence: `src/sc_to_seerr/cli.py`)
- Commands → Status pipeline: runs checks (evidence: `src/sc_to_seerr/cli.py`)
- Status pipeline → Collection client: fetches collections (evidence: `src/sc_to_seerr/pipeline.py`)
- Status pipeline → Seerr client: fetches statuses (evidence: `src/sc_to_seerr/pipeline.py`)
- Status pipeline → Seerr client: searches titles (evidence: `src/sc_to_seerr/pipeline.py`)
- Status pipeline → Title matching: checks candidates (evidence: `src/sc_to_seerr/pipeline.py`)
- Status pipeline → Match cache: reads and saves (evidence: `src/sc_to_seerr/pipeline.py`)
- Status pipeline → Reports and CSV: provides results (evidence: `README.md`)
- Commands → Reports and CSV: prints and exports (evidence: `README.md`)
- Collection client → SensCritique GraphQL: reads collections (evidence: `README.md`)
- Seerr client → Seerr API: queries and requests (evidence: `README.md`)
- Collection client → HTTP base client: uses client (evidence: `src/sc_to_seerr/services/senscritique.py`)
- Seerr client → HTTP base client: uses client (evidence: `src/sc_to_seerr/services/seerr.py`)
- Commands → Movie requests: submits movie requests (evidence: `src/sc_to_seerr/cli.py`)
- Movie requests → Seerr client: creates requests (evidence: `src/sc_to_seerr/requester.py`)
- Commands → Series and seasons: handles series commands (evidence: `README.md`)
- Series and seasons → Seerr client: checks seasons and requests (evidence: `README.md`)
- Match cache → JSON cache files: reads and writes (evidence: `src/sc_to_seerr/cache.py`)
