# hydralauncher/hydra architecture

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

- Interactive diagram: https://gitdiagram.com/hydralauncher/hydra
- Repository: https://github.com/hydralauncher/hydra

## Overview

Hydra is an Electron gaming platform: players discover games, manage a library, download and install titles, then use game, social, achievement, and cloud-save features. The main process coordinates desktop services; React provides the standard and controller-oriented interfaces, while Rust supplies native capabilities including cloud-save and torrent code. The README establishes the product capabilities; sampled imports and calls support only some internal links, so unsampled subsystem connections are omitted or marked unverified.

Main entry points: [`src/big-picture/src/app.tsx`](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/app.tsx) (Big Picture shell), [`src/main/services/download/download-manager.ts`](https://github.com/hydralauncher/hydra/blob/main/src/main/services/download/download-manager.ts) (Download manager), [`src/big-picture/src/components/pages/game-achievements/index.ts`](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game-achievements/index.ts) (Achievement views), [`src/main/services/game-files-manager.ts`](https://github.com/hydralauncher/hydra/blob/main/src/main/services/game-files-manager.ts) (Game file manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Player interfaces"]
  node_desktop["Electron app<br/>[app.tsx]"]
  node_bigpicture["Big Picture shell<br/>[app.tsx]"]
end

subgraph group_games["Library and play"]
  node_catalogue["Game catalogue<br/>[catalogue.tsx]"]
  node_library["Game library<br/>[page.tsx]"]
  node_gameview["Game details<br/>[index.ts]"]
  node_downloads["Downloads UI<br/>[index.ts]"]
  node_cloudui["Cloud-save UI<br/>[index.ts]"]
end

subgraph group_social["Community features"]
  node_profiles["Profiles and friends<br/>[app.tsx]"]
  node_achievementui["Achievement views<br/>[index.ts]"]
end

subgraph group_runtime["Desktop runtime"]
  node_main["Main process<br/>[main.ts]"]
  node_api["Hydra API service<br/>[hydra-api.ts]"]
  node_downloadmgr["Download manager"]
  node_installmgr["Game file manager"]
  node_achievementwatch["Achievement watcher"]
end

subgraph group_native["Native capabilities"]
  node_cloudengine["Cloud-save engine<br/>[mod.rs]"]
  node_torrent["Torrent binding<br/>[mod.rs]"]
  node_torrentbridge["Libtorrent bridge<br/>[bridge.cpp]"]
end

node_player(("Player"))

node_player -->|"navigates"| node_bigpicture
node_player -->|"uses"| node_desktop
node_bigpicture -->|"routes to"| node_catalogue
node_bigpicture -->|"routes to"| node_library
node_bigpicture -->|"routes to"| node_downloads
node_bigpicture -->|"routes to"| node_achievementui
node_player -->|"manages games"| node_library
node_player -->|"discovers games"| node_catalogue
node_player -->|"views profile"| node_profiles
node_player -->|"saves progress"| node_cloudui
node_player -->|"unlocks"| node_achievementui
node_main -.->|"coordinates"| node_downloadmgr
node_downloadmgr -->|"requests status"| node_torrent
node_downloadmgr -.->|"hands off installs"| node_installmgr
node_installmgr -->|"uses cloud saves"| node_cloudengine
node_achievementwatch -.->|"syncs results"| node_achievementui
node_api -.->|"provides account data"| node_profiles
node_torrent -.->|"wraps engine"| node_torrentbridge

click node_desktop "https://github.com/hydralauncher/hydra/blob/main/src/renderer/src/app.tsx"
click node_bigpicture "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/app.tsx"
click node_catalogue "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/pages/catalogue/catalogue.tsx"
click node_library "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/pages/library/page.tsx"
click node_gameview "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game/index.ts"
click node_downloads "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/downloads/index.ts"
click node_cloudui "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game/cloud-save-v2/index.ts"
click node_profiles "https://github.com/hydralauncher/hydra/blob/main/src/renderer/src/app.tsx"
click node_achievementui "https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game-achievements/index.ts"
click node_main "https://github.com/hydralauncher/hydra/blob/main/src/main/main.ts"
click node_api "https://github.com/hydralauncher/hydra/blob/main/src/main/services/hydra-api.ts"
click node_downloadmgr "https://github.com/hydralauncher/hydra/blob/main/src/main/services/download/download-manager.ts"
click node_installmgr "https://github.com/hydralauncher/hydra/blob/main/src/main/services/game-files-manager.ts"
click node_achievementwatch "https://github.com/hydralauncher/hydra/blob/main/src/main/services/achievements/achievement-watcher-manager.ts"
click node_cloudengine "https://github.com/hydralauncher/hydra/blob/main/native/hydra-native/src/cloud_save/mod.rs"
click node_torrent "https://github.com/hydralauncher/hydra/blob/main/native/hydra-native/src/torrent/mod.rs"
click node_torrentbridge "https://github.com/hydralauncher/hydra/blob/main/native/torrent-bridge/bridge.cpp"

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_desktop,node_bigpicture toneBlue
class node_catalogue,node_library,node_gameview,node_downloads,node_cloudui toneAmber
class node_profiles,node_achievementui toneMint
class node_main,node_api,node_downloadmgr,node_installmgr,node_achievementwatch toneRose
class node_cloudengine,node_torrent,node_torrentbridge,node_player toneIndigo
```

## Components

### Player interfaces

- [Electron app](https://github.com/hydralauncher/hydra/blob/main/src/renderer/src/app.tsx): `src/renderer/src/app.tsx`
- [Big Picture shell](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/app.tsx): `src/big-picture/src/app.tsx`

### Library and play

- [Game catalogue](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/pages/catalogue/catalogue.tsx): `src/big-picture/src/pages/catalogue/catalogue.tsx`
- [Game library](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/pages/library/page.tsx): `src/big-picture/src/pages/library/page.tsx`
- [Game details](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game/index.ts): `src/big-picture/src/components/pages/game/index.ts`
- [Downloads UI](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/downloads/index.ts): `src/big-picture/src/components/pages/downloads/index.ts`
- [Cloud-save UI](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game/cloud-save-v2/index.ts): `src/big-picture/src/components/pages/game/cloud-save-v2/index.ts`

### Community features

- [Profiles and friends](https://github.com/hydralauncher/hydra/blob/main/src/renderer/src/app.tsx): `src/renderer/src/app.tsx`
- [Achievement views](https://github.com/hydralauncher/hydra/blob/main/src/big-picture/src/components/pages/game-achievements/index.ts): `src/big-picture/src/components/pages/game-achievements/index.ts`

### Desktop runtime

- [Main process](https://github.com/hydralauncher/hydra/blob/main/src/main/main.ts): `src/main/main.ts`
- [Hydra API service](https://github.com/hydralauncher/hydra/blob/main/src/main/services/hydra-api.ts): `src/main/services/hydra-api.ts`
- [Download manager](https://github.com/hydralauncher/hydra/blob/main/src/main/services/download/download-manager.ts): `src/main/services/download/download-manager.ts`
- [Game file manager](https://github.com/hydralauncher/hydra/blob/main/src/main/services/game-files-manager.ts): `src/main/services/game-files-manager.ts`
- [Achievement watcher](https://github.com/hydralauncher/hydra/blob/main/src/main/services/achievements/achievement-watcher-manager.ts): `src/main/services/achievements/achievement-watcher-manager.ts`

### Native capabilities

- [Cloud-save engine](https://github.com/hydralauncher/hydra/blob/main/native/hydra-native/src/cloud_save/mod.rs): `native/hydra-native/src/cloud_save/mod.rs`
- [Torrent binding](https://github.com/hydralauncher/hydra/blob/main/native/hydra-native/src/torrent/mod.rs): `native/hydra-native/src/torrent/mod.rs`
- [Libtorrent bridge](https://github.com/hydralauncher/hydra/blob/main/native/torrent-bridge/bridge.cpp): `native/torrent-bridge/bridge.cpp`

### Other components

- **Player**

## Connections

- Player → Big Picture shell: navigates (evidence: `README.md`)
- Player → Electron app: uses (evidence: `README.md`)
- Big Picture shell → Game catalogue: routes to (evidence: `src/big-picture/src/main.tsx`)
- Big Picture shell → Game library: routes to (evidence: `src/big-picture/src/main.tsx`)
- Big Picture shell → Downloads UI: routes to
- Big Picture shell → Achievement views: routes to
- Player → Game library: manages games (evidence: `README.md`)
- Player → Game catalogue: discovers games (evidence: `README.md`)
- Player → Profiles and friends: views profile (evidence: `README.md`)
- Player → Cloud-save UI: saves progress (evidence: `README.md`)
- Player → Achievement views: unlocks (evidence: `README.md`)
- Main process → Download manager: coordinates
- Download manager → Torrent binding: requests status (evidence: `src/main/services/download/download-manager.ts`)
- Download manager → Game file manager: hands off installs (evidence: `src/main/services/download/download-manager.ts`)
- Game file manager → Cloud-save engine: uses cloud saves (evidence: `src/main/services/game-files-manager.ts`)
- Achievement watcher → Achievement views: syncs results
- Hydra API service → Profiles and friends: provides account data
- Torrent binding → Libtorrent bridge: wraps engine
