# mashirow/qt-saver architecture

> Architecture diagram of the GitHub repository mashirow/qt-saver, 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/mashirow/qt-saver
- Repository: https://github.com/mashirow/qt-saver

## Overview

QTSaver is a desktop Instagram Story saver. The main workflow is to authenticate, add accounts to track, fetch their current stories, save selected media locally, and browse or manage downloads in the Library. The GUI coordinates the workflow; Instagram access, configuration and file operations, and the download index are separate runtime layers. The README documents the product capabilities, while some GUI implementation is excerpted only partially, so undocumented call relationships are omitted.

Main entry points: [`gui_new.py`](https://github.com/mashirow/qt-saver/blob/main/gui_new.py) (QTSaver GUI), [`QT_saver.py`](https://github.com/mashirow/qt-saver/blob/main/QT_saver.py) (Story media download and file operations), [`ig_client.py`](https://github.com/mashirow/qt-saver/blob/main/ig_client.py) (Session and story client), [`download_index.py`](https://github.com/mashirow/qt-saver/blob/main/download_index.py) (Download index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_gui["QTSaver GUI<br/>[gui_new.py]"]
  node_account_ui["Account workspace<br/>[gui_new.py]"]
  node_library_ui["Library and preview<br/>[gui_new.py]"]
  node_player["Video player<br/>[video_player.py]"]
end

subgraph group_instagram["Instagram access"]
  node_ig_client["Session and story client<br/>[ig_client.py]"]
end

subgraph group_downloads["Downloads and library"]
  node_media_ops["Story media download and file operations<br/>[QT_saver.py]"]
  node_download_index[("Download index<br/>[download_index.py]")]
end

subgraph group_local["Local settings"]
  node_account_config["Tracked accounts and output path<br/>[QT_saver.py]"]
  node_crash["Windows error dialog<br/>[crash.py]"]
end

node_user(("User"))
node_instagram_service{{"Instagram"}}

node_user -->|"uses"| node_gui
node_gui -->|"authenticates through"| node_ig_client
node_ig_client -->|"authenticates and fetches"| node_instagram_service
node_gui -->|"presents"| node_account_ui
node_account_ui -->|"resolves and fetches"| node_ig_client
node_account_ui -->|"manages tracked accounts"| node_account_config
node_gui -->|"downloads stories through"| node_media_ops
node_media_ops -->|"requests media"| node_instagram_service
node_gui -->|"records and queries"| node_download_index
node_download_index -.->|"indexes saved files"| node_media_ops
node_gui -->|"browses and manages"| node_library_ui
node_library_ui -->|"reads entries"| node_download_index
node_library_ui -.->|"previews video with"| node_player
node_gui -->|"reads and updates settings"| node_account_config
node_media_ops -->|"uses error dialog"| node_crash

click node_gui "https://github.com/mashirow/qt-saver/blob/main/gui_new.py"
click node_account_ui "https://github.com/mashirow/qt-saver/blob/main/gui_new.py"
click node_library_ui "https://github.com/mashirow/qt-saver/blob/main/gui_new.py"
click node_player "https://github.com/mashirow/qt-saver/blob/main/video_player.py"
click node_ig_client "https://github.com/mashirow/qt-saver/blob/main/ig_client.py"
click node_account_config "https://github.com/mashirow/qt-saver/blob/main/QT_saver.py"
click node_media_ops "https://github.com/mashirow/qt-saver/blob/main/QT_saver.py"
click node_download_index "https://github.com/mashirow/qt-saver/blob/main/download_index.py"
click node_crash "https://github.com/mashirow/qt-saver/blob/main/crash.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_gui,node_account_ui,node_library_ui,node_player,node_user toneBlue
class node_ig_client toneAmber
class node_media_ops,node_download_index toneMint
class node_account_config,node_crash toneRose
class node_instagram_service toneIndigo
```

## Components

### Desktop interface

- [QTSaver GUI](https://github.com/mashirow/qt-saver/blob/main/gui_new.py): `gui_new.py`
- [Account workspace](https://github.com/mashirow/qt-saver/blob/main/gui_new.py): `gui_new.py`
- [Library and preview](https://github.com/mashirow/qt-saver/blob/main/gui_new.py): `gui_new.py`
- [Video player](https://github.com/mashirow/qt-saver/blob/main/video_player.py): `video_player.py`

### Instagram access

- [Session and story client](https://github.com/mashirow/qt-saver/blob/main/ig_client.py): `ig_client.py`

### Downloads and library

- [Story media download and file operations](https://github.com/mashirow/qt-saver/blob/main/QT_saver.py): `QT_saver.py`
- [Download index](https://github.com/mashirow/qt-saver/blob/main/download_index.py): `download_index.py`

### Local settings

- [Tracked accounts and output path](https://github.com/mashirow/qt-saver/blob/main/QT_saver.py): `QT_saver.py`
- [Windows error dialog](https://github.com/mashirow/qt-saver/blob/main/crash.py): `crash.py`

### Other components

- **User**
- **Instagram**

## Connections

- User → QTSaver GUI: uses (evidence: `README.md`)
- QTSaver GUI → Session and story client: authenticates through (evidence: `gui_new.py`)
- Session and story client → Instagram: authenticates and fetches (evidence: `ig_client.py`)
- QTSaver GUI → Account workspace: presents (evidence: `README.md`)
- Account workspace → Session and story client: resolves and fetches (evidence: `gui_new.py`)
- Account workspace → Tracked accounts and output path: manages tracked accounts (evidence: `README.md`)
- QTSaver GUI → Story media download and file operations: downloads stories through (evidence: `README.md`)
- Story media download and file operations → Instagram: requests media (evidence: `QT_saver.py`)
- QTSaver GUI → Download index: records and queries (evidence: `gui_new.py`)
- Download index → Story media download and file operations: indexes saved files
- QTSaver GUI → Library and preview: browses and manages (evidence: `README.md`)
- Library and preview → Download index: reads entries (evidence: `gui_new.py`)
- Library and preview → Video player: previews video with (evidence: `gui_new.py`)
- QTSaver GUI → Tracked accounts and output path: reads and updates settings (evidence: `README.md`)
- Story media download and file operations → Windows error dialog: uses error dialog (evidence: `QT_saver.py`)
