# ivseznayfews/dsh-one-click-setup architecture

> Architecture diagram of the GitHub repository ivseznayfews/dsh-one-click-setup, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ivseznayfews/dsh-one-click-setup
- Repository: https://github.com/ivseznayfews/dsh-one-click-setup

## Overview

This is a Windows setup utility for DeepSeek Harness (DSH): users configure an API key and options, the app detects or installs prerequisites, writes DSH configuration, creates launch entries, and can test the API connection. The generated launcher then starts DSH and opens its web UI. The README documents these capabilities; the sampled C# excerpts are partial, so internal call wiring is shown only where documented, not as inferred helper-level calls.

Main entry points: [`src/Setup.cs`](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs) (Setup app), [`assets/launch-dsh.ps1`](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch-dsh.ps1) (Launcher script), [`assets/launch.cmd`](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch.cmd) (Launcher command), [`src/Installer.cs`](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Installer.cs) (Installer / uninstaller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup workflow"]
  node_setup_app["Setup app<br/>[Setup.cs]"]
  node_environment["Environment detection<br/>[Setup.cs]"]
  node_node_install["Node installer<br/>[Setup.cs]"]
  node_dsh_install["DSH installer<br/>[Setup.cs]"]
  node_config_writer["Config writer<br/>[Setup.cs]"]
  node_launcher_gen["Launcher generator<br/>[Setup.cs]"]
  node_desktop_entries["Desktop entries<br/>[Setup.cs]"]
  node_connection_test["Connection test<br/>[Setup.cs]"]
end

subgraph group_launcher["Launcher runtime"]
  node_launcher_cmd["Launcher command<br/>[launch.cmd]"]
  node_launcher_ps["Launcher script<br/>[launch-dsh.ps1]"]
end

subgraph group_install["App installation"]
  node_installer["Installer / uninstaller<br/>[Installer.cs]"]
  node_installed_app["Installed setup app<br/>[Setup.cs]"]
end

node_user(("User"))
node_dsh_credentials[("DSH credentials")]
node_dsh_settings[("DSH settings")]
node_node_runtime["Node.js / npm"]
node_dsh_runtime["DSH runtime"]
node_deepseek_api["DeepSeek API"]
node_browser["Web browser"]

node_user -->|"configures"| node_setup_app
node_setup_app -->|"detects"| node_environment
node_setup_app -->|"installs if needed"| node_node_install
node_node_install -->|"installs"| node_node_runtime
node_setup_app -->|"installs if needed"| node_dsh_install
node_dsh_install -->|"uses npm"| node_node_runtime
node_dsh_install -->|"installs"| node_dsh_runtime
node_setup_app -->|"writes settings"| node_config_writer
node_config_writer -->|"backs up and writes"| node_dsh_credentials
node_config_writer -->|"backs up and writes"| node_dsh_settings
node_setup_app -->|"generates"| node_launcher_gen
node_launcher_gen -->|"creates"| node_launcher_cmd
node_launcher_gen -->|"creates"| node_launcher_ps
node_setup_app -->|"creates entries"| node_desktop_entries
node_setup_app -->|"tests key"| node_connection_test
node_connection_test -->|"checks key and balance"| node_deepseek_api
node_user -->|"starts"| node_launcher_cmd
node_launcher_cmd -->|"invokes"| node_launcher_ps
node_launcher_ps -->|"locates or installs"| node_node_runtime
node_launcher_ps -->|"locates or installs"| node_dsh_runtime
node_launcher_ps -->|"opens when ready"| node_browser
node_launcher_ps -->|"starts web service"| node_dsh_runtime
node_user -->|"installs or uninstalls"| node_installer
node_installer -->|"extracts and launches"| node_installed_app

click node_setup_app "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_environment "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_node_install "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_dsh_install "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_config_writer "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_launcher_gen "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_desktop_entries "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_connection_test "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"
click node_launcher_cmd "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch.cmd"
click node_launcher_ps "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch-dsh.ps1"
click node_installer "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Installer.cs"
click node_installed_app "https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs"

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_setup_app,node_environment,node_node_install,node_dsh_install,node_config_writer,node_launcher_gen,node_desktop_entries,node_connection_test,node_user,node_browser toneBlue
class node_launcher_cmd,node_launcher_ps,node_dsh_credentials,node_dsh_settings toneAmber
class node_installer,node_installed_app,node_deepseek_api toneMint
class node_node_runtime,node_dsh_runtime toneIndigo
```

## Components

### Setup workflow

- [Setup app](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Environment detection](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Node installer](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [DSH installer](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Config writer](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Launcher generator](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Desktop entries](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`
- [Connection test](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`

### Launcher runtime

- [Launcher command](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch.cmd): `assets/launch.cmd`
- [Launcher script](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/assets/launch-dsh.ps1): `assets/launch-dsh.ps1`

### App installation

- [Installer / uninstaller](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Installer.cs): `src/Installer.cs`
- [Installed setup app](https://github.com/ivseznayfews/dsh-one-click-setup/blob/main/src/Setup.cs): `src/Setup.cs`

### Other components

- **User**
- **DSH credentials**
- **DSH settings**
- **Node.js / npm**
- **DSH runtime**
- **DeepSeek API**
- **Web browser**

## Connections

- User → Setup app: configures
- Setup app → Environment detection: detects
- Setup app → Node installer: installs if needed
- Node installer → Node.js / npm: installs
- Setup app → DSH installer: installs if needed
- DSH installer → Node.js / npm: uses npm
- DSH installer → DSH runtime: installs
- Setup app → Config writer: writes settings
- Config writer → DSH credentials: backs up and writes
- Config writer → DSH settings: backs up and writes
- Setup app → Launcher generator: generates
- Launcher generator → Launcher command: creates
- Launcher generator → Launcher script: creates
- Setup app → Desktop entries: creates entries
- Setup app → Connection test: tests key
- Connection test → DeepSeek API: checks key and balance
- User → Launcher command: starts
- Launcher command → Launcher script: invokes
- Launcher script → Node.js / npm: locates or installs
- Launcher script → DSH runtime: locates or installs
- Launcher script → Web browser: opens when ready
- Launcher script → DSH runtime: starts web service
- User → Installer / uninstaller: installs or uninstalls
- Installer / uninstaller → Installed setup app: extracts and launches
