# lxhungdp/rc-concrete-section architecture

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

- Interactive diagram: https://gitdiagram.com/lxhungdp/rc-concrete-section
- Repository: https://github.com/lxhungdp/rc-concrete-section

## Overview

P-M Column Designer is a browser-based reinforced-concrete cross-section resistance and demand-check application, not a full member-design system. Users configure section geometry, reinforcement, materials, design basis, loadcases, and analysis options; a worker computes resistance surfaces and demand checks, then the results workspace presents plots and audit views, with report and spreadsheet exports. The graph preserves the documented independent stress-strain and equivalent-block methods and report/audit capabilities. Relationships are limited to README statements and shown imports/calls; unsampled subsystem wiring is not inferred.

Main entry points: [`apps/web/features/section-editor/SectionDrawingClient.tsx`](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/SectionDrawingClient.tsx) (Section editor), [`apps/web/workers/pm-analysis.worker.ts`](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/workers/pm-analysis.worker.ts) (Analysis worker), [`apps/web/application/analysis/client.ts`](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/client.ts) (Analysis client), [`apps/web/features/section-editor/results/ResultsWorkspace.tsx`](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/ResultsWorkspace.tsx) (Results workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Project workspace"]
  node_editor["Section editor"]
end

subgraph group_inputs["Section and project inputs"]
  node_geometry["Section geometry<br/>[index.ts]"]
  node_materials["Materials<br/>[MaterialPanel.tsx]"]
  node_project["Project inputs<br/>[validate.ts]"]
  node_geometry_io["Geometry import/export<br/>[section-dxf.ts]"]
  node_project_io["Project workbook<br/>[project-xlsx.ts]"]
  node_analysis_options["Analysis options"]
  node_loadings["Loadcases<br/>[LoadingsPanel.tsx]"]
end

subgraph group_compute["Analysis runtime"]
  node_client["Analysis client<br/>[client.ts]"]
  node_contract["Worker contract<br/>[worker-contract.ts]"]
  node_worker["Analysis worker"]
  node_mesh_view["Mesh presentation"]
end

subgraph group_kernels["Engineering kernels"]
  node_stress["Stress-strain analysis<br/>[index.ts]"]
  node_block["Equivalent-block analysis<br/>[index.ts]"]
  node_design["Design profiles<br/>[index.ts]"]
  node_code_profiles["Code profiles<br/>[index.ts]"]
end

subgraph group_outputs["Results and reporting"]
  node_results["Results workspace"]
  node_section_results["Section results"]
  node_mesh_workspace["Mesh audit view"]
  node_demand["Demand check"]
  node_report["Reports and audits<br/>[index.ts]"]
  node_pdf["PDF report<br/>[column-report.ts]"]
end

node_engineer(("Engineer"))

node_engineer -->|"edits project"| node_editor
node_editor -.->|"defines section"| node_geometry
node_editor -.->|"sets materials"| node_materials
node_editor -.->|"configures project"| node_project
node_editor -->|"exports geometry"| node_geometry_io
node_editor -.->|"exports project"| node_project_io
node_editor -->|"opens options"| node_analysis_options
node_editor -->|"opens loadcases"| node_loadings
node_editor -->|"requests calculations"| node_client
node_client -->|"dispatches jobs"| node_worker
node_client -->|"types requests"| node_contract
node_worker -->|"handles messages"| node_contract
node_worker -->|"prepares analysis"| node_stress
node_worker -->|"prepares block"| node_block
node_worker -->|"builds material sets"| node_design
node_results -->|"requests calculations"| node_client
node_results -.->|"presents results"| node_section_results
node_results -.->|"shows demand checks"| node_demand
node_results -->|"opens mesh audit"| node_mesh_workspace
node_mesh_workspace -->|"requests mesh"| node_client
node_mesh_workspace -->|"renders mesh view"| node_mesh_view
node_worker -->|"builds workbooks"| node_report
node_editor -->|"exports PDF"| node_pdf
node_worker -.->|"supports code routes"| node_code_profiles
node_geometry_io -.->|"transfers geometry"| node_geometry
node_project_io -.->|"transfers project"| node_project
node_worker -.->|"uses section model"| node_geometry

click node_editor "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/SectionDrawingClient.tsx"
click node_geometry "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-geometry/src/index.ts"
click node_materials "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/materials/MaterialPanel.tsx"
click node_project "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-project/src/validate.ts"
click node_geometry_io "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/geometry/section-dxf.ts"
click node_project_io "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/project/project-xlsx.ts"
click node_analysis_options "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/analysis/AnalysisOptionsPanel.tsx"
click node_loadings "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/loadings/LoadingsPanel.tsx"
click node_client "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/client.ts"
click node_contract "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/worker-contract.ts"
click node_worker "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/workers/pm-analysis.worker.ts"
click node_stress "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-analysis/src/index.ts"
click node_block "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-analysis-equivalent-block/src/index.ts"
click node_design "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-design/src/index.ts"
click node_code_profiles "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-code-kds142020/src/index.ts"
click node_mesh_view "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/section-mesh-view.ts"
click node_results "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/ResultsWorkspace.tsx"
click node_section_results "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/SectionResultsPanel.tsx"
click node_mesh_workspace "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx"
click node_demand "https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/DemandCheckPanel.tsx"
click node_report "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-report/src/index.ts"
click node_pdf "https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-report/src/pdf/column-report.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_editor toneBlue
class node_geometry,node_materials,node_project,node_geometry_io,node_project_io,node_analysis_options,node_loadings toneAmber
class node_client,node_contract,node_worker,node_mesh_view toneMint
class node_stress,node_block,node_design,node_code_profiles toneRose
class node_results,node_section_results,node_mesh_workspace,node_demand,node_report,node_pdf,node_engineer toneIndigo
```

## Components

### Project workspace

- [Section editor](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/SectionDrawingClient.tsx): `apps/web/features/section-editor/SectionDrawingClient.tsx`

### Section and project inputs

- [Section geometry](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-geometry/src/index.ts): `packages/pm-geometry/src/index.ts`
- [Materials](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/materials/MaterialPanel.tsx): `apps/web/features/section-editor/materials/MaterialPanel.tsx`
- [Project inputs](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-project/src/validate.ts): `packages/pm-project/src/validate.ts`
- [Geometry import/export](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/geometry/section-dxf.ts): `apps/web/features/section-editor/geometry/section-dxf.ts`
- [Project workbook](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/project/project-xlsx.ts): `apps/web/features/section-editor/project/project-xlsx.ts`
- [Analysis options](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/analysis/AnalysisOptionsPanel.tsx): `apps/web/features/section-editor/analysis/AnalysisOptionsPanel.tsx`
- [Loadcases](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/loadings/LoadingsPanel.tsx): `apps/web/features/section-editor/loadings/LoadingsPanel.tsx`

### Analysis runtime

- [Analysis client](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/client.ts): `apps/web/application/analysis/client.ts`
- [Worker contract](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/worker-contract.ts): `apps/web/application/analysis/worker-contract.ts`
- [Analysis worker](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/workers/pm-analysis.worker.ts): `apps/web/workers/pm-analysis.worker.ts`
- [Mesh presentation](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/application/analysis/section-mesh-view.ts): `apps/web/application/analysis/section-mesh-view.ts`

### Engineering kernels

- [Stress-strain analysis](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-analysis/src/index.ts): `packages/pm-analysis/src/index.ts`
- [Equivalent-block analysis](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-analysis-equivalent-block/src/index.ts): `packages/pm-analysis-equivalent-block/src/index.ts`
- [Design profiles](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-design/src/index.ts): `packages/pm-design/src/index.ts`
- [Code profiles](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-code-kds142020/src/index.ts): `packages/pm-code-kds142020/src/index.ts`

### Results and reporting

- [Results workspace](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/ResultsWorkspace.tsx): `apps/web/features/section-editor/results/ResultsWorkspace.tsx`
- [Section results](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/SectionResultsPanel.tsx): `apps/web/features/section-editor/results/SectionResultsPanel.tsx`
- [Mesh audit view](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx): `apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx`
- [Demand check](https://github.com/lxhungdp/rc-concrete-section/blob/main/apps/web/features/section-editor/results/DemandCheckPanel.tsx): `apps/web/features/section-editor/results/DemandCheckPanel.tsx`
- [Reports and audits](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-report/src/index.ts): `packages/pm-report/src/index.ts`
- [PDF report](https://github.com/lxhungdp/rc-concrete-section/blob/main/packages/pm-report/src/pdf/column-report.ts): `packages/pm-report/src/pdf/column-report.ts`

### Other components

- **Engineer**

## Connections

- Engineer → Section editor: edits project (evidence: `README.md`)
- Section editor → Section geometry: defines section
- Section editor → Materials: sets materials (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Section editor → Project inputs: configures project
- Section editor → Geometry import/export: exports geometry (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Section editor → Project workbook: exports project (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Section editor → Analysis options: opens options (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Section editor → Loadcases: opens loadcases (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Section editor → Analysis client: requests calculations (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Analysis client → Analysis worker: dispatches jobs (evidence: `apps/web/application/analysis/client.ts`)
- Analysis client → Worker contract: types requests (evidence: `apps/web/application/analysis/client.ts`)
- Analysis worker → Worker contract: handles messages (evidence: `apps/web/workers/pm-analysis.worker.ts`)
- Analysis worker → Stress-strain analysis: prepares analysis (evidence: `apps/web/workers/pm-analysis.worker.ts`)
- Analysis worker → Equivalent-block analysis: prepares block (evidence: `apps/web/workers/pm-analysis.worker.ts`)
- Analysis worker → Design profiles: builds material sets (evidence: `apps/web/workers/pm-analysis.worker.ts`)
- Results workspace → Analysis client: requests calculations (evidence: `apps/web/features/section-editor/results/ResultsWorkspace.tsx`)
- Results workspace → Section results: presents results
- Results workspace → Demand check: shows demand checks
- Results workspace → Mesh audit view: opens mesh audit (evidence: `apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx`)
- Mesh audit view → Analysis client: requests mesh (evidence: `apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx`)
- Mesh audit view → Mesh presentation: renders mesh view (evidence: `apps/web/features/section-editor/analysis/AnalysisMeshWorkspace.tsx`)
- Analysis worker → Reports and audits: builds workbooks (evidence: `apps/web/workers/pm-analysis.worker.ts`)
- Section editor → PDF report: exports PDF (evidence: `apps/web/features/section-editor/SectionDrawingClient.tsx`)
- Analysis worker → Code profiles: supports code routes
- Geometry import/export → Section geometry: transfers geometry
- Project workbook → Project inputs: transfers project
- Analysis worker → Section geometry: uses section model
