# xuckless/pixl-playroom architecture

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

- Interactive diagram: https://gitdiagram.com/xuckless/pixl-playroom
- Repository: https://github.com/xuckless/pixl-playroom

## Overview

Pixl Playroom is a desktop photo developer: users open existing folders, browse and organize photos, edit a persistent recipe, and export developed images. The renderer communicates with Electron’s main process through a preload IPC bridge; main-process services coordinate the photo index, PIXL engine, and export work. The README documents substantial library, develop, AI, and account capabilities; some are represented at subsystem level because their implementations were not sampled. Edges are limited to excerpted references and README statements; unsampled wiring is not asserted.

Main entry points: [`src/renderer/src/App.tsx`](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/App.tsx) (App shell), [`src/preload/index.ts`](https://github.com/xuckless/pixl-playroom/blob/main/src/preload/index.ts) (IPC bridge), [`src/renderer/src/views/Library.tsx`](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/Library.tsx) (Library interface), [`src/renderer/src/views/EditingSpace.tsx`](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/EditingSpace.tsx) (Develop interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app_ui["App shell<br/>[App.tsx]"]
  node_library_ui["Library interface<br/>[Library.tsx]"]
  node_develop_ui["Develop interface<br/>[EditingSpace.tsx]"]
end

subgraph group_library["Photo library"]
  node_library_state["Library state<br/>[library.ts]"]
  node_indexer["Photo index<br/>[service.ts]"]
  node_index_host["Index process client<br/>[client.ts]"]
  node_project_store[("Photo projects<br/>[pixlfile.ts]")]
end

subgraph group_develop["Develop and render"]
  node_recipe["Develop recipe<br/>[recipe.ts]"]
  node_develop_state["Develop state<br/>[develop.ts]"]
  node_engine_types["Engine model<br/>[engine-types.ts]"]
  node_engine_client["Engine client<br/>[client.ts]"]
  node_engine_host["Native engine host<br/>[host.ts]"]
  node_exporter["Image export<br/>[exporter.ts]"]
end

subgraph group_services["Application services"]
  node_ai_models["AI models<br/>[models.ts]"]
  node_selection["AI selection<br/>[service.ts]"]
  node_preload["IPC bridge<br/>[index.ts]"]
  node_api["Renderer API<br/>[api.ts]"]
  node_main_app["Main process<br/>[app.ts]"]
  node_ipc_contract["IPC contract<br/>[ipc.ts]"]
end

subgraph group_account["Account and access"]
  node_account["Account access<br/>[oauth.ts]"]
end

node_photographer(("Photographer"))

node_photographer -->|"uses"| node_app_ui
node_app_ui -->|"shows"| node_library_ui
node_app_ui -->|"shows"| node_develop_ui
node_photographer -->|"opens folders"| node_library_ui
node_library_ui -.->|"updates"| node_library_state
node_library_state -->|"requests data"| node_api
node_api -->|"calls bridge"| node_preload
node_preload -->|"uses channels"| node_ipc_contract
node_preload -->|"invokes handlers"| node_main_app
node_main_app -->|"uses channels"| node_ipc_contract
node_index_host -->|"dispatches requests"| node_indexer
node_indexer -->|"manages projects"| node_project_store
node_photographer -->|"edits photos"| node_develop_ui
node_develop_ui -.->|"edits state"| node_develop_state
node_develop_state -->|"requests renders"| node_api
node_recipe -->|"compiles to"| node_engine_types
node_engine_client -->|"hosts engine"| node_engine_host
node_photographer -->|"exports photos"| node_exporter
node_ai_models -->|"requests inference"| node_engine_client
node_selection -->|"uses engine"| node_engine_client
node_photographer -->|"signs in"| node_account

click node_app_ui "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/App.tsx"
click node_library_ui "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/Library.tsx"
click node_develop_ui "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/EditingSpace.tsx"
click node_library_state "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/state/library.ts"
click node_indexer "https://github.com/xuckless/pixl-playroom/blob/main/src/main/indexer/service.ts"
click node_index_host "https://github.com/xuckless/pixl-playroom/blob/main/src/main/indexer/client.ts"
click node_project_store "https://github.com/xuckless/pixl-playroom/blob/main/src/main/project/pixlfile.ts"
click node_recipe "https://github.com/xuckless/pixl-playroom/blob/main/src/shared/recipe.ts"
click node_develop_state "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/state/develop.ts"
click node_engine_types "https://github.com/xuckless/pixl-playroom/blob/main/src/shared/engine-types.ts"
click node_engine_client "https://github.com/xuckless/pixl-playroom/blob/main/src/main/engine/client.ts"
click node_engine_host "https://github.com/xuckless/pixl-playroom/blob/main/src/main/engine/host.ts"
click node_exporter "https://github.com/xuckless/pixl-playroom/blob/main/src/main/exporter.ts"
click node_ai_models "https://github.com/xuckless/pixl-playroom/blob/main/src/main/ai/models.ts"
click node_selection "https://github.com/xuckless/pixl-playroom/blob/main/src/main/select/service.ts"
click node_account "https://github.com/xuckless/pixl-playroom/blob/main/src/main/account/oauth.ts"
click node_preload "https://github.com/xuckless/pixl-playroom/blob/main/src/preload/index.ts"
click node_api "https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/lib/api.ts"
click node_main_app "https://github.com/xuckless/pixl-playroom/blob/main/src/main/app.ts"
click node_ipc_contract "https://github.com/xuckless/pixl-playroom/blob/main/src/shared/ipc.ts"

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_ui,node_library_ui,node_develop_ui toneBlue
class node_library_state,node_indexer,node_index_host,node_project_store toneAmber
class node_recipe,node_develop_state,node_engine_types,node_engine_client,node_engine_host,node_exporter toneMint
class node_ai_models,node_selection,node_preload,node_api,node_main_app,node_ipc_contract toneRose
class node_account,node_photographer toneIndigo
```

## Components

### Desktop interface

- [App shell](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Library interface](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/Library.tsx): `src/renderer/src/views/Library.tsx`
- [Develop interface](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/views/EditingSpace.tsx): `src/renderer/src/views/EditingSpace.tsx`

### Photo library

- [Library state](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/state/library.ts): `src/renderer/src/state/library.ts`
- [Photo index](https://github.com/xuckless/pixl-playroom/blob/main/src/main/indexer/service.ts): `src/main/indexer/service.ts`
- [Index process client](https://github.com/xuckless/pixl-playroom/blob/main/src/main/indexer/client.ts): `src/main/indexer/client.ts`
- [Photo projects](https://github.com/xuckless/pixl-playroom/blob/main/src/main/project/pixlfile.ts): `src/main/project/pixlfile.ts`

### Develop and render

- [Develop recipe](https://github.com/xuckless/pixl-playroom/blob/main/src/shared/recipe.ts): `src/shared/recipe.ts`
- [Develop state](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/state/develop.ts): `src/renderer/src/state/develop.ts`
- [Engine model](https://github.com/xuckless/pixl-playroom/blob/main/src/shared/engine-types.ts): `src/shared/engine-types.ts`
- [Engine client](https://github.com/xuckless/pixl-playroom/blob/main/src/main/engine/client.ts): `src/main/engine/client.ts`
- [Native engine host](https://github.com/xuckless/pixl-playroom/blob/main/src/main/engine/host.ts): `src/main/engine/host.ts`
- [Image export](https://github.com/xuckless/pixl-playroom/blob/main/src/main/exporter.ts): `src/main/exporter.ts`

### Application services

- [AI models](https://github.com/xuckless/pixl-playroom/blob/main/src/main/ai/models.ts): `src/main/ai/models.ts`
- [AI selection](https://github.com/xuckless/pixl-playroom/blob/main/src/main/select/service.ts): `src/main/select/service.ts`
- [IPC bridge](https://github.com/xuckless/pixl-playroom/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Renderer API](https://github.com/xuckless/pixl-playroom/blob/main/src/renderer/src/lib/api.ts): `src/renderer/src/lib/api.ts`
- [Main process](https://github.com/xuckless/pixl-playroom/blob/main/src/main/app.ts): `src/main/app.ts`
- [IPC contract](https://github.com/xuckless/pixl-playroom/blob/main/src/shared/ipc.ts): `src/shared/ipc.ts`

### Account and access

- [Account access](https://github.com/xuckless/pixl-playroom/blob/main/src/main/account/oauth.ts): `src/main/account/oauth.ts`

### Other components

- **Photographer**

## Connections

- Photographer → App shell: uses
- App shell → Library interface: shows (evidence: `src/renderer/src/App.tsx`)
- App shell → Develop interface: shows (evidence: `src/renderer/src/App.tsx`)
- Photographer → Library interface: opens folders
- Library interface → Library state: updates
- Library state → Renderer API: requests data (evidence: `src/renderer/src/state/library.ts`)
- Renderer API → IPC bridge: calls bridge (evidence: `src/renderer/src/lib/api.ts`)
- IPC bridge → IPC contract: uses channels (evidence: `src/preload/index.ts`)
- IPC bridge → Main process: invokes handlers (evidence: `src/preload/index.ts`)
- Main process → IPC contract: uses channels (evidence: `src/main/app.ts`)
- Index process client → Photo index: dispatches requests (evidence: `src/main/indexer/client.ts`)
- Photo index → Photo projects: manages projects (evidence: `src/main/indexer/service.ts`)
- Photographer → Develop interface: edits photos
- Develop interface → Develop state: edits state
- Develop state → Renderer API: requests renders (evidence: `src/renderer/src/state/develop.ts`)
- Develop recipe → Engine model: compiles to (evidence: `src/shared/recipe.ts`)
- Engine client → Native engine host: hosts engine (evidence: `src/main/engine/client.ts`)
- Photographer → Image export: exports photos
- AI models → Engine client: requests inference (evidence: `src/main/ai/models.ts`)
- AI selection → Engine client: uses engine (evidence: `src/main/select/service.ts`)
- Photographer → Account access: signs in
