How swapnil-ghosh06/highoncaffeine works
THERMA is a shelter-design and thermal decision-support platform: operators configure a site and envelope in the browser, submit analyses through a FastAPI service, and review physics-based results, optimization, diagnosis, and operational recommendations. The documented product also includes estate/site management, weather intelligence, validation, surrogate-model prediction, and CPWD cost knowledge. The graph emphasizes relationships supported by the README or SOURCE INDEX; unsampled subsystems are represented by their exact tree paths, with uncertain internal wiring omitted.
Main entry points: main.py REST orchestration · optimizer.py Design optimizer · solver.py Transient heat solver · router.py CPWD knowledge API
Components 24
Design and operations UI
- Design studio
web/src/App.jsx - Estate platform
web/src/components/platform - Results and reports
web/src/components/results
API and site services
- REST orchestration
api/main.py - Sites and weather
api/platform.py - Weather service
api/weather.py - Location resolution
api/location.py - Application database
api/db.py
Thermal analysis engine
- Transient heat solver
engine/solver.py - Design optimizer
engine/optimizer.py - Sensitivity analysis
engine/sensitivity.py - Thermal diagnosis
engine/diagnosis.py - What-if analysis
engine/what_if.py - Safety interlocks
engine/safety.py - Physics validation
validation
Materials and cost knowledge
- Thermal materials
engine/materials.py - Material suggestions
engine/material_suggestion.py - CPWD knowledge API
api/cpwd/router.py - CPWD ingestion
api/cpwd/ingest.py - CPWD search store
api/cpwd/db.py
ML and prediction
- Surrogate inference
ml/inference.py - ML prediction routes
api/ml_router.py - Ollama assistant
api/cpwd/ollama_client.py
Other components
- Shelter operator
Connections 28
- Shelter operator → Design studio: configures designs
- Shelter operator → Estate platform: manages sites
- Design studio → REST orchestration: submits analysis
- REST orchestration → Transient heat solver: runs simulation
api/main.py - REST orchestration → Design optimizer: optimizes designs
api/main.py - REST orchestration → Thermal diagnosis: requests diagnosis
api/main.py - REST orchestration → What-if analysis: evaluates variants
api/main.py - REST orchestration → Safety interlocks: checks safety
api/main.py - REST orchestration → Weather service: uses weather
api/main.py - Sites and weather → Application database: persists site data
- Weather service → Application database: caches weather
api/weather.py - Location resolution → Application database: reads site data
api/location.py - Transient heat solver → Thermal materials: loads properties
engine/solver.py - Transient heat solver → Physics validation: is checked by
validation/run.py - Design optimizer → Transient heat solver: evaluates candidates
engine/optimizer.py - Design optimizer → Thermal materials: uses properties
engine/optimizer.py - Design optimizer → Sensitivity analysis: uses screening
engine/optimizer.py - Material suggestions → Design optimizer: inverts search
engine/material_suggestion.py - Material suggestions → Transient heat solver: simulates designs
engine/material_suggestion.py - Material suggestions → Weather service: gets weather
engine/material_suggestion.py - CPWD knowledge API → CPWD ingestion: triggers ingestion
api/cpwd/router.py - CPWD knowledge API → CPWD search store: queries records
api/cpwd/router.py - CPWD ingestion → CPWD search store: stores records
api/cpwd/ingest.py - CPWD knowledge API → Surrogate inference: routes thermal queries
api/cpwd/router.py - CPWD knowledge API → Ollama assistant: uses assistant
api/cpwd/router.py - ML prediction routes → Surrogate inference: requests predictions
api/ml_router.py - Estate platform → Sites and weather: uses site services
- Results and reports → REST orchestration: presents results