# teknoloji-filozoflari/pixel_color_game architecture

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

- Interactive diagram: https://gitdiagram.com/teknoloji-filozoflari/pixel_color_game
- Repository: https://github.com/teknoloji-filozoflari/pixel_color_game

## Overview

Piksel Atölyesi is an offline pixel-by-number painting game. A player chooses an image from the collection, paints matching cells (individually or by connected region), and can resume saved progress or export a completed image. The graph also captures custom-image import, bundled collection maintenance, rendering aids, and localization. Relationships are limited to calls or wiring shown by excerpts, SOURCE INDEX references, or the README; some documented features have unsampled implementation details.

Main entry points: [`src/pixel_coloring/ui/main_window.py`](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/main_window.py) (Main window), [`src/pixel_coloring/rendering/canvas.py`](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/canvas.py) (Painting canvas), [`src/pixel_coloring/services/samples.py`](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/samples.py) (Bundled collection), [`src/pixel_coloring/app.py`](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/app.py) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Game interface"]
  node_main_window["Main window<br/>[main_window.py]"]
  node_collection["Collection browser"]
  node_game_screen["Game screen<br/>[game.py]"]
  node_home_actions["Home actions<br/>[home_actions.py]"]
  node_widgets["Game widgets<br/>[widgets.py]"]
  node_i18n["Localization<br/>[i18n.py]"]
  node_export["PNG export"]
end

subgraph group_game["Painting runtime"]
  node_engine["Painting engine<br/>[paint_engine.py]"]
  node_painting["Painting model<br/>[painting.py]"]
  node_session["Game session<br/>[game_session.py]"]
  node_canvas["Painting canvas<br/>[canvas.py]"]
  node_camera["Canvas camera<br/>[camera.py]"]
  node_pointer["Pointer handling<br/>[pointer.py]"]
  node_tile_cache["Tile cache<br/>[tile_cache.py]"]
  node_progress_preview["Progress preview"]
end

subgraph group_content["Image library"]
  node_samples["Bundled collection<br/>[samples.py]"]
  node_bundle_update["Bundle updates<br/>[bundle_update.py]"]
  node_library["Library maintenance<br/>[library.py]"]
  node_image_importer["Image conversion<br/>[image_importer.py]"]
  node_level_writer["Level files<br/>[level_writer.py]"]
end

subgraph group_state["Local persistence"]
  node_database[("Progress database<br/>[database.py]")]
  node_save_manager["Autosave manager<br/>[save_manager.py]"]
end

subgraph group_app["Application services"]
  node_launcher["App startup<br/>[app.py]"]
end

node_player(("Player"))

node_player -->|"opens"| node_launcher
node_launcher -->|"initializes"| node_database
node_launcher -->|"prepares collection"| node_samples
node_launcher -->|"opens"| node_main_window
node_player -->|"chooses image"| node_collection
node_main_window -->|"shows"| node_collection
node_main_window -->|"opens"| node_game_screen
node_main_window -->|"converts image"| node_image_importer
node_main_window -->|"writes imported level"| node_level_writer
node_main_window -->|"uses for saves"| node_save_manager
node_main_window -->|"uses"| node_library
node_collection -->|"reads level"| node_level_writer
node_collection -->|"uses thumbnails"| node_tile_cache
node_game_screen -->|"displays"| node_canvas
node_game_screen -->|"uses controls"| node_widgets
node_widgets -->|"renders preview"| node_progress_preview
node_widgets -->|"renders image"| node_tile_cache
node_canvas -->|"handles painting"| node_engine
node_canvas -->|"uses navigation"| node_camera
node_canvas -->|"uses input"| node_pointer
node_canvas -->|"renders tiles"| node_tile_cache
node_engine -->|"updates model"| node_painting
node_session -->|"owns engine"| node_engine
node_samples -->|"installs revisions"| node_bundle_update
node_samples -->|"removes retired images"| node_library
node_samples -->|"registers collection"| node_database
node_database -->|"writes level files"| node_level_writer
node_image_importer -->|"creates model"| node_painting
node_save_manager -->|"writes snapshots"| node_database
node_player -->|"saves completed image"| node_export
node_main_window -->|"uses translations"| node_i18n

