# yashdeshmukh2845/ai_powered_mining_digital_twin architecture

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

- Interactive diagram: https://gitdiagram.com/yashdeshmukh2845/ai_powered_mining_digital_twin
- Repository: https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin

## Overview

MOIL Manganese Intelligence is a mining digital-twin platform for reserve and exploration analysis, production and equipment risk forecasting, operational recommendations, and scenario simulation. Users enter through the React dashboard, choose mine workspaces, and access API-backed analysis and operational tools; separate regional and India exploration workflows support prospectivity mapping and mine-grade planning. The backend also ingests operational and geological data, computes geostatistical reserves, and produces reports. Several service and page implementations were not excerpted, so their internal call paths are not asserted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/App.tsx) (Dashboard Shell), [`backend/app/main.py`](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/main.py) (FastAPI Application), [`frontend/src/services/api.ts`](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/services/api.ts) (API Client), [`backend/app/ml/production_forecast_engine.py`](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/ml/production_forecast_engine.py) (Production Forecast)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard Workspaces"]
  node_dashboard["Dashboard Shell<br/>[App.tsx]"]
  node_workspace_pages["Mine Workspaces"]
  node_regional_pages["Regional Workspaces"]
  node_india_pages["India Workspaces"]
  node_api_client["API Client<br/>[api.ts]"]
end

subgraph group_api["API and Data"]
  node_api_server["FastAPI Application<br/>[main.py]"]
  node_standard_routes["Core API Routes<br/>[routes.py]"]
  node_db[("Operational Database<br/>[db.py]")]
  node_ingestion["Data Ingestion"]
end

subgraph group_operations["Operations Intelligence"]
  node_forecast["Production Forecast"]
  node_equipment["Equipment Failure Risk"]
  node_weather["Weather Context<br/>[weather_service.py]"]
  node_optimization["Dispatch and Actions"]
  node_simulator["Digital Twin Simulator"]
  node_reports["Executive Reports<br/>[report_service.py]"]
end

subgraph group_exploration["Exploration and Reserves"]
  node_geostatistics["Reserve Block Model"]
  node_regional_router["Regional Exploration API<br/>[router.py]"]
  node_regional_pipeline["Regional Prospectivity Pipeline<br/>[pipeline.py]"]
  node_india_router["India Mine API<br/>[india_router.py]"]
  node_india_models["India Grade and Planning"]
end

node_operator(("Mine Operator"))

node_operator -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_workspace_pages
node_dashboard -->|"renders"| node_regional_pages
node_dashboard -->|"renders"| node_india_pages
node_workspace_pages -.->|"requests data"| node_api_client
node_regional_pages -.->|"requests data"| node_api_client
node_india_pages -.->|"requests data"| node_api_client
node_api_server -->|"mounts"| node_standard_routes
node_api_server -->|"mounts"| node_regional_router
node_api_server -->|"mounts"| node_india_router
node_ingestion -->|"writes records"| node_db
node_forecast -->|"fetches forecast"| node_weather
node_forecast -->|"gets downtime risk"| node_equipment
node_optimization -->|"validates actions"| node_simulator
node_regional_router -->|"uses pipeline"| node_regional_pipeline
node_india_router -->|"uses grade models"| node_india_models

