# vojtechgero/animelistwpf architecture

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

- Interactive diagram: https://gitdiagram.com/vojtechgero/animelistwpf
- Repository: https://github.com/vojtechgero/animelistwpf

## Overview

AnimeListWpf is a desktop anime and manga collection manager. Users search or enter a MAL ID to add titles, then browse, filter, sort, track progress, refresh metadata, and manage a JSON-backed list. It also imports title names by searching MAL and exposes statistics and export features. The sampled code confirms the main persistence, lookup, and update flows; some UI wiring and unsampled window behavior are represented only where the tree supports a path.

Main entry points: [`AnimeListWpf/MainWindow.xaml.cs`](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/MainWindow.xaml.cs) (Collection window), [`AnimeListWpf/Services/MalContext.cs`](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/MalContext.cs) (MAL lookup client), [`AnimeListWpf/Views/AddWindow.xaml.cs`](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/AddWindow.xaml.cs) (Add title window), [`AnimeListWpf/Views/FileHandleWindow.xaml.cs`](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/FileHandleWindow.xaml.cs) (Text import window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_main["Collection window<br/>[MainWindow.xaml.cs]"]
  node_searchdesc["Search and details"]
  node_addwindow["Add title window<br/>[AddWindow.xaml.cs]"]
  node_filewindow["Text import window"]
  node_updatewindow["Metadata update window"]
  node_statswindow["Statistics window<br/>[StatsWindow.xaml]"]
  node_addcontrols["Search result controls<br/>[AddContent.xaml.cs]"]
end

subgraph group_catalog["Catalog workflows"]
  node_sortsearch["Sorting and search<br/>[StringOps.cs]"]
end

subgraph group_data["Models and storage"]
  node_content["Content models<br/>[AContent.cs]"]
  node_anime["Anime model<br/>[Anime.cs]"]
  node_manga["Manga model<br/>[Manga.cs]"]
  node_unclassified["Imported record model"]
  node_filehandler["JSON list handler<br/>[FileHandler.cs]"]
  node_mapper["Content mapper<br/>[ContentMapper.cs]"]
end

subgraph group_integrations["External services"]
  node_malcontext["MAL lookup client<br/>[MalContext.cs]"]
  node_images["Image service<br/>[ImageService.cs]"]
end

node_user(("User"))
node_mal{{"MyAnimeList API"}}
node_imagehost{{"Image host"}}
node_jsonfile[("AnimeList JSON<br/>[AnimeList.json]")]
node_txtfile["Title-name file"]

node_user -->|"uses"| node_main
node_main -->|"loads and saves"| node_filehandler
node_filehandler -->|"reads and writes"| node_jsonfile
node_filehandler -->|"maps records"| node_mapper
node_mapper -->|"converts from"| node_unclassified
node_mapper -->|"creates"| node_anime
node_mapper -->|"creates"| node_manga
node_main -->|"filters search"| node_sortsearch
node_main -->|"shows selection"| node_searchdesc
node_searchdesc -->|"invokes actions"| node_main
node_main -->|"opens add flow"| node_addwindow
node_addwindow -->|"searches or fetches"| node_malcontext
node_malcontext -->|"requests metadata"| node_mal
node_malcontext -->|"builds anime"| node_anime
node_malcontext -->|"builds manga"| node_manga
node_addwindow -->|"populates results"| node_addcontrols
node_addwindow -->|"sets image service"| node_images
node_images -->|"downloads images"| node_imagehost
node_addwindow -->|"adds chosen title"| node_main
node_main -->|"opens text import"| node_filewindow
node_filewindow -->|"reads names"| node_txtfile
node_filewindow -->|"searches each name"| node_malcontext
node_filewindow -->|"adds matched title"| node_main
node_main -->|"opens refresh flow"| node_updatewindow
node_updatewindow -->|"fetches current metadata"| node_malcontext
node_main -->|"opens statistics"| node_statswindow
node_main -->|"imports and exports"| node_filehandler

click node_main "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/MainWindow.xaml.cs"
click node_searchdesc "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UserControls/SearchAndDescription.xaml.cs"
click node_addwindow "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/AddWindow.xaml.cs"
click node_filewindow "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/FileHandleWindow.xaml.cs"
click node_updatewindow "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UpdateWindow.xaml.cs"
click node_statswindow "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/StatsWindow.xaml"
click node_addcontrols "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UserControls/AddContent.xaml.cs"
click node_content "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/AContent.cs"
click node_anime "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/Anime.cs"
click node_manga "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/Manga.cs"
click node_unclassified "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/UnclassifiedContent.cs"
click node_filehandler "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/FileHandler.cs"
click node_mapper "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/ContentMapper.cs"
click node_sortsearch "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/StringOps.cs"
click node_malcontext "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/MalContext.cs"
click node_images "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/ImageService.cs"
click node_jsonfile "https://github.com/vojtechgero/animelistwpf/blob/master/AnimeList.json"

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_main,node_searchdesc,node_addwindow,node_filewindow,node_updatewindow,node_statswindow,node_addcontrols,node_user toneBlue
class node_sortsearch,node_jsonfile toneAmber
class node_content,node_anime,node_manga,node_unclassified,node_filehandler,node_mapper,node_mal toneMint
class node_malcontext,node_images toneRose
class node_imagehost,node_txtfile toneIndigo
```

## Components

### Desktop UI

- [Collection window](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/MainWindow.xaml.cs): `AnimeListWpf/MainWindow.xaml.cs`
- [Search and details](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UserControls/SearchAndDescription.xaml.cs): `AnimeListWpf/Views/UserControls/SearchAndDescription.xaml.cs`
- [Add title window](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/AddWindow.xaml.cs): `AnimeListWpf/Views/AddWindow.xaml.cs`
- [Text import window](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/FileHandleWindow.xaml.cs): `AnimeListWpf/Views/FileHandleWindow.xaml.cs`
- [Metadata update window](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UpdateWindow.xaml.cs): `AnimeListWpf/Views/UpdateWindow.xaml.cs`
- [Statistics window](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/StatsWindow.xaml): `AnimeListWpf/Views/StatsWindow.xaml`
- [Search result controls](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Views/UserControls/AddContent.xaml.cs): `AnimeListWpf/Views/UserControls/AddContent.xaml.cs`

### Catalog workflows

- [Sorting and search](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/StringOps.cs): `AnimeListWpf/Services/StringOps.cs`

### Models and storage

- [Content models](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/AContent.cs): `AnimeListWpf/Models/AContent.cs`
- [Anime model](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/Anime.cs): `AnimeListWpf/Models/Anime.cs`
- [Manga model](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/Manga.cs): `AnimeListWpf/Models/Manga.cs`
- [Imported record model](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Models/UnclassifiedContent.cs): `AnimeListWpf/Models/UnclassifiedContent.cs`
- [JSON list handler](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/FileHandler.cs): `AnimeListWpf/Services/FileHandler.cs`
- [Content mapper](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/ContentMapper.cs): `AnimeListWpf/Services/ContentMapper.cs`

### External services

- [MAL lookup client](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/MalContext.cs): `AnimeListWpf/Services/MalContext.cs`
- [Image service](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeListWpf/Services/ImageService.cs): `AnimeListWpf/Services/ImageService.cs`

### Other components

- **User**
- **MyAnimeList API**
- **Image host**
- [AnimeList JSON](https://github.com/vojtechgero/animelistwpf/blob/master/AnimeList.json): `AnimeList.json`
- **Title-name file**

## Connections

- User → Collection window: uses
- Collection window → JSON list handler: loads and saves
- JSON list handler → AnimeList JSON: reads and writes
- JSON list handler → Content mapper: maps records
- Content mapper → Imported record model: converts from
- Content mapper → Anime model: creates
- Content mapper → Manga model: creates
- Collection window → Sorting and search: filters search
- Collection window → Search and details: shows selection
- Search and details → Collection window: invokes actions
- Collection window → Add title window: opens add flow
- Add title window → MAL lookup client: searches or fetches
- MAL lookup client → MyAnimeList API: requests metadata
- MAL lookup client → Anime model: builds anime
- MAL lookup client → Manga model: builds manga
- Add title window → Search result controls: populates results
- Add title window → Image service: sets image service
- Image service → Image host: downloads images
- Add title window → Collection window: adds chosen title
- Collection window → Text import window: opens text import
- Text import window → Title-name file: reads names
- Text import window → MAL lookup client: searches each name
- Text import window → Collection window: adds matched title
- Collection window → Metadata update window: opens refresh flow
- Metadata update window → MAL lookup client: fetches current metadata
- Collection window → Statistics window: opens statistics
- Collection window → JSON list handler: imports and exports
