# mhaseebmohal/structural-frame-analysis architecture

> Architecture diagram of the GitHub repository mhaseebmohal/structural-frame-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mhaseebmohal/structural-frame-analysis
- Repository: https://github.com/mhaseebmohal/structural-frame-analysis

## Overview

Structural Analyser is a browser-based 2D/3D structural frame modeller, solver, and design tool. Users create or edit a frame, assign sections and loads, run linear or advanced analysis, review member results and design checks, then export a report or model. Its main stages are model authoring, FEM analysis, code/design evaluation, and results exchange. The README documents the broad application wiring; source excerpts confirm worker dispatch and its solver dependencies. Other links below rely on README statements, so unsampled implementation details are not asserted.

Main entry points: [`js/app.js`](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/app.js) (Application UI), [`js/workers/solver.worker.js`](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/workers/solver.worker.js) (Solver worker), [`js/features/frame_sections.js`](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/frame_sections.js) (Frame sections), [`js/core/generators.js`](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/core/generators.js) (Structure generators)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Model authoring"]
  node_app["Application UI<br/>[app.js]"]
  node_generators["Structure generators<br/>[generators.js]"]
  node_selection["Model editing<br/>[selection.js]"]
  node_sections["Frame sections<br/>[frame_sections.js]"]
end

subgraph group_analysis["Structural analysis"]
  node_worker["Solver worker<br/>[solver.worker.js]"]
  node_solver2d["2D FEM solver<br/>[solver.js]"]
  node_solver3d["3D FEM solver<br/>[solver3d.js]"]
  node_pdelta["P-Delta analysis<br/>[pdelta.js]"]
  node_modes["Modal analysis<br/>[modes.js]"]
  node_spectrum["Response spectrum<br/>[spectrum.js]"]
end

subgraph group_design["Design checks"]
  node_combos["Load combinations"]
  node_aci["ACI design checks<br/>[aci_checks.js]"]
  node_ecchecks["EC member checks<br/>[checks.js]"]
  node_rcdesign["RC section design<br/>[rc_design.js]"]
  node_foundation["Foundation design<br/>[foundation.js]"]
  node_codechapters["Code chapters<br/>[ch3-flexure.js]"]
end

subgraph group_results["Results and exchange"]
  node_report["Analysis reports<br/>[report.js]"]
  node_fileio["Model import export<br/>[fileio.js]"]
  node_db[("IndexedDB cache<br/>[indexeddb.js]")]
end

subgraph group_engineering["Engineering tools"]
  node_sectionprops["Section properties<br/>[section_props.js]"]
  node_beamformulas["Beam formulas<br/>[beam_formulas.js]"]
  node_compound["Compound sections"]
  node_formulas["Formula library<br/>[formula_library.js]"]
  node_view3d["3D view<br/>[view3d.js]"]
  node_extrude["Solid extrusion<br/>[extrude.js]"]
  node_units["Unit conversion<br/>[units.js]"]
end

node_engineer(("Engineer"))

node_engineer -->|"models in"| node_app
node_app -->|"uses templates"| node_generators
node_app -->|"enables edits"| node_selection
node_app -->|"opens section editor"| node_sections
node_app -->|"dispatches solves"| node_worker
node_worker -->|"invokes"| node_solver2d
node_worker -->|"loads solver"| node_solver3d
node_worker -->|"dispatches P-Delta"| node_pdelta
node_worker -->|"dispatches modes"| node_modes
node_app -->|"runs spectrum analysis"| node_spectrum
node_app -->|"generates combinations"| node_combos
node_app -->|"runs ACI checks"| node_aci
node_app -->|"generates reports"| node_report
node_app -->|"imports and exports"| node_fileio
node_app -->|"uses results cache"| node_db
node_sections -->|"computes properties"| node_sectionprops
node_engineer -->|"uses calculator"| node_beamformulas
node_engineer -->|"builds sections"| node_compound
node_engineer -->|"consults reference"| node_formulas
node_app -->|"provides 3D views"| node_view3d
node_app -->|"renders extrusion"| node_extrude
node_app -->|"switches units"| node_units
node_app -.->|"offers EC checks"| node_ecchecks
node_app -.->|"offers EC2 design"| node_rcdesign
node_app -->|"offers foundation design"| node_foundation
node_app -->|"provides ACI chapters"| node_codechapters

