# yushua0808-cpu/dragon-codex-boot architecture

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

- Interactive diagram: https://gitdiagram.com/yushua0808-cpu/dragon-codex-boot
- Repository: https://github.com/yushua0808-cpu/dragon-codex-boot

## Overview

Dragon Codex Boot is a Windows launcher that plays a configured startup video while opening or locating the Codex desktop client, then visually hands control to the real client window. The main runtime is concentrated in one C# file; the README documents a separate shortcut-replacement and recovery workflow implemented by PowerShell scripts and command files. Connections for the unsampled integration scripts and configuration behavior rely on README statements; source excerpts confirm the launcher’s media, client-window, DWM, and logging responsibilities.

Main entry points: [`src/DragonCodexBoot.cs`](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs) (Launcher entry), [`scripts/integrate-entrypoints.ps1`](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/scripts/integrate-entrypoints.ps1) (Entrypoint integration), [`Restore-Original-Entrypoints.cmd`](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Restore-Original-Entrypoints.cmd) (Restore command), [`Rescan-Entrypoints.cmd`](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Rescan-Entrypoints.cmd) (Rescan command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Launcher runtime"]
  node_entry["Launcher entry<br/>[DragonCodexBoot.cs]"]
  node_playback["Video playback<br/>[DragonCodexBoot.cs]"]
  node_discovery["Client discovery<br/>[DragonCodexBoot.cs]"]
  node_logs["Runtime logs<br/>[DragonCodexBoot.cs]"]
end

subgraph group_handoff["Window handoff"]
  node_geometry["Window geometry<br/>[DragonCodexBoot.cs]"]
  node_dwm["DWM thumbnail<br/>[DragonCodexBoot.cs]"]
  node_handoff_stage["Client handoff<br/>[DragonCodexBoot.cs]"]
end

subgraph group_entrypoints["Shortcut integration"]
  node_integration["Entrypoint integration"]
  node_restore["Restore command"]
  node_rescan["Rescan command"]
  node_shortcut_state["Shortcut backups and report"]
end

subgraph group_assets["Runtime inputs"]
  node_config["Launcher config"]
  node_video["Startup video<br/>[startup.mp4]"]
end

node_user(("Windows user"))
node_client["Codex client"]
node_windows_dwm["Windows DWM"]

node_user -->|"launches"| node_entry
node_entry -->|"loads settings"| node_config
node_entry -->|"checks video"| node_video
node_entry -->|"starts playback"| node_playback
node_entry -->|"finds client"| node_discovery
node_entry -->|"launches via Shell"| node_client
node_playback -->|"triggers at end"| node_handoff_stage
node_discovery -.->|"supplies window bounds"| node_geometry
node_handoff_stage -->|"aligns client"| node_geometry
node_handoff_stage -->|"requests live preview"| node_dwm
node_dwm -->|"updates thumbnail"| node_windows_dwm
node_dwm -->|"shows live window"| node_client
node_handoff_stage -->|"returns control"| node_client
node_entry -->|"writes events"| node_logs
node_entry -->|"starts install scan"| node_integration
node_user -->|"requests recovery"| node_restore
node_user -->|"requests rescan"| node_rescan
node_restore -->|"dispatches restore"| node_integration
node_rescan -->|"dispatches rescan"| node_integration
node_integration -->|"backs up and reports"| node_shortcut_state

click node_entry "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_config "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/config/launcher.example.json"
click node_video "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/media/startup.mp4"
click node_playback "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_discovery "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_geometry "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_dwm "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_handoff_stage "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_logs "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs"
click node_integration "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/scripts/integrate-entrypoints.ps1"
click node_restore "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Restore-Original-Entrypoints.cmd"
click node_rescan "https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Rescan-Entrypoints.cmd"

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_entry,node_playback,node_discovery,node_logs,node_user,node_client toneBlue
class node_geometry,node_dwm,node_handoff_stage toneAmber
class node_integration,node_restore,node_rescan,node_shortcut_state toneMint
class node_config,node_video toneRose
class node_windows_dwm toneIndigo
```

## Components

### Launcher runtime

- [Launcher entry](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`
- [Video playback](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`
- [Client discovery](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`
- [Runtime logs](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`

### Window handoff

- [Window geometry](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`
- [DWM thumbnail](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`
- [Client handoff](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/src/DragonCodexBoot.cs): `src/DragonCodexBoot.cs`

### Shortcut integration

- [Entrypoint integration](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/scripts/integrate-entrypoints.ps1): `scripts/integrate-entrypoints.ps1`
- [Restore command](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Restore-Original-Entrypoints.cmd): `Restore-Original-Entrypoints.cmd`
- [Rescan command](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/Rescan-Entrypoints.cmd): `Rescan-Entrypoints.cmd`
- **Shortcut backups and report**

### Runtime inputs

- [Launcher config](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/config/launcher.example.json): `config/launcher.example.json`
- [Startup video](https://github.com/yushua0808-cpu/dragon-codex-boot/blob/main/media/startup.mp4): `media/startup.mp4`

### Other components

- **Windows user**
- **Codex client**
- **Windows DWM**

## Connections

- Windows user → Launcher entry: launches (evidence: `README.md`)
- Launcher entry → Launcher config: loads settings (evidence: `README.md`)
- Launcher entry → Startup video: checks video (evidence: `src/DragonCodexBoot.cs`)
- Launcher entry → Video playback: starts playback (evidence: `README.md`)
- Launcher entry → Client discovery: finds client (evidence: `src/DragonCodexBoot.cs`)
- Launcher entry → Codex client: launches via Shell (evidence: `src/DragonCodexBoot.cs`)
- Video playback → Client handoff: triggers at end (evidence: `src/DragonCodexBoot.cs`)
- Client discovery → Window geometry: supplies window bounds (evidence: `src/DragonCodexBoot.cs`)
- Client handoff → Window geometry: aligns client (evidence: `README.md`)
- Client handoff → DWM thumbnail: requests live preview (evidence: `README.md`)
- DWM thumbnail → Windows DWM: updates thumbnail (evidence: `src/DragonCodexBoot.cs`)
- DWM thumbnail → Codex client: shows live window (evidence: `README.md`)
- Client handoff → Codex client: returns control (evidence: `README.md`)
- Launcher entry → Runtime logs: writes events (evidence: `src/DragonCodexBoot.cs`)
- Launcher entry → Entrypoint integration: starts install scan (evidence: `src/DragonCodexBoot.cs`)
- Windows user → Restore command: requests recovery (evidence: `README.md`)
- Windows user → Rescan command: requests rescan (evidence: `README.md`)
- Restore command → Entrypoint integration: dispatches restore (evidence: `README.md`)
- Rescan command → Entrypoint integration: dispatches rescan (evidence: `README.md`)
- Entrypoint integration → Shortcut backups and report: backs up and reports (evidence: `README.md`)
