# nry28196-blip/cky_mepf_web architecture

> Architecture diagram of the GitHub repository nry28196-blip/cky_mepf_web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nry28196-blip/cky_mepf_web
- Repository: https://github.com/nry28196-blip/cky_mepf_web

## Overview

CKY_MEPF is a browser-based MEPF engineering calculation suite. The user selects a discipline and calculator in the app, enters design inputs, and receives calculation results with validation and audit context; the ventilation workflow includes ASHRAE data selection, zone calculations, and density correction. The graph preserves the suite’s other visible calculation areas and shared UI capabilities. README content was empty, and several calculator implementations were not sampled, so links to those unsampled internals are omitted.

Main entry points: [`src/lib/VentilationEngine.ts`](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/VentilationEngine.ts) (Ventilation Engine), [`src/components/MechanicalCalc.tsx`](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/MechanicalCalc.tsx) (Mechanical Workspace), [`src/App.tsx`](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/App.tsx) (Application Shell), [`src/calculations/ventilation/Ashrae621ZoneService.ts`](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/Ashrae621ZoneService.ts) (Zone Ventilation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_mechanical["Mechanical Workspace<br/>[MechanicalCalc.tsx]"]
  node_duct_ui["Duct Sizing UI<br/>[DuctSizingCalc.tsx]"]
  node_vent_ui["Ventilation UI"]
  node_formula_ui["Formula Reference"]
  node_trend_ui["Trend Visualizer"]
end

subgraph group_calculators["Engineering Calculators"]
  node_other_calcs["Other Discipline Calculators"]
  node_cooling_engine["Cooling Load Engine"]
end

subgraph group_ventilation["Ventilation Standards"]
  node_vent_engine["Ventilation Engine"]
  node_zone_service["Zone Ventilation"]
  node_ez_service["Ez Selection"]
  node_provenance["Data Provenance"]
  node_standard_data["Standard Data Provider"]
  node_ashrae_data["ASHRAE 62.1 2022 Data<br/>[data.ts]"]
end

subgraph group_shared["Shared Services"]
  node_validation["Ventilation Validation"]
  node_density["Density Correction"]
  node_audit["Engineering Audit Contract"]
  node_scope["Production Scope"]
  node_logger["Validation Logger"]
  node_units["Unit Conversion"]
  node_unit_context["Unit Preferences<br/>[UnitContext.tsx]"]
  node_language["Translations<br/>[translations.tsx]"]
  node_csv["CSV Export<br/>[exportCsv.ts]"]
end

node_user(("Engineer"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_mechanical
node_mechanical -->|"renders"| node_duct_ui
node_mechanical -->|"renders"| node_vent_ui
node_mechanical -->|"renders"| node_formula_ui
node_mechanical -->|"renders"| node_trend_ui
node_app -->|"selects"| node_other_calcs
node_vent_engine -->|"calls"| node_zone_service
node_vent_engine -->|"calls"| node_density
node_vent_engine -->|"uses"| node_validation
node_vent_engine -->|"creates records"| node_audit
node_vent_engine -->|"uses"| node_logger
node_zone_service -->|"selects"| node_ez_service
node_zone_service -->|"checks provenance"| node_provenance
node_zone_service -->|"normalizes addenda"| node_scope
node_zone_service -->|"reports failures"| node_logger
node_ez_service -->|"reads values"| node_ashrae_data
node_standard_data -->|"provides data"| node_ashrae_data
node_cooling_engine -->|"uses"| node_density
node_cooling_engine -->|"converts units"| node_units
node_vent_engine -.-> node_unit_context
node_app -->|"uses language"| node_language
node_mechanical -->|"uses units"| node_unit_context
node_app -.-> node_csv

click node_app "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/App.tsx"
click node_mechanical "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/MechanicalCalc.tsx"
click node_duct_ui "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/DuctSizingCalc.tsx"
click node_vent_ui "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/VentilationCalc.tsx"
click node_formula_ui "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/InteractiveFormulaReferenceCard.tsx"
click node_trend_ui "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/TrendVisualizer.tsx"
click node_other_calcs "https://github.com/nry28196-blip/cky_mepf_web/tree/main/src/components"
click node_cooling_engine "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/MechanicalCoolingEngine.ts"
click node_vent_engine "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/VentilationEngine.ts"
click node_zone_service "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/Ashrae621ZoneService.ts"
click node_ez_service "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/EzSelectionService.ts"
click node_provenance "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/DataProvenanceValidationService.ts"
click node_standard_data "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/data/ventilation/StandardDataProvider.ts"
click node_ashrae_data "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/data/ventilation/ashrae621/2022/data.ts"
click node_validation "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/VentilationValidationService.ts"
click node_density "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/DensityCorrectionService.ts"
click node_audit "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/audit/EngineeringAuditContract.ts"
click node_scope "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/scope/ProductionCalculationScope.ts"
click node_logger "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/validation/EngineeringValidationLogger.ts"
click node_units "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/UnitConversionService.ts"
click node_unit_context "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/UnitContext.tsx"
click node_language "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/translations.tsx"
click node_csv "https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/exportCsv.ts"

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_mechanical,node_duct_ui,node_vent_ui,node_formula_ui,node_trend_ui toneBlue
class node_other_calcs,node_cooling_engine toneAmber
class node_vent_engine,node_zone_service,node_ez_service,node_provenance,node_standard_data,node_ashrae_data toneMint
class node_validation,node_density,node_audit,node_scope,node_logger,node_units,node_unit_context,node_language,node_csv toneRose
class node_user toneIndigo
```

## Components

### Application UI

- [Application Shell](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/App.tsx): `src/App.tsx`
- [Mechanical Workspace](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/MechanicalCalc.tsx): `src/components/MechanicalCalc.tsx`
- [Duct Sizing UI](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/DuctSizingCalc.tsx): `src/components/DuctSizingCalc.tsx`
- [Ventilation UI](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/VentilationCalc.tsx): `src/components/VentilationCalc.tsx`
- [Formula Reference](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/InteractiveFormulaReferenceCard.tsx): `src/components/InteractiveFormulaReferenceCard.tsx`
- [Trend Visualizer](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/components/TrendVisualizer.tsx): `src/components/TrendVisualizer.tsx`

### Engineering Calculators

- [Other Discipline Calculators](https://github.com/nry28196-blip/cky_mepf_web/tree/main/src/components): `src/components`
- [Cooling Load Engine](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/MechanicalCoolingEngine.ts): `src/lib/MechanicalCoolingEngine.ts`

### Ventilation Standards

- [Ventilation Engine](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/VentilationEngine.ts): `src/lib/VentilationEngine.ts`
- [Zone Ventilation](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/Ashrae621ZoneService.ts): `src/calculations/ventilation/Ashrae621ZoneService.ts`
- [Ez Selection](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/EzSelectionService.ts): `src/calculations/ventilation/EzSelectionService.ts`
- [Data Provenance](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/DataProvenanceValidationService.ts): `src/calculations/ventilation/DataProvenanceValidationService.ts`
- [Standard Data Provider](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/data/ventilation/StandardDataProvider.ts): `src/data/ventilation/StandardDataProvider.ts`
- [ASHRAE 62.1 2022 Data](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/data/ventilation/ashrae621/2022/data.ts): `src/data/ventilation/ashrae621/2022/data.ts`

### Shared Services

- [Ventilation Validation](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/ventilation/VentilationValidationService.ts): `src/calculations/ventilation/VentilationValidationService.ts`
- [Density Correction](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/DensityCorrectionService.ts): `src/lib/DensityCorrectionService.ts`
- [Engineering Audit Contract](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/audit/EngineeringAuditContract.ts): `src/calculations/audit/EngineeringAuditContract.ts`
- [Production Scope](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/scope/ProductionCalculationScope.ts): `src/calculations/scope/ProductionCalculationScope.ts`
- [Validation Logger](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/calculations/validation/EngineeringValidationLogger.ts): `src/calculations/validation/EngineeringValidationLogger.ts`
- [Unit Conversion](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/UnitConversionService.ts): `src/lib/UnitConversionService.ts`
- [Unit Preferences](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/UnitContext.tsx): `src/lib/UnitContext.tsx`
- [Translations](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/translations.tsx): `src/lib/translations.tsx`
- [CSV Export](https://github.com/nry28196-blip/cky_mepf_web/blob/main/src/lib/exportCsv.ts): `src/lib/exportCsv.ts`

### Other components

- **Engineer**

## Connections

- Engineer → Application Shell: uses (evidence: `src/App.tsx`)
- Application Shell → Mechanical Workspace: renders (evidence: `src/App.tsx`)
- Mechanical Workspace → Duct Sizing UI: renders (evidence: `src/components/MechanicalCalc.tsx`)
- Mechanical Workspace → Ventilation UI: renders (evidence: `src/components/MechanicalCalc.tsx`)
- Mechanical Workspace → Formula Reference: renders (evidence: `src/components/MechanicalCalc.tsx`)
- Mechanical Workspace → Trend Visualizer: renders (evidence: `src/components/MechanicalCalc.tsx`)
- Application Shell → Other Discipline Calculators: selects (evidence: `src/App.tsx`)
- Ventilation Engine → Zone Ventilation: calls (evidence: `src/lib/VentilationEngine.ts`)
- Ventilation Engine → Density Correction: calls (evidence: `src/lib/VentilationEngine.ts`)
- Ventilation Engine → Ventilation Validation: uses (evidence: `src/lib/VentilationEngine.ts`)
- Ventilation Engine → Engineering Audit Contract: creates records (evidence: `src/lib/VentilationEngine.ts`)
- Ventilation Engine → Validation Logger: uses (evidence: `src/lib/VentilationEngine.ts`)
- Zone Ventilation → Ez Selection: selects (evidence: `src/calculations/ventilation/Ashrae621ZoneService.ts`)
- Zone Ventilation → Data Provenance: checks provenance (evidence: `src/calculations/ventilation/Ashrae621ZoneService.ts`)
- Zone Ventilation → Production Scope: normalizes addenda (evidence: `src/calculations/ventilation/Ashrae621ZoneService.ts`)
- Zone Ventilation → Validation Logger: reports failures (evidence: `src/calculations/ventilation/Ashrae621ZoneService.ts`)
- Ez Selection → ASHRAE 62.1 2022 Data: reads values (evidence: `src/calculations/ventilation/EzSelectionService.ts`)
- Standard Data Provider → ASHRAE 62.1 2022 Data: provides data (evidence: `src/data/ventilation/StandardDataProvider.ts`)
- Cooling Load Engine → Density Correction: uses (evidence: `src/lib/MechanicalCoolingEngine.ts`)
- Cooling Load Engine → Unit Conversion: converts units (evidence: `src/lib/MechanicalCoolingEngine.ts`)
- Ventilation Engine → Unit Preferences
- Application Shell → Translations: uses language (evidence: `src/App.tsx`)
- Mechanical Workspace → Unit Preferences: uses units (evidence: `src/components/MechanicalCalc.tsx`)
- Application Shell → CSV Export
