# bottlesdevs/bottles architecture

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

- Interactive diagram: https://gitdiagram.com/bottlesdevs/bottles
- Repository: https://github.com/bottlesdevs/bottles

## Overview

Bottles is a Linux desktop application for running Windows software in isolated Wine environments. Users create or select a bottle, configure its Windows and runtime settings, install dependencies or components, then launch and manage programs through the GUI or CLI. The backend also supports backups, versioning, game-library tracking and UMU integration. The graph covers these documented product areas, but source excerpts are incomplete; edges are limited to relationships visible in the excerpts or SOURCE INDEX, with uncertain integrations omitted.

Main entry points: [`bottles/backend/managers/manager.py`](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/manager.py) (Bottle manager), [`bottles/backend/wine/executor.py`](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/executor.py) (Wine executor), [`bottles/frontend/main.py`](https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/main.py) (Desktop GUI), [`bottles/backend/managers/library.py`](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/library.py) (Game library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_gui["Desktop GUI<br/>[main.py]"]
  node_cli["Command line<br/>[cli.py]"]
  node_window["Main window<br/>[window.py]"]
end

subgraph group_bottle["Bottle management"]
  node_manager["Bottle manager<br/>[manager.py]"]
  node_config["Bottle configuration<br/>[config.py]"]
  node_repository["Catalog repositories<br/>[repository.py]"]
  node_installer["Installers and dependencies<br/>[installer.py]"]
  node_components["Runtime components<br/>[component.py]"]
  node_backup["Backup and versioning<br/>[backup.py]"]
end

subgraph group_runtime["Windows runtime"]
  node_wineexec["Wine executor<br/>[executor.py]"]
  node_winecommand["Wine command setup<br/>[winecommand.py]"]
  node_wineboot["Wine boot<br/>[wineboot.py]"]
  node_winedbg["Wine debugging<br/>[winedbg.py]"]
end

subgraph group_catalog["Catalogs and games"]
  node_library[("Game library<br/>[library.py]")]
  node_playtime[("Playtime tracking<br/>[playtime.py]")]
  node_steamgriddb["SteamGridDB artwork<br/>[steamgriddb.py]"]
end

subgraph group_umu["UMU integration"]
  node_umu[("UMU game repository<br/>[repository.py]")]
  node_umuexec["UMU executor<br/>[executor.py]"]
end

node_user(("User"))
node_wine["Wine"]
node_externalcatalog["Remote catalogs"]

node_user -->|"uses"| node_gui
node_user -->|"uses"| node_cli
node_gui -->|"opens"| node_window
node_gui -->|"initializes"| node_manager
node_cli -->|"calls"| node_manager
node_window -->|"uses"| node_manager
node_manager -->|"loads and updates"| node_config
node_manager -->|"uses"| node_installer
node_manager -->|"uses"| node_components
node_manager -.->|"launches"| node_wineexec
node_wineexec -->|"runs programs"| node_wine
node_wineexec -->|"uses"| node_winecommand
node_wineexec -->|"uses"| node_winedbg
node_wineexec -->|"uses"| node_wineboot
node_manager -->|"loads catalogs"| node_repository
node_manager -.->|"manages"| node_backup
node_manager -->|"updates"| node_library
node_library -->|"fetches artwork"| node_steamgriddb
node_library -.->|"tracks"| node_playtime
node_umu -.->|"reads game data"| node_externalcatalog
node_umuexec -.->|"runs Windows games"| node_wine

click node_gui "https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/main.py"
click node_cli "https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/cli/cli.py"
click node_window "https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/windows/window.py"
click node_manager "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/manager.py"
click node_config "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/models/config.py"
click node_repository "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/repository.py"
click node_installer "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/installer.py"
click node_components "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/component.py"
click node_backup "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/backup.py"
click node_wineexec "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/executor.py"
click node_winecommand "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/winecommand.py"
click node_wineboot "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/wineboot.py"
click node_winedbg "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/winedbg.py"
click node_library "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/library.py"
click node_playtime "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/playtime.py"
click node_steamgriddb "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/steamgriddb.py"
click node_umu "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/umu/repository.py"
click node_umuexec "https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/umu/executor.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_cli,node_window,node_user toneBlue
class node_manager,node_config,node_repository,node_installer,node_components,node_backup toneAmber
class node_wineexec,node_winecommand,node_wineboot,node_winedbg toneMint
class node_library,node_playtime,node_steamgriddb toneRose
class node_umu,node_umuexec,node_wine,node_externalcatalog toneIndigo
```

## Components

### User interfaces

- [Desktop GUI](https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/main.py): `bottles/frontend/main.py`
- [Command line](https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/cli/cli.py): `bottles/frontend/cli/cli.py`
- [Main window](https://github.com/bottlesdevs/bottles/blob/main/bottles/frontend/windows/window.py): `bottles/frontend/windows/window.py`

### Bottle management

- [Bottle manager](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/manager.py): `bottles/backend/managers/manager.py`
- [Bottle configuration](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/models/config.py): `bottles/backend/models/config.py`
- [Catalog repositories](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/repository.py): `bottles/backend/managers/repository.py`
- [Installers and dependencies](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/installer.py): `bottles/backend/managers/installer.py`
- [Runtime components](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/component.py): `bottles/backend/managers/component.py`
- [Backup and versioning](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/backup.py): `bottles/backend/managers/backup.py`

### Windows runtime

- [Wine executor](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/executor.py): `bottles/backend/wine/executor.py`
- [Wine command setup](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/winecommand.py): `bottles/backend/wine/winecommand.py`
- [Wine boot](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/wineboot.py): `bottles/backend/wine/wineboot.py`
- [Wine debugging](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/wine/winedbg.py): `bottles/backend/wine/winedbg.py`

### Catalogs and games

- [Game library](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/library.py): `bottles/backend/managers/library.py`
- [Playtime tracking](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/playtime.py): `bottles/backend/managers/playtime.py`
- [SteamGridDB artwork](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/managers/steamgriddb.py): `bottles/backend/managers/steamgriddb.py`

### UMU integration

- [UMU game repository](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/umu/repository.py): `bottles/backend/umu/repository.py`
- [UMU executor](https://github.com/bottlesdevs/bottles/blob/main/bottles/backend/umu/executor.py): `bottles/backend/umu/executor.py`

### Other components

- **User**
- **Wine**
- **Remote catalogs**

## Connections

- User → Desktop GUI: uses (evidence: `README.md`)
- User → Command line: uses (evidence: `bottles/frontend/cli/cli.py`)
- Desktop GUI → Main window: opens (evidence: `bottles/frontend/main.py`)
- Desktop GUI → Bottle manager: initializes (evidence: `bottles/frontend/main.py`)
- Command line → Bottle manager: calls (evidence: `bottles/frontend/cli/cli.py`)
- Main window → Bottle manager: uses (evidence: `bottles/frontend/windows/window.py`)
- Bottle manager → Bottle configuration: loads and updates (evidence: `bottles/backend/managers/manager.py`)
- Bottle manager → Installers and dependencies: uses (evidence: `bottles/backend/managers/manager.py`)
- Bottle manager → Runtime components: uses (evidence: `bottles/backend/managers/manager.py`)
- Bottle manager → Wine executor: launches
- Wine executor → Wine: runs programs (evidence: `README.md`)
- Wine executor → Wine command setup: uses (evidence: `bottles/backend/wine/executor.py`)
- Wine executor → Wine debugging: uses (evidence: `bottles/backend/wine/executor.py`)
- Wine executor → Wine boot: uses (evidence: `bottles/frontend/widgets/library.py`)
- Bottle manager → Catalog repositories: loads catalogs (evidence: `bottles/backend/managers/manager.py`)
- Bottle manager → Backup and versioning: manages
- Bottle manager → Game library: updates (evidence: `bottles/backend/managers/manager.py`)
- Game library → SteamGridDB artwork: fetches artwork (evidence: `bottles/backend/managers/library.py`)
- Game library → Playtime tracking: tracks
- UMU game repository → Remote catalogs: reads game data
- UMU executor → Wine: runs Windows games
