# ahiser24/gamedrop architecture

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

- Interactive diagram: https://gitdiagram.com/ahiser24/gamedrop
- Repository: https://github.com/ahiser24/gamedrop

## Overview

Game Drop is a desktop video clipping and Discord-sharing app. The user connects Discord, loads and previews a clip, selects a range and output format, then starts local GPU/CPU transcoding and optionally sends the result to Discord or configured webhooks. The graph follows the documented workflow and excerpted calls; some UI wiring and unsampled capabilities are represented only where README or SOURCE INDEX evidence supports them.

Main entry points: [`gamedrop/ui/main_window.py`](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/main_window.py) (Main window), [`gamedrop/core/video_processor.py`](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/video_processor.py) (Clip processing), [`gamedrop/core/app_controller.py`](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/app_controller.py) (App controller), [`gamedrop/utils/ffmpeg_wrapper.py`](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/ffmpeg_wrapper.py) (FFmpeg interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_entry["App startup<br/>[__main__.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_range["Clip range slider<br/>[range_slider.py]"]
  node_dialogs["Settings dialogs<br/>[dialogs.py]"]
  node_controller["App controller<br/>[app_controller.py]"]
end

subgraph group_media["Clip processing"]
  node_playback["Video playback"]
  node_processor["Clip processing<br/>[video_processor.py]"]
  node_ffwrap["FFmpeg interface<br/>[ffmpeg_wrapper.py]"]
  node_ffcore["FFmpeg engine<br/>[ffmpeg_core.py]"]
end

subgraph group_sharing["Discord sharing"]
  node_oauth["Discord OAuth<br/>[discord_oauth.py]"]
  node_discord{{"Discord API"}}
  node_webhooks{{"Webhook destinations"}}
end

subgraph group_support["Platform support"]
  node_gpu["GPU detection<br/>[detector.py]"]
  node_platform["Platform detection<br/>[detection.py]"]
  node_paths["Paths and resources<br/>[paths.py]"]
  node_updater["Update checker<br/>[updater.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_window
node_entry -->|"creates"| node_controller
node_entry -->|"creates"| node_window
node_window -->|"requests actions"| node_controller
node_window -->|"selects range"| node_range
node_window -->|"opens"| node_dialogs
node_controller -->|"loads video"| node_playback
node_controller -->|"processes clip"| node_processor
node_window -->|"starts authorization"| node_oauth
node_oauth -->|"fetches profile"| node_discord
node_processor -->|"encodes clip"| node_ffwrap
node_ffwrap -->|"delegates encoding"| node_ffcore
node_ffcore -->|"uploads clip"| node_webhooks
node_processor -.->|"selects encoder"| node_gpu
node_processor -->|"checks platform"| node_platform
node_ffcore -->|"checks platform"| node_platform
node_dialogs -.->|"offers setup"| node_ffwrap
node_window -->|"checks updates"| node_updater
node_entry -->|"resolves resources"| node_paths
node_oauth -->|"stores credentials"| node_paths
node_ffwrap -->|"resolves binaries"| node_paths

click node_entry "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/__main__.py"
click node_window "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/main_window.py"
click node_range "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/range_slider.py"
click node_dialogs "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/dialogs.py"
click node_controller "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/app_controller.py"
click node_playback "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/media_controller.py"
click node_processor "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/video_processor.py"
click node_ffwrap "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/ffmpeg_wrapper.py"
click node_ffcore "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/ffmpeg_core.py"
click node_gpu "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/gpu/detector.py"
click node_platform "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/platform_utils/detection.py"
click node_paths "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/paths.py"
click node_oauth "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/discord_oauth.py"
click node_updater "https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/updater.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_entry,node_window,node_range,node_dialogs,node_controller,node_user toneBlue
class node_playback,node_processor,node_ffwrap,node_ffcore toneAmber
class node_oauth,node_discord,node_webhooks toneMint
class node_gpu,node_platform,node_paths,node_updater toneRose
```

## Components

### Desktop app

- [App startup](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/__main__.py): `gamedrop/__main__.py`
- [Main window](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/main_window.py): `gamedrop/ui/main_window.py`
- [Clip range slider](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/range_slider.py): `gamedrop/ui/range_slider.py`
- [Settings dialogs](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/ui/dialogs.py): `gamedrop/ui/dialogs.py`
- [App controller](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/app_controller.py): `gamedrop/core/app_controller.py`

### Clip processing

- [Video playback](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/media_controller.py): `gamedrop/core/media_controller.py`
- [Clip processing](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/core/video_processor.py): `gamedrop/core/video_processor.py`
- [FFmpeg interface](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/ffmpeg_wrapper.py): `gamedrop/utils/ffmpeg_wrapper.py`
- [FFmpeg engine](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/ffmpeg_core.py): `gamedrop/utils/ffmpeg_core.py`

### Discord sharing

- [Discord OAuth](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/discord_oauth.py): `gamedrop/utils/discord_oauth.py`
- **Discord API**
- **Webhook destinations**

### Platform support

- [GPU detection](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/gpu/detector.py): `gamedrop/utils/gpu/detector.py`
- [Platform detection](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/platform_utils/detection.py): `gamedrop/platform_utils/detection.py`
- [Paths and resources](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/paths.py): `gamedrop/utils/paths.py`
- [Update checker](https://github.com/ahiser24/gamedrop/blob/main/gamedrop/utils/updater.py): `gamedrop/utils/updater.py`

### Other components

- **User**

## Connections

- User → Main window: uses (evidence: `README.md`)
- App startup → App controller: creates (evidence: `gamedrop/__main__.py`)
- App startup → Main window: creates (evidence: `gamedrop/__main__.py`)
- Main window → App controller: requests actions (evidence: `README.md`)
- Main window → Clip range slider: selects range (evidence: `gamedrop/ui/main_window.py`)
- Main window → Settings dialogs: opens (evidence: `gamedrop/ui/main_window.py`)
- App controller → Video playback: loads video (evidence: `gamedrop/core/app_controller.py`)
- App controller → Clip processing: processes clip (evidence: `gamedrop/core/app_controller.py`)
- Main window → Discord OAuth: starts authorization (evidence: `gamedrop/ui/main_window.py`)
- Discord OAuth → Discord API: fetches profile (evidence: `gamedrop/utils/discord_oauth.py`)
- Clip processing → FFmpeg interface: encodes clip (evidence: `gamedrop/core/video_processor.py`)
- FFmpeg interface → FFmpeg engine: delegates encoding (evidence: `gamedrop/utils/ffmpeg_wrapper.py`)
- FFmpeg engine → Webhook destinations: uploads clip (evidence: `gamedrop/utils/ffmpeg_core.py`)
- Clip processing → GPU detection: selects encoder
- Clip processing → Platform detection: checks platform (evidence: `gamedrop/core/video_processor.py`)
- FFmpeg engine → Platform detection: checks platform (evidence: `gamedrop/utils/ffmpeg_core.py`)
- Settings dialogs → FFmpeg interface: offers setup (evidence: `gamedrop/ui/dialogs.py`)
- Main window → Update checker: checks updates (evidence: `gamedrop/ui/main_window.py`)
- App startup → Paths and resources: resolves resources (evidence: `gamedrop/__main__.py`)
- Discord OAuth → Paths and resources: stores credentials (evidence: `gamedrop/utils/discord_oauth.py`)
- FFmpeg interface → Paths and resources: resolves binaries (evidence: `gamedrop/utils/ffmpeg_wrapper.py`)