click node_launcher "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/app.py"
click node_main_window "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/main_window.py"
click node_collection "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/collection_browser.py"
click node_game_screen "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/game.py"
click node_home_actions "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/home_actions.py"
click node_widgets "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/widgets.py"
click node_i18n "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/i18n.py"
click node_engine "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/paint_engine.py"
click node_painting "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/painting.py"
click node_session "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/game_session.py"
click node_canvas "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/canvas.py"
click node_camera "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/camera.py"
click node_pointer "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/pointer.py"
click node_tile_cache "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/tile_cache.py"
click node_progress_preview "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/progress_preview.py"
click node_samples "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/samples.py"
click node_bundle_update "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/bundle_update.py"
click node_library "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/library.py"
click node_image_importer "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/importer/image_importer.py"
click node_level_writer "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/importer/level_writer.py"
click node_database "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/persistence/database.py"
click node_save_manager "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/persistence/save_manager.py"
click node_export "https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/completed_actions.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_main_window,node_collection,node_game_screen,node_home_actions,node_widgets,node_i18n,node_export toneBlue
class node_engine,node_painting,node_session,node_canvas,node_camera,node_pointer,node_tile_cache,node_progress_preview toneAmber
class node_samples,node_bundle_update,node_library,node_image_importer,node_level_writer toneMint
class node_database,node_save_manager toneRose
class node_launcher,node_player toneIndigo
```

## Components

### Game interface

- [Main window](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/main_window.py): `src/pixel_coloring/ui/main_window.py`
- [Collection browser](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/collection_browser.py): `src/pixel_coloring/ui/collection_browser.py`
- [Game screen](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/game.py): `src/pixel_coloring/ui/game.py`
- [Home actions](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/home_actions.py): `src/pixel_coloring/ui/home_actions.py`
- [Game widgets](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/widgets.py): `src/pixel_coloring/ui/widgets.py`
- [Localization](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/i18n.py): `src/pixel_coloring/ui/i18n.py`
- [PNG export](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/ui/completed_actions.py): `src/pixel_coloring/ui/completed_actions.py`

### Painting runtime

- [Painting engine](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/paint_engine.py): `src/pixel_coloring/core/paint_engine.py`
- [Painting model](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/painting.py): `src/pixel_coloring/core/painting.py`
- [Game session](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/core/game_session.py): `src/pixel_coloring/core/game_session.py`
- [Painting canvas](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/canvas.py): `src/pixel_coloring/rendering/canvas.py`
- [Canvas camera](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/camera.py): `src/pixel_coloring/rendering/camera.py`
- [Pointer handling](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/pointer.py): `src/pixel_coloring/rendering/pointer.py`
- [Tile cache](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/tile_cache.py): `src/pixel_coloring/rendering/tile_cache.py`
- [Progress preview](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/rendering/progress_preview.py): `src/pixel_coloring/rendering/progress_preview.py`

### Image library

- [Bundled collection](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/samples.py): `src/pixel_coloring/services/samples.py`
- [Bundle updates](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/bundle_update.py): `src/pixel_coloring/services/bundle_update.py`
- [Library maintenance](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/services/library.py): `src/pixel_coloring/services/library.py`
- [Image conversion](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/importer/image_importer.py): `src/pixel_coloring/importer/image_importer.py`
- [Level files](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/importer/level_writer.py): `src/pixel_coloring/importer/level_writer.py`

### Local persistence

- [Progress database](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/persistence/database.py): `src/pixel_coloring/persistence/database.py`
- [Autosave manager](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/persistence/save_manager.py): `src/pixel_coloring/persistence/save_manager.py`

### Application services

- [App startup](https://github.com/teknoloji-filozoflari/pixel_color_game/blob/main/src/pixel_coloring/app.py): `src/pixel_coloring/app.py`

### Other components

- **Player**

## Connections

- Player → App startup: opens (evidence: `README.md`)
- App startup → Progress database: initializes (evidence: `src/pixel_coloring/app.py`)
- App startup → Bundled collection: prepares collection (evidence: `src/pixel_coloring/app.py`)
- App startup → Main window: opens (evidence: `src/pixel_coloring/app.py`)
- Player → Collection browser: chooses image (evidence: `README.md`)
- Main window → Collection browser: shows (evidence: `src/pixel_coloring/ui/main_window.py`)
- Main window → Game screen: opens (evidence: `src/pixel_coloring/ui/main_window.py`)
- Main window → Image conversion: converts image (evidence: `src/pixel_coloring/ui/main_window.py`)
- Main window → Level files: writes imported level (evidence: `src/pixel_coloring/ui/main_window.py`)
- Main window → Autosave manager: uses for saves (evidence: `src/pixel_coloring/ui/main_window.py`)
- Main window → Library maintenance: uses (evidence: `src/pixel_coloring/ui/main_window.py`)
- Collection browser → Level files: reads level (evidence: `src/pixel_coloring/ui/collection_browser.py`)
- Collection browser → Tile cache: uses thumbnails (evidence: `src/pixel_coloring/ui/collection_browser.py`)
- Game screen → Painting canvas: displays (evidence: `src/pixel_coloring/ui/game.py`)
- Game screen → Game widgets: uses controls (evidence: `src/pixel_coloring/ui/game.py`)
- Game widgets → Progress preview: renders preview (evidence: `src/pixel_coloring/ui/widgets.py`)
- Game widgets → Tile cache: renders image (evidence: `src/pixel_coloring/ui/widgets.py`)
- Painting canvas → Painting engine: handles painting (evidence: `src/pixel_coloring/rendering/canvas.py`)
- Painting canvas → Canvas camera: uses navigation (evidence: `src/pixel_coloring/rendering/canvas.py`)
- Painting canvas → Pointer handling: uses input (evidence: `src/pixel_coloring/rendering/canvas.py`)
- Painting canvas → Tile cache: renders tiles (evidence: `src/pixel_coloring/rendering/canvas.py`)
- Painting engine → Painting model: updates model (evidence: `src/pixel_coloring/core/paint_engine.py`)
- Game session → Painting engine: owns engine (evidence: `src/pixel_coloring/core/game_session.py`)
- Bundled collection → Bundle updates: installs revisions (evidence: `src/pixel_coloring/services/samples.py`)
- Bundled collection → Library maintenance: removes retired images (evidence: `src/pixel_coloring/services/samples.py`)
- Bundled collection → Progress database: registers collection (evidence: `src/pixel_coloring/services/samples.py`)
- Progress database → Level files: writes level files (evidence: `src/pixel_coloring/persistence/database.py`)
- Image conversion → Painting model: creates model (evidence: `src/pixel_coloring/importer/image_importer.py`)
- Autosave manager → Progress database: writes snapshots (evidence: `src/pixel_coloring/persistence/save_manager.py`)
- Player → PNG export: saves completed image (evidence: `README.md`)
- Main window → Localization: uses translations (evidence: `src/pixel_coloring/ui/main_window.py`)
