# kareemmas3ud/smart-oasis-cop31 architecture

> Architecture diagram of the GitHub repository kareemmas3ud/smart-oasis-cop31, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kareemmas3ud/smart-oasis-cop31
- Repository: https://github.com/kareemmas3ud/smart-oasis-cop31
- Video tour (about a minute): https://gitdiagram.com/kareemmas3ud/smart-oasis-cop31/video

## Overview

Smart Oasis is a single-file Streamlit dashboard for simulating groundwater management in New Valley. The principal workflow is: a user adjusts environmental inputs, the app evaluates pump operation and impact metrics, updates simulated telemetry history and forecasts, then presents well status, a map, and system analytics. The README describes live telemetry, but the sampled source shows seeded and generated simulation data; no external telemetry service or persistent store is evidenced. Unsampled implementation details are represented only where the README documents a capability.

Main entry points: [`app.py`](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py) (Streamlit dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Controls and decisions"]
  node_controls["Environmental controls<br/>[app.py]"]
  node_pump["Pump decision<br/>[app.py]"]
end

subgraph group_simulation["Simulation and metrics"]
  node_metrics["Impact metrics<br/>[app.py]"]
  node_well_data[("Well nodes<br/>[app.py]")]
  node_node_status["Well status<br/>[app.py]"]
  node_history[("Telemetry history<br/>[app.py]")]
  node_forecast["Forecast generation<br/>[app.py]"]
end

subgraph group_presentation["Dashboard views"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
  node_map["Interactive GIS map<br/>[app.py]"]
  node_analytics["Charts and gauges<br/>[app.py]"]
  node_impact_view["Impact metrics view<br/>[app.py]"]
end

node_user(("Dashboard user"))

node_user -->|"sets inputs"| node_controls
node_controls -->|"provides thresholds"| node_pump
node_controls -->|"provides inputs"| node_metrics
node_pump -->|"informs calculations"| node_metrics
node_well_data -->|"provides well data"| node_node_status
node_pump -->|"determines activity"| node_node_status
node_controls -->|"updates simulation"| node_history
node_history -->|"supplies latest values"| node_forecast
node_dashboard -->|"evaluates operation"| node_pump
node_dashboard -->|"calculates impact"| node_metrics
node_dashboard -->|"updates history"| node_history
node_dashboard -->|"renders well map"| node_map
node_dashboard -->|"renders analytics"| node_analytics
node_dashboard -->|"renders impact"| node_impact_view
node_node_status -->|"provides well status"| node_map
node_history -->|"provides time series"| node_analytics
node_forecast -->|"provides projections"| node_analytics
node_metrics -->|"provides calculated metrics"| node_impact_view

click node_controls "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_pump "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_metrics "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_well_data "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_node_status "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_history "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_forecast "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_dashboard "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_map "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_analytics "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"
click node_impact_view "https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py"

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_controls,node_pump,node_user toneBlue
class node_metrics,node_well_data,node_node_status,node_history,node_forecast toneAmber
class node_dashboard,node_map,node_analytics,node_impact_view toneMint
```

## Components

### Controls and decisions

- [Environmental controls](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Pump decision](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`

### Simulation and metrics

- [Impact metrics](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Well nodes](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Well status](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Telemetry history](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Forecast generation](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`

### Dashboard views

- [Streamlit dashboard](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Interactive GIS map](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Charts and gauges](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`
- [Impact metrics view](https://github.com/kareemmas3ud/smart-oasis-cop31/blob/main/app.py): `app.py`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Environmental controls: sets inputs
- Environmental controls → Pump decision: provides thresholds
- Environmental controls → Impact metrics: provides inputs
- Pump decision → Impact metrics: informs calculations
- Well nodes → Well status: provides well data
- Pump decision → Well status: determines activity
- Environmental controls → Telemetry history: updates simulation
- Telemetry history → Forecast generation: supplies latest values
- Streamlit dashboard → Pump decision: evaluates operation
- Streamlit dashboard → Impact metrics: calculates impact
- Streamlit dashboard → Telemetry history: updates history
- Streamlit dashboard → Interactive GIS map: renders well map
- Streamlit dashboard → Charts and gauges: renders analytics
- Streamlit dashboard → Impact metrics view: renders impact
- Well status → Interactive GIS map: provides well status
- Telemetry history → Charts and gauges: provides time series
- Forecast generation → Charts and gauges: provides projections
- Impact metrics → Impact metrics view: provides calculated metrics
