How deekshith-spl/coldtwin works
ColdTwin is a browser-based cold-store decision-support prototype: staff enter or upload readings and lot records, the app stores them locally, and owners use dashboard, lot, and report views to decide what to sell first and what chamber to inspect. Digital Twin adds expected-temperature comparisons and fault simulation. The README documents energy estimates, multilingual labels, and assumptions transparency. Edges reflect shown imports/calls or README claims; unsampled page internals are not inferred.
Main entry points: App.tsx Routes and shell · Dashboard.tsx Dashboard · useStore.ts Persisted app state · DigitalTwin.tsx Digital Twin
Components 24
App experience
- Routes and shell
src/App.tsx - Dashboard
src/pages/Dashboard.tsx - Digital Twin
src/pages/DigitalTwin.tsx - Lots
src/pages/Lots.tsx - Reports
src/pages/Reports.tsx - Settings
src/pages/Settings.tsx - Assumptions
src/pages/Assumptions.tsx
Data and state
- Data input
src/pages/DataInput.tsx - Persisted app state
src/store/useStore.ts - Demo records
src/engine/demoData.ts
Twin and models
- Thermal twin
src/engine/thermalTwin.ts - Fault detection
src/engine/faultDetection.ts - Learned baseline
src/engine/learnedBaseline.ts - Shelf-life estimates
src/engine/shelfLife.ts - Lot ranking
src/engine/ranking.ts - Energy waste
src/engine/energyWaste.ts
Operational decisions
- Sell First card
src/components/dashboard/SellFirstCard.tsx - Fix Before Breaks card
src/components/dashboard/FixBeforeBreaksCard.tsx - Energy waste card
src/components/dashboard/EnergyWasteCard.tsx
Shared interface
- English Telugu Hindi
src/i18n - Risk gauge
src/components/ui/RiskGauge.tsx - Urgency chip
src/components/ui/UrgencyChip.tsx - Shelf-life chart
src/components/ui/ShelfLifeChart.tsx
Other components
- Store staff
Connections 36
- Store staff → Routes and shell: uses
README.md - Routes and shell → Dashboard: routes to
src/App.tsx - Routes and shell → Data input: routes to
src/App.tsx - Routes and shell → Digital Twin: routes to
src/App.tsx - Routes and shell → Lots: routes to
src/App.tsx - Routes and shell → Reports: routes to
src/App.tsx - Routes and shell → Settings: routes to
src/App.tsx - Routes and shell → Assumptions: routes to
src/App.tsx - Routes and shell → Persisted app state: reads language
src/App.tsx - Routes and shell → English Telugu Hindi: provides strings
src/App.tsx - Data input → Persisted app state: updates records
src/pages/DataInput.tsx - Persisted app state → Demo records: loads demo data
src/store/useStore.ts - Persisted app state → Fault detection: injects simulation
src/store/useStore.ts - Dashboard → Persisted app state: reads state
src/pages/Dashboard.tsx - Dashboard → Thermal twin: computes temperatures
src/pages/Dashboard.tsx - Dashboard → Fault detection: computes risk
src/pages/Dashboard.tsx - Dashboard → Lot ranking: ranks lots
src/pages/Dashboard.tsx - Dashboard → Energy waste: estimates waste
src/pages/Dashboard.tsx - Dashboard → Sell First card: renders
src/pages/Dashboard.tsx - Dashboard → Fix Before Breaks card: renders
src/pages/Dashboard.tsx - Dashboard → Energy waste card: renders
src/pages/Dashboard.tsx - Digital Twin → Persisted app state: simulates fault
src/pages/DigitalTwin.tsx - Digital Twin → Thermal twin: predicts temperature
src/pages/DigitalTwin.tsx - Digital Twin → Fault detection: computes risk
src/pages/DigitalTwin.tsx - Digital Twin → Learned baseline: uses baseline
src/pages/DigitalTwin.tsx - Fault detection → Learned baseline: scores anomaly
src/engine/faultDetection.ts - Lots → Lot ranking: ranks lots
src/pages/Lots.tsx - Lots → Shelf-life estimates: estimates freshness
src/pages/Lots.tsx - Lots → Shelf-life chart: renders curve
src/pages/Lots.tsx - Reports → Lot ranking: ranks lots
src/pages/Reports.tsx - Reports → Fault detection: computes risk
src/pages/Reports.tsx - Reports → Thermal twin: predicts temperature
src/pages/Reports.tsx - Reports → Urgency chip: renders urgency
src/pages/Reports.tsx - Fix Before Breaks card → Risk gauge: renders gauge
src/components/dashboard/FixBeforeBreaksCard.tsx - Sell First card → Urgency chip: renders urgency
src/components/dashboard/SellFirstCard.tsx - Lot ranking → Shelf-life estimates: estimates shelf life
src/engine/ranking.ts