# gitmag/autocryptomine architecture

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

- Interactive diagram: https://gitdiagram.com/gitmag/autocryptomine
- Repository: https://github.com/gitmag/autocryptomine

## Overview

Auto Crypto Miner is a Windows desktop utility that starts a configured mining application after inactivity and stops it when activity resumes. Its main form also manages miner settings, optional start/stop scripts, and time-based profiles; the profile dialog creates schedule files that the main form loads. The excerpts show application startup, profile-file writes, and process/config-file operations. The README documents the inactivity behavior and profile capabilities; omitted portions of the main form limit certainty about some event wiring.

Main entry points: [`AutoMine/Form1.cs`](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs) (Main settings form), [`AutoMine/AddSchedule.cs`](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/AddSchedule.cs) (Profile editor), [`AutoMine/Program.cs`](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Program.cs) (App entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop application"]
  node_program["App entry point<br/>[Program.cs]"]
  node_main["Main settings form<br/>[Form1.cs]"]
end

subgraph group_activity["Activity and mining"]
  node_idle_state["Idle tracking<br/>[Form1.cs]"]
  node_miner_control["Miner control<br/>[Form1.cs]"]
end

subgraph group_profiles["Profile scheduling"]
  node_schedule_dialog["Profile editor<br/>[AddSchedule.cs]"]
  node_profile_files[("Profile files")]
end

subgraph group_resources["Mining resources"]
end

node_user(("Computer user"))
node_computer_activity(("Computer activity"))
node_miner["Mining application"]
node_start_script["Start script"]
node_stop_script["Stop script"]
node_config_file["Miner config file"]

node_user -->|"starts app"| node_program
node_program -->|"opens form"| node_main
node_main -->|"tracks inactivity"| node_idle_state
node_computer_activity -.->|"provides activity"| node_idle_state
node_idle_state -->|"triggers start/stop"| node_miner_control
node_main -->|"configures miner"| node_miner_control
node_miner_control -->|"starts or kills"| node_miner
node_miner_control -->|"copies config"| node_config_file
node_miner_control -->|"runs on start"| node_start_script
node_miner_control -->|"runs on stop"| node_stop_script
node_user -->|"configures settings"| node_main
node_main -->|"opens editor"| node_schedule_dialog
node_user -->|"defines schedule"| node_schedule_dialog
node_schedule_dialog -->|"writes profiles"| node_profile_files
node_main -->|"loads profiles"| node_profile_files

click node_program "https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Program.cs"
click node_main "https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs"
click node_schedule_dialog "https://github.com/gitmag/autocryptomine/blob/master/AutoMine/AddSchedule.cs"
click node_idle_state "https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs"
click node_miner_control "https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.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_main,node_user toneBlue
class node_idle_state,node_miner_control toneAmber
class node_schedule_dialog,node_profile_files toneMint
class node_computer_activity,node_miner,node_start_script,node_stop_script,node_config_file toneIndigo
```

## Components

### Desktop application

- [App entry point](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Program.cs): `AutoMine/Program.cs`
- [Main settings form](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs): `AutoMine/Form1.cs`

### Activity and mining

- [Idle tracking](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs): `AutoMine/Form1.cs`
- [Miner control](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/Form1.cs): `AutoMine/Form1.cs`

### Profile scheduling

- [Profile editor](https://github.com/gitmag/autocryptomine/blob/master/AutoMine/AddSchedule.cs): `AutoMine/AddSchedule.cs`
- **Profile files**

### Other components

- **Computer user**
- **Computer activity**
- **Mining application**
- **Start script**
- **Stop script**
- **Miner config file**

## Connections

- Computer user → App entry point: starts app (evidence: `README.md`)
- App entry point → Main settings form: opens form (evidence: `AutoMine/Program.cs`)
- Main settings form → Idle tracking: tracks inactivity (evidence: `README.md`)
- Computer activity → Idle tracking: provides activity
- Idle tracking → Miner control: triggers start/stop (evidence: `README.md`)
- Main settings form → Miner control: configures miner (evidence: `AutoMine/Form1.cs`)
- Miner control → Mining application: starts or kills (evidence: `AutoMine/Form1.cs`)
- Miner control → Miner config file: copies config (evidence: `AutoMine/Form1.cs`)
- Miner control → Start script: runs on start (evidence: `AutoMine/Form1.cs`)
- Miner control → Stop script: runs on stop (evidence: `AutoMine/Form1.cs`)
- Computer user → Main settings form: configures settings (evidence: `README.md`)
- Main settings form → Profile editor: opens editor (evidence: `AutoMine/Form1.cs`)
- Computer user → Profile editor: defines schedule (evidence: `README.md`)
- Profile editor → Profile files: writes profiles (evidence: `AutoMine/AddSchedule.cs`)
- Main settings form → Profile files: loads profiles (evidence: `AutoMine/Form1.cs`)
