# buffbot88/oraclehosthunter architecture

> Architecture diagram of the GitHub repository buffbot88/oraclehosthunter, 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/buffbot88/oraclehosthunter
- Repository: https://github.com/buffbot88/oraclehosthunter

## Overview

OracleHost is a Windows desktop client that repeatedly attempts to provision Oracle Cloud Always Free VMs. Its main workflow loads and validates local account credentials, presents a dashboard for preflight and hunting, then uses OCI to probe availability and launch an instance; retryable failures are classified and retried with paced, rotating attempts. The README documents quota detection, shape restrictions, and dashboard controls. Some service internals are only partially excerpted, so the graph keeps those responsibilities within OciService rather than inferring extra call paths.

Main entry points: [`Windows/MainWindow.xaml.cs`](https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/MainWindow.xaml.cs) (Hunting dashboard), [`Program.cs`](https://github.com/buffbot88/oraclehosthunter/blob/main/Program.cs) (Application startup), [`Services/ConfigService.cs`](https://github.com/buffbot88/oraclehosthunter/blob/main/Services/ConfigService.cs) (Account and config loading), [`Windows/SettingsWindow.xaml.cs`](https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/SettingsWindow.xaml.cs) (Instance settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and credentials"]
  node_program["Application startup<br/>[Program.cs]"]
  node_account_bundle["AccountInfo bundle"]
  node_config_service["Account and config loading<br/>[ConfigService.cs]"]
  node_account_report["AccountInfo inspection"]
  node_report_window["AccountInfo report"]
end

subgraph group_desktop["Desktop workflow"]
  node_dashboard["Hunting dashboard<br/>[MainWindow.xaml.cs]"]
  node_settings["Instance settings"]
end

subgraph group_cloud["Hunting and OCI"]
  node_oci_service["OCI operations<br/>[OciService.cs]"]
  node_error_classifier["Error classification<br/>[ErrorClassifier.cs]"]
  node_instance["Provisioned instance"]
end

subgraph group_support["Configuration and diagnostics"]
  node_app_config["App configuration<br/>[AppConfig.cs]"]
  node_hunt_status["Hunt state<br/>[HuntStatus.cs]"]
  node_crypto["Key and fingerprint helpers<br/>[CryptoHelper.cs]"]
  node_diagnostics["Diagnostic logging<br/>[DiagnosticLog.cs]"]
end

node_user(("User"))
node_oci_cloud{{"Oracle Cloud"}}

node_user -->|"starts"| node_program
node_program -->|"loads config"| node_config_service
node_config_service -->|"reads credentials"| node_account_bundle
node_config_service -->|"verifies keys"| node_crypto
node_program -->|"inspects bundle"| node_account_report
node_program -->|"shows report"| node_report_window
node_account_report -->|"checks fields"| node_account_bundle
node_program -->|"opens"| node_dashboard
node_user -->|"controls hunt"| node_dashboard
node_dashboard -->|"opens settings"| node_settings
node_settings -->|"updates settings"| node_app_config
node_settings -->|"saves config"| node_config_service
node_program -->|"validates config"| node_app_config
node_dashboard -->|"uses settings"| node_app_config
node_dashboard -->|"updates state"| node_hunt_status
node_dashboard -->|"runs preflight and attempts"| node_oci_service
node_oci_service -->|"queries and launches"| node_oci_cloud
node_oci_cloud -.->|"returns instance"| node_instance
node_dashboard -->|"classifies failures"| node_error_classifier
node_dashboard -->|"logs activity"| node_diagnostics
node_program -->|"logs startup"| node_diagnostics
node_oci_service -->|"logs OCI errors"| node_diagnostics
node_dashboard -->|"shows success details"| node_instance

click node_program "https://github.com/buffbot88/oraclehosthunter/blob/main/Program.cs"
click node_account_bundle "https://github.com/buffbot88/oraclehosthunter/tree/main/AccountInfo"
click node_config_service "https://github.com/buffbot88/oraclehosthunter/blob/main/Services/ConfigService.cs"
click node_account_report "https://github.com/buffbot88/oraclehosthunter/blob/main/Services/AccountInfoReport.cs"
click node_report_window "https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/AccountInfoReportWindow.xaml.cs"
click node_dashboard "https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/MainWindow.xaml.cs"
click node_settings "https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/SettingsWindow.xaml.cs"
click node_app_config "https://github.com/buffbot88/oraclehosthunter/blob/main/Models/AppConfig.cs"
click node_hunt_status "https://github.com/buffbot88/oraclehosthunter/blob/main/Models/HuntStatus.cs"
click node_oci_service "https://github.com/buffbot88/oraclehosthunter/blob/main/Services/OciService.cs"
click node_error_classifier "https://github.com/buffbot88/oraclehosthunter/blob/main/Services/ErrorClassifier.cs"
click node_crypto "https://github.com/buffbot88/oraclehosthunter/blob/main/Helpers/CryptoHelper.cs"
click node_diagnostics "https://github.com/buffbot88/oraclehosthunter/blob/main/Helpers/DiagnosticLog.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_account_bundle,node_config_service,node_account_report,node_report_window,node_user toneBlue
class node_dashboard,node_settings toneAmber
class node_oci_service,node_error_classifier,node_instance toneMint
class node_app_config,node_hunt_status,node_crypto,node_diagnostics toneRose
class node_oci_cloud toneIndigo
```

## Components

### Startup and credentials

- [Application startup](https://github.com/buffbot88/oraclehosthunter/blob/main/Program.cs): `Program.cs`
- [AccountInfo bundle](https://github.com/buffbot88/oraclehosthunter/tree/main/AccountInfo): `AccountInfo`
- [Account and config loading](https://github.com/buffbot88/oraclehosthunter/blob/main/Services/ConfigService.cs): `Services/ConfigService.cs`
- [AccountInfo inspection](https://github.com/buffbot88/oraclehosthunter/blob/main/Services/AccountInfoReport.cs): `Services/AccountInfoReport.cs`
- [AccountInfo report](https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/AccountInfoReportWindow.xaml.cs): `Windows/AccountInfoReportWindow.xaml.cs`

### Desktop workflow

- [Hunting dashboard](https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/MainWindow.xaml.cs): `Windows/MainWindow.xaml.cs`
- [Instance settings](https://github.com/buffbot88/oraclehosthunter/blob/main/Windows/SettingsWindow.xaml.cs): `Windows/SettingsWindow.xaml.cs`

### Hunting and OCI

- [OCI operations](https://github.com/buffbot88/oraclehosthunter/blob/main/Services/OciService.cs): `Services/OciService.cs`
- [Error classification](https://github.com/buffbot88/oraclehosthunter/blob/main/Services/ErrorClassifier.cs): `Services/ErrorClassifier.cs`
- **Provisioned instance**

### Configuration and diagnostics

- [App configuration](https://github.com/buffbot88/oraclehosthunter/blob/main/Models/AppConfig.cs): `Models/AppConfig.cs`
- [Hunt state](https://github.com/buffbot88/oraclehosthunter/blob/main/Models/HuntStatus.cs): `Models/HuntStatus.cs`
- [Key and fingerprint helpers](https://github.com/buffbot88/oraclehosthunter/blob/main/Helpers/CryptoHelper.cs): `Helpers/CryptoHelper.cs`
- [Diagnostic logging](https://github.com/buffbot88/oraclehosthunter/blob/main/Helpers/DiagnosticLog.cs): `Helpers/DiagnosticLog.cs`

### Other components

- **User**
- **Oracle Cloud**

## Connections

- User → Application startup: starts (evidence: `README.md`)
- Application startup → Account and config loading: loads config (evidence: `Program.cs`)
- Account and config loading → AccountInfo bundle: reads credentials (evidence: `README.md`)
- Account and config loading → Key and fingerprint helpers: verifies keys (evidence: `Services/ConfigService.cs`)
- Application startup → AccountInfo inspection: inspects bundle (evidence: `Program.cs`)
- Application startup → AccountInfo report: shows report (evidence: `Program.cs`)
- AccountInfo inspection → AccountInfo bundle: checks fields (evidence: `Services/AccountInfoReport.cs`)
- Application startup → Hunting dashboard: opens (evidence: `Program.cs`)
- User → Hunting dashboard: controls hunt (evidence: `README.md`)
- Hunting dashboard → Instance settings: opens settings (evidence: `Windows/MainWindow.xaml.cs`)
- Instance settings → App configuration: updates settings (evidence: `Windows/SettingsWindow.xaml.cs`)
- Instance settings → Account and config loading: saves config (evidence: `Windows/SettingsWindow.xaml.cs`)
- Application startup → App configuration: validates config (evidence: `Program.cs`)
- Hunting dashboard → App configuration: uses settings (evidence: `Windows/MainWindow.xaml.cs`)
- Hunting dashboard → Hunt state: updates state (evidence: `Windows/MainWindow.xaml.cs`)
- Hunting dashboard → OCI operations: runs preflight and attempts (evidence: `Windows/MainWindow.xaml.cs`)
- OCI operations → Oracle Cloud: queries and launches (evidence: `README.md`)
- Oracle Cloud → Provisioned instance: returns instance
- Hunting dashboard → Error classification: classifies failures (evidence: `Windows/MainWindow.xaml.cs`)
- Hunting dashboard → Diagnostic logging: logs activity (evidence: `Windows/MainWindow.xaml.cs`)
- Application startup → Diagnostic logging: logs startup (evidence: `Program.cs`)
- OCI operations → Diagnostic logging: logs OCI errors (evidence: `Services/OciService.cs`)
- Hunting dashboard → Provisioned instance: shows success details (evidence: `README.md`)
