# zntkr/robokopi architecture

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

- Interactive diagram: https://gitdiagram.com/zntkr/robokopi
- Repository: https://github.com/zntkr/robokopi

## Overview

Robokopi is a Windows terminal interface for robocopy, supporting interactive mission setup and direct-argument headless copying. Its main workflow parses language and copy arguments, builds a mission, checks safety, and runs robocopy; interactive runs show live progress, while results include summaries and logs. The graph also includes hardware-based option selection, localization, and the robocopy output parser. Some mission-building, safety, and runner implementations were not excerpted, so their internal call links are left unverified rather than inferred.

Main entry points: [`Program.cs`](https://github.com/zntkr/robokopi/blob/master/Program.cs) (Application entry), [`Services/RobocopyEngine.cs`](https://github.com/zntkr/robokopi/blob/master/Services/RobocopyEngine.cs) (Robocopy engine), [`Services/LiveDashboardRunner.cs`](https://github.com/zntkr/robokopi/blob/master/Services/LiveDashboardRunner.cs) (Copy runner), [`Services/CopySession.cs`](https://github.com/zntkr/robokopi/blob/master/Services/CopySession.cs) (Copy session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and missions"]
  node_program["Application entry<br/>[Program.cs]"]
  node_argparser["CLI argument parser<br/>[ArgParser.cs]"]
  node_interactive["Interactive mission"]
  node_headless["Headless mission"]
  node_wizard["Mission wizard<br/>[MissionWizard.cs]"]
  node_prompt["Console prompt"]
end

subgraph group_safety["Safety and options"]
  node_safetycatch["Safety checks<br/>[SafetyCatch.cs]"]
  node_args["Argument builder<br/>[ArgumentBuilder.cs]"]
  node_hardware["Storage inspector"]
  node_path["Path resolver<br/>[PathResolver.cs]"]
end

subgraph group_copy["Copy runtime"]
  node_session["Copy session<br/>[CopySession.cs]"]
  node_runner["Copy runner"]
  node_headlessrunner["Headless runner<br/>[HeadlessRunner.cs]"]
  node_engine["Robocopy engine<br/>[RobocopyEngine.cs]"]
  node_process["Robocopy process"]
  node_parser["Output parser"]
  node_events["Copy events and summary<br/>[RobocopyEvent.cs]"]
end

subgraph group_experience["Terminal experience"]
  node_dashboard["Live dashboard<br/>[LiveDashboard.cs]"]
  node_logs["File log writer<br/>[FileLogWriter.cs]"]
  node_localization["Localization"]
  node_translation["Translation provider"]
  node_browser["Prompt browser"]
end

node_user(("User"))
node_robocopy["robocopy.exe"]

node_user -->|"starts"| node_program
node_program -->|"parses args"| node_argparser
node_program -->|"sets language"| node_localization
node_program -->|"selects wizard"| node_interactive
node_program -->|"selects headless"| node_headless
node_interactive -.->|"delegates to"| node_wizard
node_wizard -->|"prompts user"| node_prompt
node_program -->|"evaluates safety"| node_safetycatch
node_program -->|"executes session"| node_session
node_session -.->|"checks operation"| node_safetycatch
node_session -.->|"runs copy"| node_runner
node_program -->|"selects interactive"| node_runner
node_program -->|"selects headless"| node_headlessrunner
node_runner -->|"streams copy"| node_engine
node_headlessrunner -.->|"runs copy"| node_engine
node_engine -->|"launches process"| node_process
node_engine -->|"parses output"| node_parser
node_engine -->|"emits events"| node_events
node_robocopy -.->|"produces output"| node_engine
node_runner -->|"updates display"| node_dashboard
node_runner -->|"writes logs"| node_logs
node_dashboard -->|"gets strings"| node_localization
node_localization -->|"loads translations"| node_translation
node_prompt -->|"uses browser"| node_browser
node_program -->|"configures inspector"| node_hardware
node_program -->|"configures builder"| node_args
node_program -->|"resolves paths"| node_path

click node_program "https://github.com/zntkr/robokopi/blob/master/Program.cs"
click node_argparser "https://github.com/zntkr/robokopi/blob/master/Services/ArgParser.cs"
click node_interactive "https://github.com/zntkr/robokopi/blob/master/Services/InteractiveMissionBuilder.cs"
click node_headless "https://github.com/zntkr/robokopi/blob/master/Services/HeadlessMissionBuilder.cs"
click node_wizard "https://github.com/zntkr/robokopi/blob/master/Services/MissionWizard.cs"
click node_prompt "https://github.com/zntkr/robokopi/blob/master/Services/ConsoleUserPrompt.cs"
click node_safetycatch "https://github.com/zntkr/robokopi/blob/master/Services/SafetyCatch.cs"
click node_args "https://github.com/zntkr/robokopi/blob/master/Services/ArgumentBuilder.cs"
click node_hardware "https://github.com/zntkr/robokopi/blob/master/Services/WindowsHardwareInspector.cs"
click node_path "https://github.com/zntkr/robokopi/blob/master/Services/PathResolver.cs"
click node_session "https://github.com/zntkr/robokopi/blob/master/Services/CopySession.cs"
click node_runner "https://github.com/zntkr/robokopi/blob/master/Services/LiveDashboardRunner.cs"
click node_headlessrunner "https://github.com/zntkr/robokopi/blob/master/Services/HeadlessRunner.cs"
click node_engine "https://github.com/zntkr/robokopi/blob/master/Services/RobocopyEngine.cs"
click node_process "https://github.com/zntkr/robokopi/blob/master/Services/WindowsProcessLauncher.cs"
click node_parser "https://github.com/zntkr/robokopi/blob/master/Services/RegexRobocopyOutputParser.cs"
click node_events "https://github.com/zntkr/robokopi/blob/master/Services/RobocopyEvent.cs"
click node_dashboard "https://github.com/zntkr/robokopi/blob/master/Services/LiveDashboard.cs"
click node_logs "https://github.com/zntkr/robokopi/blob/master/Services/FileLogWriter.cs"
click node_localization "https://github.com/zntkr/robokopi/blob/master/Services/LocalizationService.cs"
click node_translation "https://github.com/zntkr/robokopi/blob/master/Services/EmbeddedJsonTranslationProvider.cs"
click node_browser "https://github.com/zntkr/robokopi/blob/master/Services/InvisibleBrowser.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_program,node_argparser,node_interactive,node_headless,node_wizard,node_prompt,node_user toneBlue
class node_safetycatch,node_args,node_hardware,node_path toneAmber
class node_session,node_runner,node_headlessrunner,node_engine,node_process,node_parser,node_events toneMint
class node_dashboard,node_logs,node_localization,node_translation,node_browser toneRose
class node_robocopy toneIndigo
```

## Components

### Entry and missions

- [Application entry](https://github.com/zntkr/robokopi/blob/master/Program.cs): `Program.cs`
- [CLI argument parser](https://github.com/zntkr/robokopi/blob/master/Services/ArgParser.cs): `Services/ArgParser.cs`
- [Interactive mission](https://github.com/zntkr/robokopi/blob/master/Services/InteractiveMissionBuilder.cs): `Services/InteractiveMissionBuilder.cs`
- [Headless mission](https://github.com/zntkr/robokopi/blob/master/Services/HeadlessMissionBuilder.cs): `Services/HeadlessMissionBuilder.cs`
- [Mission wizard](https://github.com/zntkr/robokopi/blob/master/Services/MissionWizard.cs): `Services/MissionWizard.cs`
- [Console prompt](https://github.com/zntkr/robokopi/blob/master/Services/ConsoleUserPrompt.cs): `Services/ConsoleUserPrompt.cs`

### Safety and options

- [Safety checks](https://github.com/zntkr/robokopi/blob/master/Services/SafetyCatch.cs): `Services/SafetyCatch.cs`
- [Argument builder](https://github.com/zntkr/robokopi/blob/master/Services/ArgumentBuilder.cs): `Services/ArgumentBuilder.cs`
- [Storage inspector](https://github.com/zntkr/robokopi/blob/master/Services/WindowsHardwareInspector.cs): `Services/WindowsHardwareInspector.cs`
- [Path resolver](https://github.com/zntkr/robokopi/blob/master/Services/PathResolver.cs): `Services/PathResolver.cs`

### Copy runtime

- [Copy session](https://github.com/zntkr/robokopi/blob/master/Services/CopySession.cs): `Services/CopySession.cs`
- [Copy runner](https://github.com/zntkr/robokopi/blob/master/Services/LiveDashboardRunner.cs): `Services/LiveDashboardRunner.cs`
- [Headless runner](https://github.com/zntkr/robokopi/blob/master/Services/HeadlessRunner.cs): `Services/HeadlessRunner.cs`
- [Robocopy engine](https://github.com/zntkr/robokopi/blob/master/Services/RobocopyEngine.cs): `Services/RobocopyEngine.cs`
- [Robocopy process](https://github.com/zntkr/robokopi/blob/master/Services/WindowsProcessLauncher.cs): `Services/WindowsProcessLauncher.cs`
- [Output parser](https://github.com/zntkr/robokopi/blob/master/Services/RegexRobocopyOutputParser.cs): `Services/RegexRobocopyOutputParser.cs`
- [Copy events and summary](https://github.com/zntkr/robokopi/blob/master/Services/RobocopyEvent.cs): `Services/RobocopyEvent.cs`

### Terminal experience

- [Live dashboard](https://github.com/zntkr/robokopi/blob/master/Services/LiveDashboard.cs): `Services/LiveDashboard.cs`
- [File log writer](https://github.com/zntkr/robokopi/blob/master/Services/FileLogWriter.cs): `Services/FileLogWriter.cs`
- [Localization](https://github.com/zntkr/robokopi/blob/master/Services/LocalizationService.cs): `Services/LocalizationService.cs`
- [Translation provider](https://github.com/zntkr/robokopi/blob/master/Services/EmbeddedJsonTranslationProvider.cs): `Services/EmbeddedJsonTranslationProvider.cs`
- [Prompt browser](https://github.com/zntkr/robokopi/blob/master/Services/InvisibleBrowser.cs): `Services/InvisibleBrowser.cs`

### Other components

- **User**
- **robocopy.exe**

## Connections

- User → Application entry: starts (evidence: `README.md`)
- Application entry → CLI argument parser: parses args (evidence: `Program.cs`)
- Application entry → Localization: sets language (evidence: `Program.cs`)
- Application entry → Interactive mission: selects wizard (evidence: `Program.cs`)
- Application entry → Headless mission: selects headless (evidence: `Program.cs`)
- Interactive mission → Mission wizard: delegates to
- Mission wizard → Console prompt: prompts user (evidence: `Services/MissionWizard.cs`)
- Application entry → Safety checks: evaluates safety (evidence: `Program.cs`)
- Application entry → Copy session: executes session (evidence: `Program.cs`)
- Copy session → Safety checks: checks operation
- Copy session → Copy runner: runs copy
- Application entry → Copy runner: selects interactive (evidence: `Program.cs`)
- Application entry → Headless runner: selects headless (evidence: `Program.cs`)
- Copy runner → Robocopy engine: streams copy (evidence: `Services/LiveDashboardRunner.cs`)
- Headless runner → Robocopy engine: runs copy
- Robocopy engine → Robocopy process: launches process (evidence: `Services/RobocopyEngine.cs`)
- Robocopy engine → Output parser: parses output (evidence: `Services/RobocopyEngine.cs`)
- Robocopy engine → Copy events and summary: emits events (evidence: `Services/RobocopyEngine.cs`)
- robocopy.exe → Robocopy engine: produces output
- Copy runner → Live dashboard: updates display (evidence: `Services/LiveDashboardRunner.cs`)
- Copy runner → File log writer: writes logs (evidence: `Services/LiveDashboardRunner.cs`)
- Live dashboard → Localization: gets strings (evidence: `Services/LiveDashboard.cs`)
- Localization → Translation provider: loads translations (evidence: `Services/LocalizationService.cs`)
- Console prompt → Prompt browser: uses browser (evidence: `Services/ConsoleUserPrompt.cs`)
- Application entry → Storage inspector: configures inspector (evidence: `Program.cs`)
- Application entry → Argument builder: configures builder (evidence: `Program.cs`)
- Application entry → Path resolver: resolves paths (evidence: `Program.cs`)
