# hari-prabhat/sih-area-specific-shelter architecture

> Architecture diagram of the GitHub repository hari-prabhat/sih-area-specific-shelter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hari-prabhat/sih-area-specific-shelter
- Repository: https://github.com/hari-prabhat/sih-area-specific-shelter

## Overview

ThermoShelter AI is an early-stage passive-shelter design and thermal-screening platform. The principal Python/Streamlit workflow takes a user’s location and shelter requirements through climate-aware sizing and recommendations, thermal simulation, optional optimization, comparison, and visualization. Material and climate services support the engineering calculations; the README describes local weather and rule-based recommendations, not live APIs or trained AI. The tree also contains a separate React design-studio frontend with its own client-side thermal engine. Unsampled modules are included only where README capabilities and paths support them; their detailed call wiring is not inferred.

Main entry points: [`components/feature_studio.py`](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/feature_studio.py) (Feature Studios), [`services/simulation_service.py`](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/simulation_service.py) (Thermal Simulation), [`thermoshelter-design-studio/src/App.tsx`](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/App.tsx) (React Studio), [`services/recommender.py`](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/recommender.py) (Rule Recommender)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User Interaction"]
  node_streamlit["Streamlit App<br/>[app.py]"]
  node_feature_studio["Feature Studios<br/>[feature_studio.py]"]
end

subgraph group_design["Design Exploration"]
  node_design_inputs["Design Inputs<br/>[inputs.py]"]
  node_recommendations["Recommendations<br/>[recommendations.py]"]
  node_recommender["Rule Recommender<br/>[recommender.py]"]
  node_optimizer["Design Optimizer<br/>[optimize.py]"]
  node_comparison["Design Comparison<br/>[comparison.py]"]
end

subgraph group_engineering["Thermal Engineering"]
  node_material_data[("Material Catalog")]
  node_climate_data[("Local Climate Data<br/>[climate_service.py]")]
  node_simulation["Thermal Simulation"]
  node_thermal["Thermal Calculations<br/>[thermal.py]"]
  node_formulas["Geometry &amp; Formulas<br/>[formulas.py]"]
  node_solar["Solar Model<br/>[solar.py]"]
  node_ventilation["Ventilation Model<br/>[ventilation.py]"]
  node_comfort["Comfort Metrics<br/>[comfort.py]"]
end

subgraph group_presentation["Results &amp; Visualization"]
  node_charts["Analysis Charts<br/>[charts.py]"]
  node_dashboard["Results Dashboard<br/>[dashboard.py]"]
  node_visual3d["3D Shelter View<br/>[visual3d.py]"]
  node_export["Result Export<br/>[export.py]"]
end

subgraph group_frontend["React Studio"]
  node_react_app["React Studio<br/>[App.tsx]"]
  node_react_design["Design Workflow<br/>[DesignStudio.tsx]"]
  node_react_climate["Climate Input<br/>[ClimateInput.tsx]"]
  node_react_compare["Comparative Analysis"]
  node_react_engine["Client Thermal Engine<br/>[thermalEngine.ts]"]
  node_react_materials[("Client Materials<br/>[materials.ts]")]
  node_react_3d["Shelter 3D View<br/>[ShelterModel3D.tsx]"]
end

node_user(("Designer"))

node_user -->|"provides inputs"| node_streamlit
node_streamlit -->|"dispatches views"| node_feature_studio
node_feature_studio -->|"collects requirements"| node_design_inputs
node_feature_studio -->|"renders guidance"| node_recommendations
node_feature_studio -->|"requests designs"| node_recommender
node_recommender -->|"optimizes candidates"| node_optimizer
node_recommender -->|"evaluates designs"| node_simulation
node_feature_studio -->|"runs comparisons"| node_simulation
node_simulation -->|"reads weather"| node_climate_data
node_simulation -->|"reads properties"| node_material_data
node_simulation -->|"uses calculations"| node_formulas
node_simulation -->|"models heat transfer"| node_thermal
node_simulation -->|"models solar gain"| node_solar
node_simulation -->|"models ventilation"| node_ventilation
node_simulation -->|"assesses comfort"| node_comfort
node_feature_studio -->|"shows baseline comparison"| node_comparison
node_feature_studio -->|"renders analysis"| node_charts
node_feature_studio -->|"presents results"| node_dashboard
node_feature_studio -->|"builds shelter view"| node_visual3d
node_feature_studio -->|"exports results"| node_export
node_user -->|"opens studio"| node_react_app
node_react_app -->|"shows design workflow"| node_react_design
node_react_app -->|"shows climate controls"| node_react_climate
node_react_app -->|"shows comparisons"| node_react_compare
node_react_design -->|"calculates performance"| node_react_engine
node_react_compare -->|"calculates comparison"| node_react_engine
node_react_engine -->|"uses material data"| node_react_materials
node_react_app -->|"shows shelter model"| node_react_3d

