# ejber-ozkan/gamebasebox architecture

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

- Interactive diagram: https://gitdiagram.com/ejber-ozkan/gamebasebox
- Repository: https://github.com/ejber-ozkan/gamebasebox

## Overview

GameBase Box is a Tauri desktop frontend for importing and browsing platform-scoped GameBase libraries. The main workflow is selecting a platform and importing its MDB, querying the resulting local catalog, browsing/filtering games, viewing media and details, then launching with an external emulator or supported in-app emulation. Settings, themes, fullscreen navigation, extras, and music playback are additional product branches. Some backend and UI subsystems are represented by directory or exact tree paths because their source was not sampled; unverified relationships are omitted or dashed.

Main entry points: [`src/lib/tauri-bridge.ts`](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/tauri-bridge.ts) (Tauri Bridge), [`src/app/page.tsx`](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/app/page.tsx) (App Shell), [`src/components/detail/useUnifiedDetailViewModel.tsx`](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/detail/useUnifiedDetailViewModel.tsx) (Detail Model), [`src/contexts/SettingsContext.tsx`](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/contexts/SettingsContext.tsx) (Settings State)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Library Experience"]
  node_app["App Shell<br/>[page.tsx]"]
  node_library_state["Library Browser"]
  node_library_view["Library Views"]
  node_detail["Game Details<br/>[DetailView.tsx]"]
  node_detail_model["Detail Model"]
  node_fullscreen_nav["BigBox Navigation"]
end

subgraph group_platform["Platform Setup"]
  node_settings_ui["Settings UI<br/>[SettingsModal.tsx]"]
  node_setup_ui["Database Setup"]
  node_settings_state["Settings State"]
  node_platform_profiles["Platform Profiles"]
  node_theme["Themes<br/>[ThemeContext.tsx]"]
  node_platform_manifest["Platform Manifest"]
end

subgraph group_backend["Desktop Backend"]
  node_bridge["Tauri Bridge<br/>[tauri-bridge.ts]"]
  node_db_commands["Catalog Commands<br/>[querying.rs]"]
  node_catalog_db[("SQLite Catalog<br/>[database.rs]")]
  node_db_connection["DB Connections<br/>[connection.rs]"]
  node_mdb_export["MDB Import<br/>[mdb_export.rs]"]
  node_game_types["Game Records<br/>[game.ts]"]
end

subgraph group_playback["Playback and Media"]
  node_emulator_commands["Emulator Commands"]
  node_launch_model["Launch Builder<br/>[platform-launch.ts]"]
  node_web_emulator["Embedded Emulator<br/>[emulator.js]"]
  node_extras["Extras Browser<br/>[ExtrasDetail.tsx]"]
  node_music["Music Players<br/>[MusicPlayer.tsx]"]
end

