# lightinumbra/multiversal-manager architecture

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

- Interactive diagram: https://gitdiagram.com/lightinumbra/multiversal-manager
- Repository: https://github.com/lightinumbra/multiversal-manager

## Overview

Multiversal Manager is a desktop Magic: The Gathering collection, deck-building, and market-tracking application. The main workflow is managing exact card printings in a collection, then using those cards to build and validate decks or review value and price trends. It also supports reviewed imports, sealed products, offline rules lookup, recommendations, and backups. The graph reflects README capabilities and sampled call sites; several UI-to-subsystem links are documented, but unsampled implementation details are not inferred.

Main entry points: [`database.py`](https://github.com/lightinumbra/multiversal-manager/blob/main/database.py) (Collection Database), [`main.py`](https://github.com/lightinumbra/multiversal-manager/blob/main/main.py) (Desktop App), [`lists.py`](https://github.com/lightinumbra/multiversal-manager/blob/main/lists.py) (Decks And Lists), [`finance.py`](https://github.com/lightinumbra/multiversal-manager/blob/main/finance.py) (Finance Tracker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection Management"]
  node_import_review["Import Review"]
  node_importer["Import Resolver<br/>[importer.py]"]
  node_backup["Backup And Restore<br/>[backup.py]"]
end

subgraph group_decks["Deck Building"]
  node_card_browser["Card Browser<br/>[card_browser.py]"]
  node_lists["Decks And Lists<br/>[lists.py]"]
  node_formats["Format Legality<br/>[formats.py]"]
  node_recommendations["Recommendation View<br/>[recommendations.py]"]
  node_synergy["Synergy Scoring<br/>[synergy.py]"]
end

subgraph group_market["Finance And Market"]
  node_finance["Finance Tracker<br/>[finance.py]"]
  node_mtgjson["MTGJSON Integration<br/>[mtgjson.py]"]
  node_trends["Collection Trends<br/>[trends.py]"]
end

subgraph group_reference["Rules And Products"]
  node_sealed["Sealed Collection<br/>[sealed.py]"]
  node_rules_window["Rules Browser<br/>[rules_window.py]"]
  node_rules["Rules Data And Search<br/>[rules.py]"]
end

subgraph group_core["Application And Data"]
  node_app["Desktop App<br/>[main.py]"]
  node_database[("Collection Database<br/>[database.py]")]
  node_scryfall["Scryfall Integration<br/>[scryfall.py]"]
end

node_user(("Collector"))
node_external_scryfall{{"Scryfall"}}
node_external_mtgjson{{"MTGJSON"}}
node_external_wizards{{"Wizards Rules"}}

node_user -->|"uses"| node_app
node_app -->|"initializes"| node_database
node_app -->|"opens"| node_lists
node_app -->|"shows trends"| node_trends
node_app -->|"reviews import"| node_import_review
node_import_review -->|"resolves rows"| node_importer
node_importer -->|"matches cards"| node_scryfall
node_import_review -->|"saves entries"| node_database
node_app -->|"reads and edits"| node_database
node_lists -->|"reads and writes lists"| node_database
node_lists -->|"checks legality"| node_formats
node_lists -->|"displays cards"| node_card_browser
node_lists -->|"shows recommendations"| node_recommendations
node_recommendations -->|"requests scoring"| node_synergy
node_synergy -->|"uses card data"| node_database
node_finance -->|"stores market data"| node_database
node_finance -->|"refreshes card data"| node_scryfall
node_finance -->|"loads price history"| node_mtgjson
node_trends -->|"reads value history"| node_database
node_backup -->|"backs up data"| node_database
node_sealed -->|"stores products"| node_database
node_sealed -->|"uses product catalog"| node_mtgjson
node_rules_window -->|"browses and searches"| node_rules
node_rules_window -->|"reads card legality"| node_database
node_rules -.->|"fetches documents"| node_external_wizards
node_rules -.->|"fetches rulings"| node_external_scryfall
node_scryfall -.->|"fetches card data"| node_external_scryfall
node_mtgjson -.->|"fetches market data"| node_external_mtgjson

click node_app "https://github.com/lightinumbra/multiversal-manager/blob/main/main.py"
click node_database "https://github.com/lightinumbra/multiversal-manager/blob/main/database.py"
click node_import_review "https://github.com/lightinumbra/multiversal-manager/blob/main/import_review_dialog.py"
click node_importer "https://github.com/lightinumbra/multiversal-manager/blob/main/importer.py"
click node_scryfall "https://github.com/lightinumbra/multiversal-manager/blob/main/scryfall.py"
click node_card_browser "https://github.com/lightinumbra/multiversal-manager/blob/main/card_browser.py"
click node_lists "https://github.com/lightinumbra/multiversal-manager/blob/main/lists.py"
click node_formats "https://github.com/lightinumbra/multiversal-manager/blob/main/formats.py"
click node_recommendations "https://github.com/lightinumbra/multiversal-manager/blob/main/recommendations.py"
click node_synergy "https://github.com/lightinumbra/multiversal-manager/blob/main/synergy.py"
click node_finance "https://github.com/lightinumbra/multiversal-manager/blob/main/finance.py"
click node_mtgjson "https://github.com/lightinumbra/multiversal-manager/blob/main/mtgjson.py"
click node_trends "https://github.com/lightinumbra/multiversal-manager/blob/main/trends.py"
click node_backup "https://github.com/lightinumbra/multiversal-manager/blob/main/backup.py"
click node_sealed "https://github.com/lightinumbra/multiversal-manager/blob/main/sealed.py"
click node_rules_window "https://github.com/lightinumbra/multiversal-manager/blob/main/rules_window.py"
click node_rules "https://github.com/lightinumbra/multiversal-manager/blob/main/rules.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_import_review,node_importer,node_backup toneBlue
class node_card_browser,node_lists,node_formats,node_recommendations,node_synergy toneAmber
class node_finance,node_mtgjson,node_trends toneMint
class node_sealed,node_rules_window,node_rules toneRose
class node_app,node_database,node_scryfall,node_user,node_external_scryfall,node_external_mtgjson,node_external_wizards toneIndigo
```

## Components

### Collection Management

- [Import Review](https://github.com/lightinumbra/multiversal-manager/blob/main/import_review_dialog.py): `import_review_dialog.py`
- [Import Resolver](https://github.com/lightinumbra/multiversal-manager/blob/main/importer.py): `importer.py`
- [Backup And Restore](https://github.com/lightinumbra/multiversal-manager/blob/main/backup.py): `backup.py`

### Deck Building

- [Card Browser](https://github.com/lightinumbra/multiversal-manager/blob/main/card_browser.py): `card_browser.py`
- [Decks And Lists](https://github.com/lightinumbra/multiversal-manager/blob/main/lists.py): `lists.py`
- [Format Legality](https://github.com/lightinumbra/multiversal-manager/blob/main/formats.py): `formats.py`
- [Recommendation View](https://github.com/lightinumbra/multiversal-manager/blob/main/recommendations.py): `recommendations.py`
- [Synergy Scoring](https://github.com/lightinumbra/multiversal-manager/blob/main/synergy.py): `synergy.py`

### Finance And Market

- [Finance Tracker](https://github.com/lightinumbra/multiversal-manager/blob/main/finance.py): `finance.py`
- [MTGJSON Integration](https://github.com/lightinumbra/multiversal-manager/blob/main/mtgjson.py): `mtgjson.py`
- [Collection Trends](https://github.com/lightinumbra/multiversal-manager/blob/main/trends.py): `trends.py`

### Rules And Products

- [Sealed Collection](https://github.com/lightinumbra/multiversal-manager/blob/main/sealed.py): `sealed.py`
- [Rules Browser](https://github.com/lightinumbra/multiversal-manager/blob/main/rules_window.py): `rules_window.py`
- [Rules Data And Search](https://github.com/lightinumbra/multiversal-manager/blob/main/rules.py): `rules.py`

### Application And Data

- [Desktop App](https://github.com/lightinumbra/multiversal-manager/blob/main/main.py): `main.py`
- [Collection Database](https://github.com/lightinumbra/multiversal-manager/blob/main/database.py): `database.py`
- [Scryfall Integration](https://github.com/lightinumbra/multiversal-manager/blob/main/scryfall.py): `scryfall.py`

### Other components

- **Collector**
- **Scryfall**
- **MTGJSON**
- **Wizards Rules**

## Connections

- Collector → Desktop App: uses
- Desktop App → Collection Database: initializes
- Desktop App → Decks And Lists: opens
- Desktop App → Collection Trends: shows trends
- Desktop App → Import Review: reviews import
- Import Review → Import Resolver: resolves rows
- Import Resolver → Scryfall Integration: matches cards
- Import Review → Collection Database: saves entries
- Desktop App → Collection Database: reads and edits
- Decks And Lists → Collection Database: reads and writes lists
- Decks And Lists → Format Legality: checks legality
- Decks And Lists → Card Browser: displays cards
- Decks And Lists → Recommendation View: shows recommendations
- Recommendation View → Synergy Scoring: requests scoring
- Synergy Scoring → Collection Database: uses card data
- Finance Tracker → Collection Database: stores market data
- Finance Tracker → Scryfall Integration: refreshes card data
- Finance Tracker → MTGJSON Integration: loads price history
- Collection Trends → Collection Database: reads value history
- Backup And Restore → Collection Database: backs up data
- Sealed Collection → Collection Database: stores products
- Sealed Collection → MTGJSON Integration: uses product catalog
- Rules Browser → Rules Data And Search: browses and searches
- Rules Browser → Collection Database: reads card legality
- Rules Data And Search → Wizards Rules: fetches documents
- Rules Data And Search → Scryfall: fetches rulings
- Scryfall Integration → Scryfall: fetches card data
- MTGJSON Integration → MTGJSON: fetches market data
