# nullmoth/1401 architecture

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

- Interactive diagram: https://gitdiagram.com/nullmoth/1401
- Repository: https://github.com/nullmoth/1401

## Overview

1401 is a Windows application that inspects a PC, builds a tailored OpenCore setup, and writes a macOS installer USB stick. The user workflow proceeds through hardware checking, configuration/building, BIOS guidance, and stick creation; after booting, macOS installation continues through Apple’s installer. Separate capabilities include startup-log reporting, storage-mode preparation, and a macOS companion for NVIDIA driver installation. The graph reflects README-described stages and indexed source references; several Python and macOS internals were not sampled, so their connections are omitted or marked unverified.

Main entry points: [`upstream/OpCore-Simplify/OpCore-Simplify.py`](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/OpCore-Simplify.py) (OpenCore engine), [`mac/Sources/main.swift`](https://github.com/nullmoth/1401/blob/main/mac/Sources/main.swift) (Mac companion app), [`windows/App/MainForm.cs`](https://github.com/nullmoth/1401/blob/main/windows/App/MainForm.cs) (Workflow UI), [`windows/App/Engine.cs`](https://github.com/nullmoth/1401/blob/main/windows/App/Engine.cs) (Python launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_windows["Windows application"]
  node_winui["Workflow UI<br/>[MainForm.cs]"]
  node_winengine["Python launcher<br/>[Engine.cs]"]
  node_windowsdisks["Disk handling<br/>[Disks.cs]"]
end

subgraph group_build["Hardware and build"]
  node_hardware["Hardware scan<br/>[scan.py]"]
  node_buildengine["Build orchestration<br/>[engine.py]"]
  node_ocs["OpenCore engine<br/>[OpCore-Simplify.py]"]
  node_config["Config generation<br/>[config_prodigy.py]"]
  node_kexts["Kext selection<br/>[kext_maestro.py]"]
  node_gather["Resource gathering<br/>[gathering_files.py]"]
  node_resourcefetch["Resource fetcher"]
  node_datasources["Build datasets"]
  node_bios["BIOS guidance<br/>[guide.py]"]
  node_storageprep["Storage preparation<br/>[storage_prep.py]"]
end

subgraph group_installer["Installer media"]
  node_stick["USB writer<br/>[usbwriter.py]"]
  node_appleinstaller["Apple installer"]
end

subgraph group_support["Reports and support"]
  node_reports["Report handling<br/>[DurableReport.cs]"]
  node_logscan["Startup log scan<br/>[scan.py]"]
  node_reportclient["Report submission<br/>[report.py]"]
end

subgraph group_maccompanion["macOS companion"]
  node_macapp["Mac companion app<br/>[main.swift]"]
  node_macmap["Hardware map<br/>[HardwareMap.swift]"]
  node_macworker["Map collector"]
  node_driverinstall["NVIDIA driver install<br/>[ArmApps.swift]"]
end

node_user(("PC owner"))

node_user -->|"starts workflow"| node_winui
node_winui -->|"runs commands"| node_winengine
node_winengine -->|"launches module"| node_buildengine
node_buildengine -.->|"scans hardware"| node_hardware
node_buildengine -->|"runs headless"| node_ocs
node_ocs -->|"generates config"| node_config
node_ocs -->|"selects kexts"| node_kexts
node_ocs -->|"gathers resources"| node_gather
node_config -->|"reads datasets"| node_datasources
node_kexts -->|"reads datasets"| node_datasources
node_gather -->|"fetches resources"| node_resourcefetch
node_user -->|"reviews steps"| node_bios
node_user -.->|"requests preparation"| node_storageprep
node_user -->|"creates stick"| node_stick
node_stick -->|"boots installer"| node_appleinstaller
node_winui -->|"handles disks"| node_windowsdisks
node_winengine -->|"records run"| node_reports
node_user -->|"requests log scan"| node_logscan
node_logscan -.->|"submits logs"| node_reportclient
node_user -->|"runs companion"| node_macapp
node_macapp -->|"uses hardware map"| node_macmap
node_macapp -->|"installs driver"| node_driverinstall
node_macapp -.->|"runs collector"| node_macworker

click node_winui "https://github.com/nullmoth/1401/blob/main/windows/App/MainForm.cs"
click node_winengine "https://github.com/nullmoth/1401/blob/main/windows/App/Engine.cs"
click node_windowsdisks "https://github.com/nullmoth/1401/blob/main/windows/App/Disks.cs"
click node_hardware "https://github.com/nullmoth/1401/blob/main/p1401/scan.py"
click node_buildengine "https://github.com/nullmoth/1401/blob/main/p1401/engine.py"
click node_ocs "https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/OpCore-Simplify.py"
click node_config "https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/config_prodigy.py"
click node_kexts "https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/kext_maestro.py"
click node_gather "https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/gathering_files.py"
click node_resourcefetch "https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/resource_fetcher.py"
click node_datasources "https://github.com/nullmoth/1401/tree/main/upstream/OpCore-Simplify/Scripts/datasets"
click node_bios "https://github.com/nullmoth/1401/blob/main/p1401/guide.py"
click node_storageprep "https://github.com/nullmoth/1401/blob/main/p1401/storage_prep.py"
click node_stick "https://github.com/nullmoth/1401/blob/main/p1401/usbwriter.py"
click node_reports "https://github.com/nullmoth/1401/blob/main/windows/App/DurableReport.cs"
click node_logscan "https://github.com/nullmoth/1401/blob/main/p1401/scan.py"
click node_reportclient "https://github.com/nullmoth/1401/blob/main/p1401/report.py"
click node_macapp "https://github.com/nullmoth/1401/blob/main/mac/Sources/main.swift"
click node_macmap "https://github.com/nullmoth/1401/blob/main/mac/Sources/HardwareMap.swift"
click node_macworker "https://github.com/nullmoth/1401/blob/main/mac/Sources/HardwareMapWorker.swift"
click node_driverinstall "https://github.com/nullmoth/1401/blob/main/mac/Sources/ArmApps.swift"

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_winui,node_winengine,node_windowsdisks toneBlue
class node_hardware,node_buildengine,node_ocs,node_config,node_kexts,node_gather,node_resourcefetch,node_datasources,node_bios,node_storageprep toneAmber
class node_stick,node_appleinstaller toneMint
class node_reports,node_logscan,node_reportclient toneRose
class node_macapp,node_macmap,node_macworker,node_driverinstall,node_user toneIndigo
```

## Components

### Windows application

- [Workflow UI](https://github.com/nullmoth/1401/blob/main/windows/App/MainForm.cs): `windows/App/MainForm.cs`
- [Python launcher](https://github.com/nullmoth/1401/blob/main/windows/App/Engine.cs): `windows/App/Engine.cs`
- [Disk handling](https://github.com/nullmoth/1401/blob/main/windows/App/Disks.cs): `windows/App/Disks.cs`

### Hardware and build

- [Hardware scan](https://github.com/nullmoth/1401/blob/main/p1401/scan.py): `p1401/scan.py`
- [Build orchestration](https://github.com/nullmoth/1401/blob/main/p1401/engine.py): `p1401/engine.py`
- [OpenCore engine](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/OpCore-Simplify.py): `upstream/OpCore-Simplify/OpCore-Simplify.py`
- [Config generation](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/config_prodigy.py): `upstream/OpCore-Simplify/Scripts/config_prodigy.py`
- [Kext selection](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/kext_maestro.py): `upstream/OpCore-Simplify/Scripts/kext_maestro.py`
- [Resource gathering](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/gathering_files.py): `upstream/OpCore-Simplify/Scripts/gathering_files.py`
- [Resource fetcher](https://github.com/nullmoth/1401/blob/main/upstream/OpCore-Simplify/Scripts/resource_fetcher.py): `upstream/OpCore-Simplify/Scripts/resource_fetcher.py`
- [Build datasets](https://github.com/nullmoth/1401/tree/main/upstream/OpCore-Simplify/Scripts/datasets): `upstream/OpCore-Simplify/Scripts/datasets`
- [BIOS guidance](https://github.com/nullmoth/1401/blob/main/p1401/guide.py): `p1401/guide.py`
- [Storage preparation](https://github.com/nullmoth/1401/blob/main/p1401/storage_prep.py): `p1401/storage_prep.py`

### Installer media

- [USB writer](https://github.com/nullmoth/1401/blob/main/p1401/usbwriter.py): `p1401/usbwriter.py`
- **Apple installer**

### Reports and support

- [Report handling](https://github.com/nullmoth/1401/blob/main/windows/App/DurableReport.cs): `windows/App/DurableReport.cs`
- [Startup log scan](https://github.com/nullmoth/1401/blob/main/p1401/scan.py): `p1401/scan.py`
- [Report submission](https://github.com/nullmoth/1401/blob/main/p1401/report.py): `p1401/report.py`

### macOS companion

- [Mac companion app](https://github.com/nullmoth/1401/blob/main/mac/Sources/main.swift): `mac/Sources/main.swift`
- [Hardware map](https://github.com/nullmoth/1401/blob/main/mac/Sources/HardwareMap.swift): `mac/Sources/HardwareMap.swift`
- [Map collector](https://github.com/nullmoth/1401/blob/main/mac/Sources/HardwareMapWorker.swift): `mac/Sources/HardwareMapWorker.swift`
- [NVIDIA driver install](https://github.com/nullmoth/1401/blob/main/mac/Sources/ArmApps.swift): `mac/Sources/ArmApps.swift`

### Other components

- **PC owner**

## Connections

- PC owner → Workflow UI: starts workflow (evidence: `README.md`)
- Workflow UI → Python launcher: runs commands (evidence: `windows/App/MainForm.cs`)
- Python launcher → Build orchestration: launches module (evidence: `windows/App/Engine.cs`)
- Build orchestration → Hardware scan: scans hardware
- Build orchestration → OpenCore engine: runs headless (evidence: `p1401/engine.py`)
- OpenCore engine → Config generation: generates config (evidence: `upstream/OpCore-Simplify/OpCore-Simplify.py`)
- OpenCore engine → Kext selection: selects kexts (evidence: `upstream/OpCore-Simplify/OpCore-Simplify.py`)
- OpenCore engine → Resource gathering: gathers resources (evidence: `upstream/OpCore-Simplify/OpCore-Simplify.py`)
- Config generation → Build datasets: reads datasets (evidence: `upstream/OpCore-Simplify/Scripts/config_prodigy.py`)
- Kext selection → Build datasets: reads datasets (evidence: `upstream/OpCore-Simplify/Scripts/kext_maestro.py`)
- Resource gathering → Resource fetcher: fetches resources (evidence: `upstream/OpCore-Simplify/Scripts/gathering_files.py`)
- PC owner → BIOS guidance: reviews steps (evidence: `README.md`)
- PC owner → Storage preparation: requests preparation
- PC owner → USB writer: creates stick (evidence: `README.md`)
- USB writer → Apple installer: boots installer (evidence: `README.md`)
- Workflow UI → Disk handling: handles disks (evidence: `windows/App/MainForm.cs`)
- Python launcher → Report handling: records run (evidence: `windows/App/Engine.cs`)
- PC owner → Startup log scan: requests log scan (evidence: `README.md`)
- Startup log scan → Report submission: submits logs
- PC owner → Mac companion app: runs companion (evidence: `README.md`)
- Mac companion app → Hardware map: uses hardware map (evidence: `mac/Sources/main.swift`)
- Mac companion app → NVIDIA driver install: installs driver (evidence: `mac/Sources/ArmApps.swift`)
- Mac companion app → Map collector: runs collector (evidence: `mac/Sources/main.swift`)