click node_streamlit "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/app.py"
click node_feature_studio "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/feature_studio.py"
click node_design_inputs "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/inputs.py"
click node_recommendations "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/recommendations.py"
click node_recommender "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/recommender.py"
click node_optimizer "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/optimize.py"
click node_comparison "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/comparison.py"
click node_material_data "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/material_service.py"
click node_climate_data "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/climate_service.py"
click node_simulation "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/simulation_service.py"
click node_thermal "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/thermal.py"
click node_formulas "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/formulas.py"
click node_solar "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/solar.py"
click node_ventilation "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/ventilation.py"
click node_comfort "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/comfort.py"
click node_charts "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/charts.py"
click node_dashboard "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/dashboard.py"
click node_visual3d "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/visual3d.py"
click node_export "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/export.py"
click node_react_app "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/App.tsx"
click node_react_design "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/DesignStudio.tsx"
click node_react_climate "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ClimateInput.tsx"
click node_react_compare "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ComparativeAnalysis.tsx"
click node_react_engine "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/utils/thermalEngine.ts"
click node_react_materials "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/data/materials.ts"
click node_react_3d "https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ShelterModel3D.tsx"

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_streamlit,node_feature_studio toneBlue
class node_design_inputs,node_recommendations,node_recommender,node_optimizer,node_comparison toneAmber
class node_material_data,node_climate_data,node_simulation,node_thermal,node_formulas,node_solar,node_ventilation,node_comfort toneMint
class node_charts,node_dashboard,node_visual3d,node_export toneRose
class node_react_app,node_react_design,node_react_climate,node_react_compare,node_react_engine,node_react_materials,node_react_3d,node_user toneIndigo
```

## Components

### User Interaction

- [Streamlit App](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/app.py): `app.py`
- [Feature Studios](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/feature_studio.py): `components/feature_studio.py`

### Design Exploration

- [Design Inputs](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/inputs.py): `components/inputs.py`
- [Recommendations](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/recommendations.py): `components/recommendations.py`
- [Rule Recommender](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/recommender.py): `services/recommender.py`
- [Design Optimizer](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/optimize.py): `services/optimize.py`
- [Design Comparison](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/comparison.py): `components/comparison.py`

### Thermal Engineering

- [Material Catalog](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/material_service.py): `services/material_service.py`
- [Local Climate Data](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/climate_service.py): `services/climate_service.py`
- [Thermal Simulation](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/simulation_service.py): `services/simulation_service.py`
- [Thermal Calculations](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/thermal.py): `services/thermal.py`
- [Geometry & Formulas](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/formulas.py): `services/formulas.py`
- [Solar Model](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/solar.py): `services/solar.py`
- [Ventilation Model](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/ventilation.py): `services/ventilation.py`
- [Comfort Metrics](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/comfort.py): `services/comfort.py`

### Results & Visualization

- [Analysis Charts](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/charts.py): `components/charts.py`
- [Results Dashboard](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/dashboard.py): `components/dashboard.py`
- [3D Shelter View](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/services/visual3d.py): `services/visual3d.py`
- [Result Export](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/components/export.py): `components/export.py`

### React Studio

- [React Studio](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/App.tsx): `thermoshelter-design-studio/src/App.tsx`
- [Design Workflow](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/DesignStudio.tsx): `thermoshelter-design-studio/src/components/DesignStudio.tsx`
- [Climate Input](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ClimateInput.tsx): `thermoshelter-design-studio/src/components/ClimateInput.tsx`
- [Comparative Analysis](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ComparativeAnalysis.tsx): `thermoshelter-design-studio/src/components/ComparativeAnalysis.tsx`
- [Client Thermal Engine](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/utils/thermalEngine.ts): `thermoshelter-design-studio/src/utils/thermalEngine.ts`
- [Client Materials](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/data/materials.ts): `thermoshelter-design-studio/src/data/materials.ts`
- [Shelter 3D View](https://github.com/hari-prabhat/sih-area-specific-shelter/blob/main/thermoshelter-design-studio/src/components/ShelterModel3D.tsx): `thermoshelter-design-studio/src/components/ShelterModel3D.tsx`

### Other components

- **Designer**

## Connections

- Designer → Streamlit App: provides inputs
- Streamlit App → Feature Studios: dispatches views
- Feature Studios → Design Inputs: collects requirements
- Feature Studios → Recommendations: renders guidance
- Feature Studios → Rule Recommender: requests designs
- Rule Recommender → Design Optimizer: optimizes candidates
- Rule Recommender → Thermal Simulation: evaluates designs
- Feature Studios → Thermal Simulation: runs comparisons
- Thermal Simulation → Local Climate Data: reads weather
- Thermal Simulation → Material Catalog: reads properties
- Thermal Simulation → Geometry & Formulas: uses calculations
- Thermal Simulation → Thermal Calculations: models heat transfer
- Thermal Simulation → Solar Model: models solar gain
- Thermal Simulation → Ventilation Model: models ventilation
- Thermal Simulation → Comfort Metrics: assesses comfort
- Feature Studios → Design Comparison: shows baseline comparison
- Feature Studios → Analysis Charts: renders analysis
- Feature Studios → Results Dashboard: presents results
- Feature Studios → 3D Shelter View: builds shelter view
- Feature Studios → Result Export: exports results
- Designer → React Studio: opens studio
- React Studio → Design Workflow: shows design workflow
- React Studio → Climate Input: shows climate controls
- React Studio → Comparative Analysis: shows comparisons
- Design Workflow → Client Thermal Engine: calculates performance
- Comparative Analysis → Client Thermal Engine: calculates comparison
- Client Thermal Engine → Client Materials: uses material data
- React Studio → Shelter 3D View: shows shelter model
