# rajeevranjan-023/matrix-compliers architecture

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

- Interactive diagram: https://gitdiagram.com/rajeevranjan-023/matrix-compliers
- Repository: https://github.com/rajeevranjan-023/matrix-compliers

## Overview

ShelterIQ turns a location and building brief into climate-adapted shelter recommendations, then presents simulation, comfort, material, sustainability, and comparison results. The principal flow is browser inputs → design API → climate resolution and design computation → interactive results. The route and selected engines were sampled; the internal wiring of the central engine and several result calculations is inferred from module names and response fields, so those uncertain call relationships are not expanded.

Main entry points: [`frontend/src/App.jsx`](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/App.jsx) (ShelterIQ app), [`backend/src/engines/core.js`](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/core.js) (Design orchestrator), [`backend/src/routes/design.js`](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/routes/design.js) (Design API), [`frontend/src/lib/api.js`](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/lib/api.js) (Browser API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Design workspace"]
  node_app["ShelterIQ app<br/>[App.jsx]"]
  node_inputs["Design inputs<br/>[InputPanel.jsx]"]
  node_results["Design results<br/>[ResultsPanel.jsx]"]
  node_building["3D building view<br/>[Building3D.jsx]"]
  node_simulationview["Thermal simulation"]
  node_comfortview["Comfort score<br/>[ComfortScore.jsx]"]
  node_compareview["Design comparison"]
  node_materialsview["Materials and cost<br/>[MaterialTable.jsx]"]
  node_sustainview["Sustainability"]
  node_multilocation["City comparison"]
  node_api["Browser API client<br/>[api.js]"]
end

subgraph group_api["Backend workflow"]
  node_server["HTTP server<br/>[server.js]"]
  node_route["Design API<br/>[design.js]"]
end

subgraph group_engines["Design engines"]
  node_core["Design orchestrator<br/>[core.js]"]
  node_classifier["Climate classifier"]
  node_designengine["Design rules<br/>[designEngine.js]"]
  node_materialengine["Material selector<br/>[materialEngine.js]"]
  node_simulation["Thermal simulator"]
  node_comparison["Baseline comparison"]
  node_comfort["Comfort scoring<br/>[comfortScore.js]"]
end

subgraph group_climate["Climate data"]
  node_weather["Climate resolver<br/>[weatherService.js]"]
  node_climatedb[("Regional climate profiles<br/>[climateDb.js]")]
end

node_designer(("Designer"))
node_openweather["OpenWeather"]

node_designer -->|"sets brief"| node_inputs
node_inputs -->|"updates inputs"| node_app
node_app -->|"requests design"| node_api
node_api -->|"posts design"| node_route
node_route -->|"resolves climate"| node_weather
node_weather -->|"uses fallback"| node_climatedb
node_weather -.->|"fetches conditions"| node_openweather
node_route -->|"runs design"| node_core
node_route -->|"returns results"| node_app
node_app -->|"shows results"| node_results
node_app -->|"renders model"| node_building
node_app -->|"shows simulation"| node_simulationview
node_app -->|"shows score"| node_comfortview
node_app -->|"shows comparison"| node_compareview
node_app -->|"shows materials"| node_materialsview
node_app -->|"shows sustainability"| node_sustainview
node_app -->|"shows city comparison"| node_multilocation
node_app -->|"loads locations"| node_api
node_api -->|"gets locations"| node_route
node_designer -->|"selects city"| node_multilocation
node_multilocation -->|"requests comparison"| node_app
node_core --> node_classifier
node_core --> node_designengine
node_core --> node_materialengine
node_core --> node_simulation
node_core --> node_comparison
node_core --> node_comfort

click node_app "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/App.jsx"
click node_inputs "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/InputPanel.jsx"
click node_results "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ResultsPanel.jsx"
click node_building "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/Building3D.jsx"
click node_simulationview "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/SimulationChart.jsx"
click node_comfortview "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ComfortScore.jsx"
click node_compareview "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ComparisonPanel.jsx"
click node_materialsview "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/MaterialTable.jsx"
click node_sustainview "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/SustainabilityPanel.jsx"
click node_multilocation "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/MultiLocationPanel.jsx"
click node_api "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/lib/api.js"
click node_server "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/server.js"
click node_route "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/routes/design.js"
click node_core "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/core.js"
click node_weather "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/services/weatherService.js"
click node_climatedb "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/data/climateDb.js"
click node_classifier "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/climateClassifier.js"
click node_designengine "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/designEngine.js"
click node_materialengine "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/materialEngine.js"
click node_simulation "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/simulationEngine.js"
click node_comparison "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/comparisonEngine.js"
click node_comfort "https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/comfortScore.js"

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_app,node_inputs,node_results,node_building,node_simulationview,node_comfortview,node_compareview,node_materialsview,node_sustainview,node_multilocation,node_api toneBlue
class node_server,node_route toneAmber
class node_core,node_classifier,node_designengine,node_materialengine,node_simulation,node_comparison,node_comfort toneMint
class node_weather,node_climatedb toneRose
class node_designer,node_openweather toneIndigo
```

## Components

### Design workspace

- [ShelterIQ app](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Design inputs](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/InputPanel.jsx): `frontend/src/components/InputPanel.jsx`
- [Design results](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ResultsPanel.jsx): `frontend/src/components/ResultsPanel.jsx`
- [3D building view](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/Building3D.jsx): `frontend/src/components/Building3D.jsx`
- [Thermal simulation](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/SimulationChart.jsx): `frontend/src/components/SimulationChart.jsx`
- [Comfort score](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ComfortScore.jsx): `frontend/src/components/ComfortScore.jsx`
- [Design comparison](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/ComparisonPanel.jsx): `frontend/src/components/ComparisonPanel.jsx`
- [Materials and cost](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/MaterialTable.jsx): `frontend/src/components/MaterialTable.jsx`
- [Sustainability](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/SustainabilityPanel.jsx): `frontend/src/components/SustainabilityPanel.jsx`
- [City comparison](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/components/MultiLocationPanel.jsx): `frontend/src/components/MultiLocationPanel.jsx`
- [Browser API client](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/frontend/src/lib/api.js): `frontend/src/lib/api.js`

### Backend workflow

- [HTTP server](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/server.js): `backend/src/server.js`
- [Design API](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/routes/design.js): `backend/src/routes/design.js`

### Design engines

- [Design orchestrator](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/core.js): `backend/src/engines/core.js`
- [Climate classifier](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/climateClassifier.js): `backend/src/engines/climateClassifier.js`
- [Design rules](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/designEngine.js): `backend/src/engines/designEngine.js`
- [Material selector](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/materialEngine.js): `backend/src/engines/materialEngine.js`
- [Thermal simulator](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/simulationEngine.js): `backend/src/engines/simulationEngine.js`
- [Baseline comparison](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/comparisonEngine.js): `backend/src/engines/comparisonEngine.js`
- [Comfort scoring](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/engines/comfortScore.js): `backend/src/engines/comfortScore.js`

### Climate data

- [Climate resolver](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/services/weatherService.js): `backend/src/services/weatherService.js`
- [Regional climate profiles](https://github.com/rajeevranjan-023/matrix-compliers/blob/main/backend/src/data/climateDb.js): `backend/src/data/climateDb.js`

### Other components

- **Designer**
- **OpenWeather**

## Connections

- Designer → Design inputs: sets brief
- Design inputs → ShelterIQ app: updates inputs
- ShelterIQ app → Browser API client: requests design
- Browser API client → Design API: posts design
- Design API → Climate resolver: resolves climate
- Climate resolver → Regional climate profiles: uses fallback
- Climate resolver → OpenWeather: fetches conditions
- Design API → Design orchestrator: runs design
- Design API → ShelterIQ app: returns results
- ShelterIQ app → Design results: shows results
- ShelterIQ app → 3D building view: renders model
- ShelterIQ app → Thermal simulation: shows simulation
- ShelterIQ app → Comfort score: shows score
- ShelterIQ app → Design comparison: shows comparison
- ShelterIQ app → Materials and cost: shows materials
- ShelterIQ app → Sustainability: shows sustainability
- ShelterIQ app → City comparison: shows city comparison
- ShelterIQ app → Browser API client: loads locations
- Browser API client → Design API: gets locations
- Designer → City comparison: selects city
- City comparison → ShelterIQ app: requests comparison
- Design orchestrator → Climate classifier
- Design orchestrator → Design rules
- Design orchestrator → Material selector
- Design orchestrator → Thermal simulator
- Design orchestrator → Baseline comparison
- Design orchestrator → Comfort scoring
