# dreamsartificial648-sketch/adam-code-architecture architecture

> Architecture diagram of the GitHub repository dreamsartificial648-sketch/adam-code-architecture, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dreamsartificial648-sketch/adam-code-architecture
- Repository: https://github.com/dreamsartificial648-sketch/adam-code-architecture
- Video tour (about a minute): https://gitdiagram.com/dreamsartificial648-sketch/adam-code-architecture/video

## Overview

ADAM is a desktop application for planning and running AI model training and image generation, with dataset workspaces, video/gameplay features, and remote control. Its main workflow starts in the desktop UI, turns a request into a plan, gates execution through job management, then dispatches registered tools and tracks results. The graph also shows dataset and generation workspaces plus the remote API. README content was empty, and several subsystems are represented by their tree paths because their implementation was not sampled; uncertain internal wiring is omitted.

Main entry points: [`registry.py`](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/registry.py) (Training tools), [`main_window.py`](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/main_window.py) (Desktop UI), [`job_manager.py`](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/job_manager.py) (Job manager), [`app.py`](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/app.py) (Application setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_application["Application setup<br/>[app.py]"]
  node_desktop["Desktop UI<br/>[main_window.py]"]
end

subgraph group_orchestration["Planning and jobs"]
  node_planner["Request planner<br/>[planner.py]"]
  node_registry["Tool registry<br/>[registry.py]"]
  node_jobs["Job manager<br/>[job_manager.py]"]
  node_executor["Tool executor<br/>[executor.py]"]
  node_jobstore[("Job records<br/>[job_manager.py]")]
end

subgraph group_models["Model workflows"]
  node_generation["Image generation<br/>[generations.py]"]
  node_training["Training tools<br/>[registry.py]"]
  node_lora["LoRA workflow<br/>[lora.py]"]
  node_diffusion["Diffusion workflows<br/>[ddpm.py]"]
  node_flow["Flow workflows<br/>[flow_matching.py]"]
  node_video["Video LoRA<br/>[video_lora.py]"]
  node_oasis["Oasis gameplay<br/>[oasis_player.py]"]
end

subgraph group_media["Datasets and media"]
  node_assets[("Asset registry<br/>[assets.py]")]
  node_dataset["Dataset studio<br/>[studio.py]"]
  node_video_data["Video datasets<br/>[video_lora.py]"]
  node_reviewer["Frame reviewer<br/>[cnn_reviewer.py]"]
end

subgraph group_access["Remote access"]
  node_remote["Remote API<br/>[remote_access.py]"]
  node_dispatcher["Remote dispatcher"]
end

node_user(("User"))
node_browser(("Browser or device"))
node_external_models{{"Model backends"}}

node_user -->|"uses"| node_desktop
node_application -->|"creates"| node_desktop
node_application -->|"wires"| node_planner
node_application -->|"creates"| node_registry
node_application -->|"creates"| node_jobs
node_application -->|"creates"| node_executor
node_desktop -->|"plans requests"| node_planner
node_desktop -->|"manages jobs"| node_jobs
node_planner -->|"checks tools"| node_registry
node_jobs -->|"runs steps"| node_executor
node_jobs -->|"persists jobs"| node_jobstore
node_executor -->|"resolves tools"| node_registry
node_executor -->|"dispatches tools"| node_training
node_desktop -->|"opens workspace"| node_generation
node_generation -->|"selects providers"| node_registry
node_generation -->|"reads models"| node_assets
node_generation -->|"submits plans"| node_jobs
node_training -.->|"provides workflow"| node_lora
node_training -.->|"provides workflow"| node_diffusion
node_training -.->|"provides workflow"| node_flow
node_training -.->|"provides workflow"| node_video
node_training -.->|"provides workflow"| node_oasis
node_dataset -->|"uses assets"| node_assets
node_desktop -->|"opens workspace"| node_dataset
node_video -->|"manages clips"| node_video_data
node_reviewer -.->|"reviews frames"| node_video_data
node_browser -->|"sends requests"| node_remote
node_remote -->|"dispatches commands"| node_dispatcher
node_remote -->|"controls jobs"| node_jobs
node_remote -->|"requests plans"| node_planner
node_training -.->|"uses backends"| node_external_models

click node_application "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/app.py"
click node_desktop "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/main_window.py"
click node_planner "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/planner.py"
click node_registry "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/registry.py"
click node_jobs "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/job_manager.py"
click node_executor "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/executor.py"
click node_jobstore "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/job_manager.py"
click node_assets "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/assets.py"
click node_generation "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/generations.py"
click node_training "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/registry.py"
click node_lora "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/lora.py"
click node_diffusion "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/ddpm.py"
click node_flow "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/flow_matching.py"
click node_video "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/video_lora.py"
click node_oasis "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/oasis_player.py"
click node_dataset "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/studio.py"
click node_video_data "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/video_lora.py"
click node_reviewer "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/cnn_reviewer.py"
click node_remote "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/remote_access.py"
click node_dispatcher "https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/remote_dispatcher.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_application,node_desktop,node_user,node_browser toneBlue
class node_planner,node_registry,node_jobs,node_executor,node_jobstore toneAmber
class node_generation,node_training,node_lora,node_diffusion,node_flow,node_video,node_oasis toneMint
class node_assets,node_dataset,node_video_data,node_reviewer toneRose
class node_remote,node_dispatcher,node_external_models toneIndigo
```

## Components

### Desktop application

- [Application setup](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/app.py): `app.py`
- [Desktop UI](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/main_window.py): `main_window.py`

### Planning and jobs

- [Request planner](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/planner.py): `planner.py`
- [Tool registry](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/registry.py): `registry.py`
- [Job manager](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/job_manager.py): `job_manager.py`
- [Tool executor](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/executor.py): `executor.py`
- [Job records](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/job_manager.py): `job_manager.py`

### Model workflows

- [Image generation](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/generations.py): `generations.py`
- [Training tools](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/registry.py): `registry.py`
- [LoRA workflow](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/lora.py): `lora.py`
- [Diffusion workflows](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/ddpm.py): `ddpm.py`
- [Flow workflows](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/flow_matching.py): `flow_matching.py`
- [Video LoRA](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/video_lora.py): `video_lora.py`
- [Oasis gameplay](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/oasis_player.py): `oasis_player.py`

### Datasets and media

- [Asset registry](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/assets.py): `assets.py`
- [Dataset studio](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/studio.py): `studio.py`
- [Video datasets](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/video_lora.py): `video_lora.py`
- [Frame reviewer](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/cnn_reviewer.py): `cnn_reviewer.py`

### Remote access

- [Remote API](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/remote_access.py): `remote_access.py`
- [Remote dispatcher](https://github.com/dreamsartificial648-sketch/adam-code-architecture/blob/main/remote_dispatcher.py): `remote_dispatcher.py`

### Other components

- **User**
- **Browser or device**
- **Model backends**

## Connections

- User → Desktop UI: uses
- Application setup → Desktop UI: creates
- Application setup → Request planner: wires
- Application setup → Tool registry: creates
- Application setup → Job manager: creates
- Application setup → Tool executor: creates
- Desktop UI → Request planner: plans requests
- Desktop UI → Job manager: manages jobs
- Request planner → Tool registry: checks tools
- Job manager → Tool executor: runs steps
- Job manager → Job records: persists jobs
- Tool executor → Tool registry: resolves tools
- Tool executor → Training tools: dispatches tools
- Desktop UI → Image generation: opens workspace
- Image generation → Tool registry: selects providers
- Image generation → Asset registry: reads models
- Image generation → Job manager: submits plans
- Training tools → LoRA workflow: provides workflow
- Training tools → Diffusion workflows: provides workflow
- Training tools → Flow workflows: provides workflow
- Training tools → Video LoRA: provides workflow
- Training tools → Oasis gameplay: provides workflow
- Dataset studio → Asset registry: uses assets
- Desktop UI → Dataset studio: opens workspace
- Video LoRA → Video datasets: manages clips
- Frame reviewer → Video datasets: reviews frames
- Browser or device → Remote API: sends requests
- Remote API → Remote dispatcher: dispatches commands
- Remote API → Job manager: controls jobs
- Remote API → Request planner: requests plans
- Training tools → Model backends: uses backends
