# srinath-205/structureai architecture

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

- Interactive diagram: https://gitdiagram.com/srinath-205/structureai
- Repository: https://github.com/srinath-205/structureai

## Overview

This is a browser-based structural steel base-plate design application. An engineer enters project, code, loading, column, plate, concrete, and anchor details through a staged workflow; optional text parsing can populate design inputs. The calculation step evaluates design checks, and the results step presents checks and a diagram and supports report export. The graph shows the workflow and sampled calculation calls; several input pages and calculation modules are represented from the tree and SOURCE INDEX, so their internal behavior is not inferred.

Main entry points: [`src/pages/Index.tsx`](https://github.com/srinath-205/structureai/blob/main/src/pages/Index.tsx) (Workflow selector), [`src/stores/designStore.ts`](https://github.com/srinath-205/structureai/blob/main/src/stores/designStore.ts) (Design state), [`src/lib/calculations/index.ts`](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/index.ts) (Calculation dispatch), [`src/pages/StepCalculate.tsx`](https://github.com/srinath-205/structureai/blob/main/src/pages/StepCalculate.tsx) (Run calculations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Design workflow"]
  node_workflow["Workflow selector<br/>[Index.tsx]"]
  node_project["Project setup<br/>[StepProject.tsx]"]
  node_code["Design code<br/>[StepDesignCode.tsx]"]
  node_nlp["Text input<br/>[StepNLP.tsx]"]
  node_parser["Input parser<br/>[parser.ts]"]
  node_loads["Load inputs<br/>[StepLoads.tsx]"]
  node_column["Column inputs<br/>[StepColumn.tsx]"]
  node_plate["Base-plate inputs<br/>[StepBasePlate.tsx]"]
  node_concrete["Concrete inputs<br/>[StepConcrete.tsx]"]
  node_anchors["Anchor inputs<br/>[StepAnchors.tsx]"]
  node_state["Design state<br/>[designStore.ts]"]
  node_calculatepage["Run calculations<br/>[StepCalculate.tsx]"]
end

subgraph group_engineering["Engineering calculations"]
  node_sectionlib[("Section library<br/>[aisc-sections.ts]")]
  node_calculate["Calculation dispatch<br/>[index.ts]"]
  node_loadcalc["Load checks<br/>[load.ts]"]
  node_bearing["Bearing checks<br/>[bearing.ts]"]
  node_basecalc["Plate checks<br/>[baseplate.ts]"]
  node_anchorcalc["Anchor checks<br/>[anchors.ts]"]
  node_weld["Weld checks<br/>[weld.ts]"]
  node_otherchecks["Supplemental checks"]
end

subgraph group_results["Results and records"]
  node_results["Design results<br/>[StepResults.tsx]"]
  node_diagram["Plate diagram"]
  node_report["Report generator<br/>[generator.ts]"]
  node_history["Calculation history"]
end

subgraph group_interface["Application interface"]
  node_app["App routing<br/>[App.tsx]"]
  node_layout["App layout<br/>[AppLayout.tsx]"]
end

node_engineer(("Engineer"))

node_engineer -->|"opens application"| node_app
node_app -->|"routes to"| node_workflow
node_workflow -->|"selects step"| node_project
node_workflow -->|"selects step"| node_code
node_workflow -->|"selects step"| node_nlp
node_workflow -->|"selects step"| node_loads
node_workflow -->|"selects step"| node_column
node_workflow -->|"selects step"| node_plate
node_workflow -->|"selects step"| node_concrete
node_workflow -->|"selects step"| node_anchors
node_workflow -->|"selects step"| node_calculatepage
node_workflow -->|"selects step"| node_results
node_nlp -->|"parses text"| node_parser
node_parser -->|"looks up sections"| node_sectionlib
node_column -->|"offers section library"| node_sectionlib
node_project -.->|"updates inputs"| node_state
node_code -.->|"updates inputs"| node_state
node_nlp -->|"updates inputs"| node_state
node_loads -->|"updates inputs"| node_state
node_column -->|"updates inputs"| node_state
node_plate -.->|"updates inputs"| node_state
node_concrete -.->|"updates inputs"| node_state
node_anchors -->|"updates inputs"| node_state
node_calculatepage -->|"reads inputs"| node_state
node_calculatepage -->|"runs checks"| node_calculate
node_calculate -->|"calls checks"| node_loadcalc
node_calculate -->|"calls checks"| node_bearing
node_calculate -->|"calls checks"| node_basecalc
node_calculate -->|"calls checks"| node_anchorcalc
node_calculate -->|"dispatches checks"| node_weld
node_calculate -->|"dispatches checks"| node_otherchecks
node_calculatepage -->|"stores results"| node_state
node_results -->|"reads results"| node_state
node_results -->|"renders diagram"| node_diagram
node_results -->|"exports report"| node_report
node_layout -->|"renders history"| node_history
node_history -->|"reads history"| node_state
node_workflow -->|"renders within"| node_layout

click node_app "https://github.com/srinath-205/structureai/blob/main/src/App.tsx"
click node_workflow "https://github.com/srinath-205/structureai/blob/main/src/pages/Index.tsx"
click node_project "https://github.com/srinath-205/structureai/blob/main/src/pages/StepProject.tsx"
click node_code "https://github.com/srinath-205/structureai/blob/main/src/pages/StepDesignCode.tsx"
click node_nlp "https://github.com/srinath-205/structureai/blob/main/src/pages/StepNLP.tsx"
click node_parser "https://github.com/srinath-205/structureai/blob/main/src/lib/nlp/parser.ts"
click node_loads "https://github.com/srinath-205/structureai/blob/main/src/pages/StepLoads.tsx"
click node_column "https://github.com/srinath-205/structureai/blob/main/src/pages/StepColumn.tsx"
click node_sectionlib "https://github.com/srinath-205/structureai/blob/main/src/lib/sections/aisc-sections.ts"
click node_plate "https://github.com/srinath-205/structureai/blob/main/src/pages/StepBasePlate.tsx"
click node_concrete "https://github.com/srinath-205/structureai/blob/main/src/pages/StepConcrete.tsx"
click node_anchors "https://github.com/srinath-205/structureai/blob/main/src/pages/StepAnchors.tsx"
click node_state "https://github.com/srinath-205/structureai/blob/main/src/stores/designStore.ts"
click node_calculate "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/index.ts"
click node_loadcalc "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/load.ts"
click node_bearing "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/bearing.ts"
click node_basecalc "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/baseplate.ts"
click node_anchorcalc "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/anchors.ts"
click node_weld "https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/weld.ts"
click node_otherchecks "https://github.com/srinath-205/structureai/tree/main/src/lib/calculations"
click node_calculatepage "https://github.com/srinath-205/structureai/blob/main/src/pages/StepCalculate.tsx"
click node_results "https://github.com/srinath-205/structureai/blob/main/src/pages/StepResults.tsx"
click node_diagram "https://github.com/srinath-205/structureai/blob/main/src/components/features/BasePlateDiagram.tsx"
click node_report "https://github.com/srinath-205/structureai/blob/main/src/lib/report/generator.ts"
click node_history "https://github.com/srinath-205/structureai/blob/main/src/components/features/CalculationHistory.tsx"
click node_layout "https://github.com/srinath-205/structureai/blob/main/src/components/layout/AppLayout.tsx"

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_workflow,node_project,node_code,node_nlp,node_parser,node_loads,node_column,node_plate,node_concrete,node_anchors,node_state,node_calculatepage toneBlue
class node_sectionlib,node_calculate,node_loadcalc,node_bearing,node_basecalc,node_anchorcalc,node_weld,node_otherchecks toneAmber
class node_results,node_diagram,node_report,node_history toneMint
class node_app,node_layout toneRose
class node_engineer toneIndigo
```

## Components

### Design workflow

- [Workflow selector](https://github.com/srinath-205/structureai/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Project setup](https://github.com/srinath-205/structureai/blob/main/src/pages/StepProject.tsx): `src/pages/StepProject.tsx`
- [Design code](https://github.com/srinath-205/structureai/blob/main/src/pages/StepDesignCode.tsx): `src/pages/StepDesignCode.tsx`
- [Text input](https://github.com/srinath-205/structureai/blob/main/src/pages/StepNLP.tsx): `src/pages/StepNLP.tsx`
- [Input parser](https://github.com/srinath-205/structureai/blob/main/src/lib/nlp/parser.ts): `src/lib/nlp/parser.ts`
- [Load inputs](https://github.com/srinath-205/structureai/blob/main/src/pages/StepLoads.tsx): `src/pages/StepLoads.tsx`
- [Column inputs](https://github.com/srinath-205/structureai/blob/main/src/pages/StepColumn.tsx): `src/pages/StepColumn.tsx`
- [Base-plate inputs](https://github.com/srinath-205/structureai/blob/main/src/pages/StepBasePlate.tsx): `src/pages/StepBasePlate.tsx`
- [Concrete inputs](https://github.com/srinath-205/structureai/blob/main/src/pages/StepConcrete.tsx): `src/pages/StepConcrete.tsx`
- [Anchor inputs](https://github.com/srinath-205/structureai/blob/main/src/pages/StepAnchors.tsx): `src/pages/StepAnchors.tsx`
- [Design state](https://github.com/srinath-205/structureai/blob/main/src/stores/designStore.ts): `src/stores/designStore.ts`
- [Run calculations](https://github.com/srinath-205/structureai/blob/main/src/pages/StepCalculate.tsx): `src/pages/StepCalculate.tsx`

### Engineering calculations

- [Section library](https://github.com/srinath-205/structureai/blob/main/src/lib/sections/aisc-sections.ts): `src/lib/sections/aisc-sections.ts`
- [Calculation dispatch](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/index.ts): `src/lib/calculations/index.ts`
- [Load checks](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/load.ts): `src/lib/calculations/load.ts`
- [Bearing checks](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/bearing.ts): `src/lib/calculations/bearing.ts`
- [Plate checks](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/baseplate.ts): `src/lib/calculations/baseplate.ts`
- [Anchor checks](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/anchors.ts): `src/lib/calculations/anchors.ts`
- [Weld checks](https://github.com/srinath-205/structureai/blob/main/src/lib/calculations/weld.ts): `src/lib/calculations/weld.ts`
- [Supplemental checks](https://github.com/srinath-205/structureai/tree/main/src/lib/calculations): `src/lib/calculations`

### Results and records

- [Design results](https://github.com/srinath-205/structureai/blob/main/src/pages/StepResults.tsx): `src/pages/StepResults.tsx`
- [Plate diagram](https://github.com/srinath-205/structureai/blob/main/src/components/features/BasePlateDiagram.tsx): `src/components/features/BasePlateDiagram.tsx`
- [Report generator](https://github.com/srinath-205/structureai/blob/main/src/lib/report/generator.ts): `src/lib/report/generator.ts`
- [Calculation history](https://github.com/srinath-205/structureai/blob/main/src/components/features/CalculationHistory.tsx): `src/components/features/CalculationHistory.tsx`

### Application interface

- [App routing](https://github.com/srinath-205/structureai/blob/main/src/App.tsx): `src/App.tsx`
- [App layout](https://github.com/srinath-205/structureai/blob/main/src/components/layout/AppLayout.tsx): `src/components/layout/AppLayout.tsx`

### Other components

- **Engineer**

## Connections

- Engineer → App routing: opens application
- App routing → Workflow selector: routes to (evidence: `src/App.tsx`)
- Workflow selector → Project setup: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Design code: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Text input: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Load inputs: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Column inputs: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Base-plate inputs: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Concrete inputs: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Anchor inputs: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Run calculations: selects step (evidence: `src/pages/Index.tsx`)
- Workflow selector → Design results: selects step (evidence: `src/pages/Index.tsx`)
- Text input → Input parser: parses text (evidence: `src/pages/StepNLP.tsx`)
- Input parser → Section library: looks up sections (evidence: `src/lib/nlp/parser.ts`)
- Column inputs → Section library: offers section library (evidence: `src/pages/StepColumn.tsx`)
- Project setup → Design state: updates inputs
- Design code → Design state: updates inputs
- Text input → Design state: updates inputs (evidence: `src/pages/StepNLP.tsx`)
- Load inputs → Design state: updates inputs (evidence: `src/pages/StepLoads.tsx`)
- Column inputs → Design state: updates inputs (evidence: `src/pages/StepColumn.tsx`)
- Base-plate inputs → Design state: updates inputs
- Concrete inputs → Design state: updates inputs
- Anchor inputs → Design state: updates inputs (evidence: `src/pages/StepAnchors.tsx`)
- Run calculations → Design state: reads inputs (evidence: `src/pages/StepCalculate.tsx`)
- Run calculations → Calculation dispatch: runs checks (evidence: `src/pages/StepCalculate.tsx`)
- Calculation dispatch → Load checks: calls checks (evidence: `src/lib/calculations/index.ts`)
- Calculation dispatch → Bearing checks: calls checks (evidence: `src/lib/calculations/index.ts`)
- Calculation dispatch → Plate checks: calls checks (evidence: `src/lib/calculations/index.ts`)
- Calculation dispatch → Anchor checks: calls checks (evidence: `src/lib/calculations/index.ts`)
- Calculation dispatch → Weld checks: dispatches checks (evidence: `src/lib/calculations/index.ts`)
- Calculation dispatch → Supplemental checks: dispatches checks (evidence: `src/lib/calculations/index.ts`)
- Run calculations → Design state: stores results (evidence: `src/pages/StepCalculate.tsx`)
- Design results → Design state: reads results (evidence: `src/pages/StepResults.tsx`)
- Design results → Plate diagram: renders diagram (evidence: `src/pages/StepResults.tsx`)
- Design results → Report generator: exports report (evidence: `src/pages/StepResults.tsx`)
- App layout → Calculation history: renders history (evidence: `src/components/layout/AppLayout.tsx`)
- Calculation history → Design state: reads history (evidence: `src/components/features/CalculationHistory.tsx`)
- Workflow selector → App layout: renders within (evidence: `src/pages/Index.tsx`)