click node_app "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/app.js"
click node_generators "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/core/generators.js"
click node_selection "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/core/selection.js"
click node_sections "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/frame_sections.js"
click node_worker "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/workers/solver.worker.js"
click node_solver2d "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/solver.js"
click node_solver3d "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/solver3d.js"
click node_pdelta "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/pdelta.js"
click node_modes "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/modes.js"
click node_spectrum "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/spectrum.js"
click node_combos "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/load_combos_generator.js"
click node_aci "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/aci_checks.js"
click node_ecchecks "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/checks.js"
click node_rcdesign "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/rc_design.js"
click node_foundation "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/foundation.js"
click node_codechapters "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/aci/ch3-flexure.js"
click node_report "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/report/report.js"
click node_fileio "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/io/fileio.js"
click node_db "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/db/indexeddb.js"
click node_sectionprops "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/section_props.js"
click node_beamformulas "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/beam_formulas.js"
click node_compound "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/compound_section.js"
click node_formulas "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/formula_library.js"
click node_view3d "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/view3d.js"
click node_extrude "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/extrude.js"
click node_units "https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/utils/units.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_generators,node_selection,node_sections toneBlue
class node_worker,node_solver2d,node_solver3d,node_pdelta,node_modes,node_spectrum toneAmber
class node_combos,node_aci,node_ecchecks,node_rcdesign,node_foundation,node_codechapters toneMint
class node_report,node_fileio,node_db toneRose
class node_sectionprops,node_beamformulas,node_compound,node_formulas,node_view3d,node_extrude,node_units,node_engineer toneIndigo
```

## Components

### Model authoring

- [Application UI](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/app.js): `js/app.js`
- [Structure generators](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/core/generators.js): `js/core/generators.js`
- [Model editing](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/core/selection.js): `js/core/selection.js`
- [Frame sections](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/frame_sections.js): `js/features/frame_sections.js`

### Structural analysis

- [Solver worker](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/workers/solver.worker.js): `js/workers/solver.worker.js`
- [2D FEM solver](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/solver.js): `js/solver.js`
- [3D FEM solver](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/solver3d.js): `js/solver3d.js`
- [P-Delta analysis](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/pdelta.js): `js/analysis/pdelta.js`
- [Modal analysis](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/modes.js): `js/analysis/modes.js`
- [Response spectrum](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/analysis/spectrum.js): `js/analysis/spectrum.js`

### Design checks

- [Load combinations](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/load_combos_generator.js): `js/design/load_combos_generator.js`
- [ACI design checks](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/aci_checks.js): `js/design/aci_checks.js`
- [EC member checks](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/checks.js): `js/design/checks.js`
- [RC section design](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/rc_design.js): `js/design/rc_design.js`
- [Foundation design](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/design/foundation.js): `js/design/foundation.js`
- [Code chapters](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/aci/ch3-flexure.js): `js/aci/ch3-flexure.js`

### Results and exchange

- [Analysis reports](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/report/report.js): `js/report/report.js`
- [Model import export](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/io/fileio.js): `js/io/fileio.js`
- [IndexedDB cache](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/db/indexeddb.js): `js/db/indexeddb.js`

### Engineering tools

- [Section properties](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/section_props.js): `js/calc/section_props.js`
- [Beam formulas](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/beam_formulas.js): `js/calc/beam_formulas.js`
- [Compound sections](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/compound_section.js): `js/calc/compound_section.js`
- [Formula library](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/calc/formula_library.js): `js/calc/formula_library.js`
- [3D view](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/view3d.js): `js/features/view3d.js`
- [Solid extrusion](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/features/extrude.js): `js/features/extrude.js`
- [Unit conversion](https://github.com/mhaseebmohal/structural-frame-analysis/blob/main/js/utils/units.js): `js/utils/units.js`

### Other components

- **Engineer**

## Connections

- Engineer → Application UI: models in
- Application UI → Structure generators: uses templates
- Application UI → Model editing: enables edits
- Application UI → Frame sections: opens section editor
- Application UI → Solver worker: dispatches solves
- Solver worker → 2D FEM solver: invokes (evidence: `js/workers/solver.worker.js`)
- Solver worker → 3D FEM solver: loads solver (evidence: `js/workers/solver.worker.js`)
- Solver worker → P-Delta analysis: dispatches P-Delta (evidence: `js/workers/solver.worker.js`)
- Solver worker → Modal analysis: dispatches modes (evidence: `js/workers/solver.worker.js`)
- Application UI → Response spectrum: runs spectrum analysis
- Application UI → Load combinations: generates combinations
- Application UI → ACI design checks: runs ACI checks
- Application UI → Analysis reports: generates reports
- Application UI → Model import export: imports and exports
- Application UI → IndexedDB cache: uses results cache
- Frame sections → Section properties: computes properties
- Engineer → Beam formulas: uses calculator
- Engineer → Compound sections: builds sections
- Engineer → Formula library: consults reference
- Application UI → 3D view: provides 3D views
- Application UI → Solid extrusion: renders extrusion
- Application UI → Unit conversion: switches units
- Application UI → EC member checks: offers EC checks
- Application UI → RC section design: offers EC2 design
- Application UI → Foundation design: offers foundation design
- Application UI → Code chapters: provides ACI chapters
