# abuirfhan316/mining-ops architecture

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

- Interactive diagram: https://gitdiagram.com/abuirfhan316/mining-ops
- Repository: https://github.com/abuirfhan316/mining-ops

## Overview

MiningOps is a single-page Bitcoin mining fleet operations portal. Users access inventory and operational reports, monitor pool and miner performance, and manage accounts and audit history. The README identifies Supabase Postgres, Auth, and Edge Functions as backend services; Edge Functions proxy Foundry pool access to keep its key out of the browser. Feature-level implementation details and call sites were not supplied, so the graph shows documented capabilities without asserting their internal routing.

Main entry points: [`index.html`](https://github.com/abuirfhan316/mining-ops/blob/main/index.html) (MiningOps portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Operations portal"]
  node_portal_app["MiningOps portal<br/>[index.html]"]
  node_staff["Staff accounts<br/>[index.html]"]
  node_authentication["Authentication<br/>[index.html]"]
end

subgraph group_fleet["Fleet operations"]
  node_inventory["Inventory management<br/>[index.html]"]
  node_breakdowns["Breakdown reports<br/>[index.html]"]
  node_antsentry["Antsentry report<br/>[index.html]"]
  node_site_switch["Site switching<br/>[index.html]"]
end

subgraph group_monitoring["Monitoring and reports"]
  node_pool_monitor["Pool monitor<br/>[index.html]"]
  node_miner_monitor["Miner monitoring<br/>[index.html]"]
  node_audit["Audit logging<br/>[index.html]"]
  node_market_context["Market context<br/>[index.html]"]
end

subgraph group_backend["Backend services"]
  node_supabase_auth["Supabase Auth"]
  node_postgres[("Supabase Postgres")]
  node_edge_functions["Edge Functions"]
  node_foundry["Foundry pool API"]
  node_external_data["Mining and market APIs"]
end

node_operator(("Mining operator"))

node_operator -->|"uses"| node_portal_app
node_portal_app -->|"provides"| node_inventory
node_portal_app -->|"provides"| node_breakdowns
node_portal_app -->|"provides"| node_antsentry
node_portal_app -->|"provides"| node_site_switch
node_portal_app -->|"provides"| node_pool_monitor
node_portal_app -->|"provides"| node_miner_monitor
node_portal_app -->|"provides"| node_audit
node_portal_app -->|"provides"| node_market_context
node_portal_app -->|"provides"| node_staff
node_portal_app -->|"provides"| node_authentication
node_portal_app -->|"uses"| node_supabase_auth
node_portal_app -->|"accesses REST"| node_postgres
node_portal_app -->|"calls"| node_edge_functions
node_edge_functions -->|"proxies"| node_foundry
node_portal_app -->|"uses"| node_external_data

click node_portal_app "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_inventory "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_breakdowns "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_antsentry "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_site_switch "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_pool_monitor "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_miner_monitor "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_audit "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_market_context "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_staff "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"
click node_authentication "https://github.com/abuirfhan316/mining-ops/blob/main/index.html"

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_portal_app,node_staff,node_authentication toneBlue
class node_inventory,node_breakdowns,node_antsentry,node_site_switch toneAmber
class node_pool_monitor,node_miner_monitor,node_audit,node_market_context toneMint
class node_supabase_auth,node_postgres,node_edge_functions,node_foundry,node_external_data toneRose
class node_operator toneIndigo
```

## Components

### Operations portal

- [MiningOps portal](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Staff accounts](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Authentication](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`

### Fleet operations

- [Inventory management](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Breakdown reports](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Antsentry report](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Site switching](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`

### Monitoring and reports

- [Pool monitor](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Miner monitoring](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Audit logging](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`
- [Market context](https://github.com/abuirfhan316/mining-ops/blob/main/index.html): `index.html`

### Backend services

- **Supabase Auth**
- **Supabase Postgres**
- **Edge Functions**
- **Foundry pool API**
- **Mining and market APIs**

### Other components

- **Mining operator**

## Connections

- Mining operator → MiningOps portal: uses (evidence: `README.md`)
- MiningOps portal → Inventory management: provides (evidence: `README.md`)
- MiningOps portal → Breakdown reports: provides (evidence: `README.md`)
- MiningOps portal → Antsentry report: provides (evidence: `README.md`)
- MiningOps portal → Site switching: provides (evidence: `README.md`)
- MiningOps portal → Pool monitor: provides (evidence: `README.md`)
- MiningOps portal → Miner monitoring: provides (evidence: `README.md`)
- MiningOps portal → Audit logging: provides (evidence: `README.md`)
- MiningOps portal → Market context: provides (evidence: `README.md`)
- MiningOps portal → Staff accounts: provides (evidence: `README.md`)
- MiningOps portal → Authentication: provides (evidence: `README.md`)
- MiningOps portal → Supabase Auth: uses (evidence: `README.md`)
- MiningOps portal → Supabase Postgres: accesses REST (evidence: `README.md`)
- MiningOps portal → Edge Functions: calls (evidence: `README.md`)
- Edge Functions → Foundry pool API: proxies (evidence: `README.md`)
- MiningOps portal → Mining and market APIs: uses (evidence: `README.md`)
