# aasmitate-lgtm/demo architecture

> Architecture diagram of the GitHub repository aasmitate-lgtm/demo, 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/aasmitate-lgtm/demo
- Repository: https://github.com/aasmitate-lgtm/demo

## Overview

KRUSHEET is a browser-based prototype simulator for a solar-powered farm cold-storage system, with a 320×240 embedded-style display and hardware simulation. Users can select a crop and region, adjust ambient temperature, and operate the simulated controls; the app calculates cooling duty and updates the display. The interface also covers crop/climate, solar, setpoint and diagnostics screens, plus alarms and sound. The sampled excerpts show the single-file implementation and selected event handlers; detailed wiring for unsampled features is not assumed.

Main entry points: [`app.js`](https://github.com/aasmitate-lgtm/demo/blob/main/app.js) (UI Runtime), [`index.html`](https://github.com/aasmitate-lgtm/demo/blob/main/index.html) (Web Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_page["Web Interface<br/>[index.html]"]
  node_runtime["UI Runtime<br/>[app.js]"]
  node_styles["Interface Styling<br/>[style.css]"]
  node_screens["Status Screens<br/>[app.js]"]
end

subgraph group_simulation["Cold-Chain Simulation"]
  node_profiles["Crop &amp; Region Profiles<br/>[app.js]"]
  node_climate["Climate Control<br/>[app.js]"]
end

subgraph group_feedback["Alerts &amp; Feedback"]
  node_alarms["Alarm Logic<br/>[app.js]"]
  node_audio["Sound Feedback<br/>[app.js]"]
end

node_user(("Operator"))
node_browseraudio["Browser Audio"]

node_user -->|"operates"| node_page
node_runtime -->|"applies selections"| node_profiles
node_runtime -->|"calculates duty"| node_climate
node_runtime -->|"updates display"| node_screens
node_runtime -->|"plays sounds"| node_audio
node_audio -.->|"uses audio APIs"| node_browseraudio

click node_page "https://github.com/aasmitate-lgtm/demo/blob/main/index.html"
click node_runtime "https://github.com/aasmitate-lgtm/demo/blob/main/app.js"
click node_styles "https://github.com/aasmitate-lgtm/demo/blob/main/style.css"
click node_profiles "https://github.com/aasmitate-lgtm/demo/blob/main/app.js"
click node_climate "https://github.com/aasmitate-lgtm/demo/blob/main/app.js"
click node_screens "https://github.com/aasmitate-lgtm/demo/blob/main/app.js"
click node_alarms "https://github.com/aasmitate-lgtm/demo/blob/main/app.js"
click node_audio "https://github.com/aasmitate-lgtm/demo/blob/main/app.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_page,node_runtime,node_styles,node_screens,node_browseraudio toneBlue
class node_profiles,node_climate toneAmber
class node_alarms,node_audio toneMint
class node_user toneIndigo
```

## Components

### User Interface

- [Web Interface](https://github.com/aasmitate-lgtm/demo/blob/main/index.html): `index.html`
- [UI Runtime](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`
- [Interface Styling](https://github.com/aasmitate-lgtm/demo/blob/main/style.css): `style.css`
- [Status Screens](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`

### Cold-Chain Simulation

- [Crop & Region Profiles](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`
- [Climate Control](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`

### Alerts & Feedback

- [Alarm Logic](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`
- [Sound Feedback](https://github.com/aasmitate-lgtm/demo/blob/main/app.js): `app.js`

### Other components

- **Operator**
- **Browser Audio**

## Connections

- Operator → Web Interface: operates
- UI Runtime → Crop & Region Profiles: applies selections
- UI Runtime → Climate Control: calculates duty
- UI Runtime → Status Screens: updates display
- UI Runtime → Sound Feedback: plays sounds
- Sound Feedback → Browser Audio: uses audio APIs