click node_dashboard "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/App.tsx"
click node_workspace_pages "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages"
click node_regional_pages "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages/regional"
click node_india_pages "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages/india"
click node_api_client "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/services/api.ts"
click node_api_server "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/main.py"
click node_standard_routes "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/api/routes.py"
click node_db "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/database/db.py"
click node_ingestion "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/ingestion_service.py"
click node_forecast "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/ml/production_forecast_engine.py"
click node_equipment "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/ml/equipment_failure_model.py"
click node_weather "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/weather_service.py"
click node_optimization "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/optimization_service.py"
click node_simulator "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/simulator_service.py"
click node_reports "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/report_service.py"
click node_geostatistics "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/geostatistics_service.py"
click node_regional_router "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/router.py"
click node_regional_pipeline "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/pipeline.py"
click node_india_router "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/india_router.py"
click node_india_models "https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/backend/app/regional"

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_dashboard,node_workspace_pages,node_regional_pages,node_india_pages,node_api_client toneBlue
class node_api_server,node_standard_routes,node_db,node_ingestion toneAmber
class node_forecast,node_equipment,node_weather,node_optimization,node_simulator,node_reports toneMint
class node_geostatistics,node_regional_router,node_regional_pipeline,node_india_router,node_india_models toneRose
class node_operator toneIndigo
```

## Components

### Dashboard Workspaces

- [Dashboard Shell](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Mine Workspaces](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages): `frontend/src/pages`
- [Regional Workspaces](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages/regional): `frontend/src/pages/regional`
- [India Workspaces](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/frontend/src/pages/india): `frontend/src/pages/india`
- [API Client](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and Data

- [FastAPI Application](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/main.py): `backend/app/main.py`
- [Core API Routes](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/api/routes.py): `backend/app/api/routes.py`
- [Operational Database](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/database/db.py): `backend/app/database/db.py`
- [Data Ingestion](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/ingestion_service.py): `backend/app/services/ingestion_service.py`

### Operations Intelligence

- [Production Forecast](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/ml/production_forecast_engine.py): `backend/app/ml/production_forecast_engine.py`
- [Equipment Failure Risk](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/ml/equipment_failure_model.py): `backend/app/ml/equipment_failure_model.py`
- [Weather Context](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/weather_service.py): `backend/app/services/weather_service.py`
- [Dispatch and Actions](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/optimization_service.py): `backend/app/services/optimization_service.py`
- [Digital Twin Simulator](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/simulator_service.py): `backend/app/services/simulator_service.py`
- [Executive Reports](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/report_service.py): `backend/app/services/report_service.py`

### Exploration and Reserves

- [Reserve Block Model](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/services/geostatistics_service.py): `backend/app/services/geostatistics_service.py`
- [Regional Exploration API](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/router.py): `backend/app/regional/router.py`
- [Regional Prospectivity Pipeline](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/pipeline.py): `backend/app/regional/pipeline.py`
- [India Mine API](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/blob/main/backend/app/regional/india_router.py): `backend/app/regional/india_router.py`
- [India Grade and Planning](https://github.com/yashdeshmukh2845/ai_powered_mining_digital_twin/tree/main/backend/app/regional): `backend/app/regional`

### Other components

- **Mine Operator**

## Connections

- Mine Operator → Dashboard Shell: uses
- Dashboard Shell → Mine Workspaces: renders (evidence: `frontend/src/App.tsx`)
- Dashboard Shell → Regional Workspaces: renders (evidence: `frontend/src/App.tsx`)
- Dashboard Shell → India Workspaces: renders (evidence: `frontend/src/App.tsx`)
- Mine Workspaces → API Client: requests data (evidence: `frontend/src/pages/AuthPage.tsx`)
- Regional Workspaces → API Client: requests data
- India Workspaces → API Client: requests data (evidence: `frontend/src/pages/india/MinePlanningView.tsx`)
- FastAPI Application → Core API Routes: mounts (evidence: `backend/app/main.py`)
- FastAPI Application → Regional Exploration API: mounts (evidence: `backend/app/main.py`)
- FastAPI Application → India Mine API: mounts (evidence: `backend/app/main.py`)
- Data Ingestion → Operational Database: writes records (evidence: `backend/app/services/ingestion_service.py`)
- Production Forecast → Weather Context: fetches forecast (evidence: `backend/app/ml/production_forecast_engine.py`)
- Production Forecast → Equipment Failure Risk: gets downtime risk (evidence: `backend/app/ml/production_forecast_engine.py`)
- Dispatch and Actions → Digital Twin Simulator: validates actions (evidence: `backend/app/services/optimization_service.py`)
- Regional Exploration API → Regional Prospectivity Pipeline: uses pipeline (evidence: `backend/app/regional/router.py`)
- India Mine API → India Grade and Planning: uses grade models (evidence: `backend/app/regional/india_router.py`)
