# saugatxthaa/ignatiusphoenix architecture

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

- Interactive diagram: https://gitdiagram.com/saugatxthaa/ignatiusphoenix
- Repository: https://github.com/saugatxthaa/ignatiusphoenix

## Overview

PhoeniX is a self-hosted Nuvio/Stremio streaming addon. Its main workflow accepts a media request, runs enabled upstream sources, resolves embed hosts into playable URLs, and returns stream metadata; subtitle search and retrieval are a parallel capability. Users also configure per-install accounts through the web UI. README documents the service endpoints and major subsystems; source excerpts confirm source and extractor registries and shared guarded probing, but the main entrypoint and many runtime modules were not sampled.

Main entry points: [`src/index.js`](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/index.js) (HTTP addon), [`src/source`](https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/source) (Upstream sources), [`src/utils/StreamResolver.js`](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/StreamResolver.js) (Stream resolver), [`src/extractor/index.js`](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/extractor/index.js) (Extractor registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_service["HTTP and stream workflow"]
  node_api["HTTP addon<br/>[index.js]"]
  node_stream["Merged stream handler<br/>[index.js]"]
  node_metadata["Media metadata<br/>[tmdb.js]"]
end

subgraph group_sources["Source discovery"]
  node_source_registry["Source registry<br/>[index.js]"]
  node_source_modules["Upstream sources"]
  node_provider_engines["Provider engines"]
  node_fetcher["HTTP fetcher<br/>[Fetcher.js]"]
  node_egress["Egress guard<br/>[egress-guard.cjs]"]
end

subgraph group_playback["Playback resolution"]
  node_extractor_registry["Extractor registry<br/>[index.js]"]
  node_extractors["Host extractors"]
  node_stream_resolver["Stream resolver<br/>[StreamResolver.js]"]
  node_playback_helpers["Playback helpers<br/>[playtimeResolve.js]"]
end

subgraph group_account["Accounts and configuration"]
  node_configure_ui["Configuration UI<br/>[configure.js]"]
  node_account_config["Account configuration<br/>[config.js]"]
  node_account_store[("Account store<br/>[userStore.cjs]")]
end

subgraph group_support["Subtitles and operations"]
  node_subtitle_search["Subtitle search"]
  node_subtitle_parser["Subtitle parsing<br/>[subParseWorker.cjs]"]
  node_subtitle_verdict["Subtitle verification<br/>[subVerdict.js]"]
  node_status["Source status<br/>[SourceStatus.js]"]
end

node_user(("Addon user"))
node_database[("Turso database")]
node_client(("Stremio / Nuvio client"))

node_user -->|"requests"| node_api
node_api -->|"routes stream"| node_stream
node_stream -.->|"gets metadata"| node_metadata
node_stream -->|"runs sources"| node_source_registry
node_source_registry -->|"registers"| node_source_modules
node_source_modules -.->|"uses providers"| node_provider_engines
node_source_modules -.->|"fetches upstream"| node_fetcher
node_fetcher -.->|"guards egress"| node_egress
node_source_modules -.->|"submits embeds"| node_extractor_registry
node_extractor_registry -->|"registers"| node_extractors
node_stream -->|"resolves streams"| node_stream_resolver
node_stream_resolver -.->|"dispatches embeds"| node_extractor_registry
node_stream_resolver -.->|"uses playback links"| node_playback_helpers
node_stream -->|"searches tracks"| node_subtitle_search
node_api -->|"serves subtitle bytes"| node_subtitle_parser
node_subtitle_parser -->|"checks payload"| node_subtitle_verdict
node_user -->|"configures addon"| node_configure_ui
node_configure_ui -->|"saves settings"| node_api
node_api -->|"manages config"| node_account_config
node_account_config -.->|"persists accounts"| node_account_store
node_account_store -->|"stores data"| node_database
node_api -->|"reports health"| node_status
node_api -->|"serves addon"| node_client

click node_api "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/index.js"
click node_stream "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/index.js"
click node_metadata "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/tmdb.js"
click node_source_registry "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/source/index.js"
click node_source_modules "https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/source"
click node_provider_engines "https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/nuvio"
click node_fetcher "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/Fetcher.js"
click node_egress "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/egress-guard.cjs"
click node_extractor_registry "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/extractor/index.js"
click node_extractors "https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/extractor"
click node_stream_resolver "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/StreamResolver.js"
click node_playback_helpers "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/playtimeResolve.js"
click node_subtitle_search "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subtitleProviders.js"
click node_subtitle_parser "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subParseWorker.cjs"
click node_subtitle_verdict "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subVerdict.js"
click node_configure_ui "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/public/configure.js"
click node_account_config "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/config.js"
click node_account_store "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/userStore.cjs"
click node_status "https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/SourceStatus.js"

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_api,node_stream,node_metadata,node_user,node_client toneBlue
class node_source_registry,node_source_modules,node_provider_engines,node_fetcher,node_egress,node_database toneAmber
class node_extractor_registry,node_extractors,node_stream_resolver,node_playback_helpers toneMint
class node_configure_ui,node_account_config,node_account_store toneRose
class node_subtitle_search,node_subtitle_parser,node_subtitle_verdict,node_status toneIndigo
```

## Components

### HTTP and stream workflow

- [HTTP addon](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/index.js): `src/index.js`
- [Merged stream handler](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/index.js): `src/index.js`
- [Media metadata](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/tmdb.js): `src/utils/tmdb.js`

### Source discovery

- [Source registry](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/source/index.js): `src/source/index.js`
- [Upstream sources](https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/source): `src/source`
- [Provider engines](https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/nuvio): `src/nuvio`
- [HTTP fetcher](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/Fetcher.js): `src/utils/Fetcher.js`
- [Egress guard](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/egress-guard.cjs): `src/utils/egress-guard.cjs`

### Playback resolution

- [Extractor registry](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/extractor/index.js): `src/extractor/index.js`
- [Host extractors](https://github.com/saugatxthaa/ignatiusphoenix/tree/main/src/extractor): `src/extractor`
- [Stream resolver](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/StreamResolver.js): `src/utils/StreamResolver.js`
- [Playback helpers](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/playtimeResolve.js): `src/utils/playtimeResolve.js`

### Accounts and configuration

- [Configuration UI](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/public/configure.js): `public/configure.js`
- [Account configuration](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/config.js): `src/utils/config.js`
- [Account store](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/userStore.cjs): `src/utils/userStore.cjs`

### Subtitles and operations

- [Subtitle search](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subtitleProviders.js): `src/utils/subtitleProviders.js`
- [Subtitle parsing](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subParseWorker.cjs): `src/utils/subParseWorker.cjs`
- [Subtitle verification](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/subVerdict.js): `src/utils/subVerdict.js`
- [Source status](https://github.com/saugatxthaa/ignatiusphoenix/blob/main/src/utils/SourceStatus.js): `src/utils/SourceStatus.js`

### Other components

- **Addon user**
- **Turso database**
- **Stremio / Nuvio client**

## Connections

- Addon user → HTTP addon: requests (evidence: `README.md`)
- HTTP addon → Merged stream handler: routes stream (evidence: `README.md`)
- Merged stream handler → Media metadata: gets metadata
- Merged stream handler → Source registry: runs sources (evidence: `README.md`)
- Source registry → Upstream sources: registers (evidence: `src/source/index.js`)
- Upstream sources → Provider engines: uses providers
- Upstream sources → HTTP fetcher: fetches upstream
- HTTP fetcher → Egress guard: guards egress
- Upstream sources → Extractor registry: submits embeds
- Extractor registry → Host extractors: registers (evidence: `src/extractor/index.js`)
- Merged stream handler → Stream resolver: resolves streams (evidence: `README.md`)
- Stream resolver → Extractor registry: dispatches embeds
- Stream resolver → Playback helpers: uses playback links
- Merged stream handler → Subtitle search: searches tracks (evidence: `README.md`)
- HTTP addon → Subtitle parsing: serves subtitle bytes (evidence: `README.md`)
- Subtitle parsing → Subtitle verification: checks payload (evidence: `src/utils/subParseWorker.cjs`)
- Addon user → Configuration UI: configures addon (evidence: `README.md`)
- Configuration UI → HTTP addon: saves settings (evidence: `README.md`)
- HTTP addon → Account configuration: manages config (evidence: `README.md`)
- Account configuration → Account store: persists accounts
- Account store → Turso database: stores data (evidence: `README.md`)
- HTTP addon → Source status: reports health (evidence: `README.md`)
- HTTP addon → Stremio / Nuvio client: serves addon (evidence: `README.md`)