node_user(("Player"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_library_view
node_app -->|"renders"| node_detail
node_app -->|"renders"| node_setup_ui
node_app -->|"renders"| node_settings_ui
node_library_view -.->|"uses"| node_library_state
node_library_state -->|"queries games"| node_bridge
node_detail -->|"uses"| node_detail_model
node_fullscreen_nav -->|"uses state"| node_library_state
node_fullscreen_nav -->|"selects game"| node_app
node_settings_ui -.->|"updates"| node_settings_state
node_setup_ui -.->|"imports database"| node_bridge
node_settings_state -->|"loads platforms"| node_bridge
node_settings_state -->|"builds settings"| node_platform_profiles
node_theme -->|"reads preference"| node_settings_state
node_bridge -->|"invokes queries"| node_db_commands
node_bridge -->|"imports MDB"| node_catalog_db
node_db_commands -->|"uses connection"| node_db_connection
node_catalog_db -.->|"uses connection"| node_db_connection
node_catalog_db -.->|"imports from"| node_mdb_export
node_detail_model -->|"builds request"| node_launch_model
node_detail_model -->|"launches emulator"| node_bridge
node_bridge -.->|"dispatches launch"| node_emulator_commands
node_detail_model -->|"shows extras"| node_extras
node_user -.->|"plays in app"| node_web_emulator
node_user -.->|"plays music"| node_music
node_db_commands -.->|"returns records"| node_game_types
node_platform_profiles -->|"uses manifest"| node_platform_manifest

click node_app "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/app/page.tsx"
click node_library_state "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/hooks/useLibraryBrowserState.ts"
click node_library_view "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/UnifiedLibraryView.tsx"
click node_detail "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/DetailView.tsx"
click node_detail_model "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/detail/useUnifiedDetailViewModel.tsx"
click node_fullscreen_nav "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/hooks/useUnifiedLibraryNavigation.ts"
click node_settings_ui "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/SettingsModal.tsx"
click node_setup_ui "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/setup/DatabaseSetupView.tsx"
click node_settings_state "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/contexts/SettingsContext.tsx"
click node_platform_profiles "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/platform-capabilities.ts"
click node_theme "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/contexts/ThemeContext.tsx"
click node_bridge "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/tauri-bridge.ts"
click node_db_commands "https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/commands/db/querying.rs"
click node_catalog_db "https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database.rs"
click node_db_connection "https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database/connection.rs"
click node_mdb_export "https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database/mdb_export.rs"
click node_emulator_commands "https://github.com/ejber-ozkan/gamebasebox/tree/main/src-tauri/src/commands/emulator"
click node_launch_model "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/platform-launch.ts"
click node_web_emulator "https://github.com/ejber-ozkan/gamebasebox/blob/main/public/emulator/data/src/emulator.js"
click node_extras "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/ExtrasDetail.tsx"
click node_music "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/MusicPlayer.tsx"
click node_game_types "https://github.com/ejber-ozkan/gamebasebox/blob/main/src/types/game.ts"
click node_platform_manifest "https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/platform_manifest.rs"

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_app,node_library_state,node_library_view,node_detail,node_detail_model,node_fullscreen_nav toneBlue
class node_settings_ui,node_setup_ui,node_settings_state,node_platform_profiles,node_theme,node_platform_manifest toneAmber
class node_bridge,node_db_commands,node_catalog_db,node_db_connection,node_mdb_export,node_game_types toneMint
class node_emulator_commands,node_launch_model,node_web_emulator,node_extras,node_music toneRose
class node_user toneIndigo
```

## Components

### Library Experience

- [App Shell](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Library Browser](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/hooks/useLibraryBrowserState.ts): `src/hooks/useLibraryBrowserState.ts`
- [Library Views](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/UnifiedLibraryView.tsx): `src/components/UnifiedLibraryView.tsx`
- [Game Details](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/DetailView.tsx): `src/components/DetailView.tsx`
- [Detail Model](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/detail/useUnifiedDetailViewModel.tsx): `src/components/detail/useUnifiedDetailViewModel.tsx`
- [BigBox Navigation](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/hooks/useUnifiedLibraryNavigation.ts): `src/hooks/useUnifiedLibraryNavigation.ts`

### Platform Setup

- [Settings UI](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/SettingsModal.tsx): `src/components/SettingsModal.tsx`
- [Database Setup](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/setup/DatabaseSetupView.tsx): `src/components/setup/DatabaseSetupView.tsx`
- [Settings State](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/contexts/SettingsContext.tsx): `src/contexts/SettingsContext.tsx`
- [Platform Profiles](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/platform-capabilities.ts): `src/lib/platform-capabilities.ts`
- [Themes](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/contexts/ThemeContext.tsx): `src/contexts/ThemeContext.tsx`
- [Platform Manifest](https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/platform_manifest.rs): `src-tauri/src/platform_manifest.rs`

### Desktop Backend

- [Tauri Bridge](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/tauri-bridge.ts): `src/lib/tauri-bridge.ts`
- [Catalog Commands](https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/commands/db/querying.rs): `src-tauri/src/commands/db/querying.rs`
- [SQLite Catalog](https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database.rs): `src-tauri/src/database.rs`
- [DB Connections](https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database/connection.rs): `src-tauri/src/database/connection.rs`
- [MDB Import](https://github.com/ejber-ozkan/gamebasebox/blob/main/src-tauri/src/database/mdb_export.rs): `src-tauri/src/database/mdb_export.rs`
- [Game Records](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/types/game.ts): `src/types/game.ts`

### Playback and Media

- [Emulator Commands](https://github.com/ejber-ozkan/gamebasebox/tree/main/src-tauri/src/commands/emulator): `src-tauri/src/commands/emulator`
- [Launch Builder](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/lib/platform-launch.ts): `src/lib/platform-launch.ts`
- [Embedded Emulator](https://github.com/ejber-ozkan/gamebasebox/blob/main/public/emulator/data/src/emulator.js): `public/emulator/data/src/emulator.js`
- [Extras Browser](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/ExtrasDetail.tsx): `src/components/ExtrasDetail.tsx`
- [Music Players](https://github.com/ejber-ozkan/gamebasebox/blob/main/src/components/MusicPlayer.tsx): `src/components/MusicPlayer.tsx`

### Other components

- **Player**

## Connections

- Player → App Shell: uses (evidence: `README.md`)
- App Shell → Library Views: renders (evidence: `src/app/page.tsx`)
- App Shell → Game Details: renders (evidence: `src/app/page.tsx`)
- App Shell → Database Setup: renders (evidence: `src/app/page.tsx`)
- App Shell → Settings UI: renders (evidence: `src/app/page.tsx`)
- Library Views → Library Browser: uses
- Library Browser → Tauri Bridge: queries games (evidence: `src/hooks/useLibraryBrowserState.ts`)
- Game Details → Detail Model: uses (evidence: `src/components/DetailView.tsx`)
- BigBox Navigation → Library Browser: uses state (evidence: `src/hooks/useUnifiedLibraryNavigation.ts`)
- BigBox Navigation → App Shell: selects game (evidence: `src/hooks/useUnifiedLibraryNavigation.ts`)
- Settings UI → Settings State: updates
- Database Setup → Tauri Bridge: imports database
- Settings State → Tauri Bridge: loads platforms (evidence: `src/contexts/SettingsContext.tsx`)
- Settings State → Platform Profiles: builds settings (evidence: `src/contexts/SettingsContext.tsx`)
- Themes → Settings State: reads preference (evidence: `src/contexts/ThemeContext.tsx`)
- Tauri Bridge → Catalog Commands: invokes queries (evidence: `src/lib/tauri-bridge.ts`)
- Tauri Bridge → SQLite Catalog: imports MDB (evidence: `src/lib/tauri-bridge.ts`)
- Catalog Commands → DB Connections: uses connection (evidence: `src-tauri/src/commands/db/querying.rs`)
- SQLite Catalog → DB Connections: uses connection (evidence: `src-tauri/src/database.rs`)
- SQLite Catalog → MDB Import: imports from (evidence: `src-tauri/src/database.rs`)
- Detail Model → Launch Builder: builds request (evidence: `src/components/detail/useUnifiedDetailViewModel.tsx`)
- Detail Model → Tauri Bridge: launches emulator (evidence: `src/components/detail/useUnifiedDetailViewModel.tsx`)
- Tauri Bridge → Emulator Commands: dispatches launch
- Detail Model → Extras Browser: shows extras (evidence: `src/components/detail/useUnifiedDetailViewModel.tsx`)
- Player → Embedded Emulator: plays in app (evidence: `README.md`)
- Player → Music Players: plays music (evidence: `README.md`)
- Catalog Commands → Game Records: returns records
- Platform Profiles → Platform Manifest: uses manifest (evidence: `src/lib/platform-capabilities.ts`)
