# a-sg23/minus-size architecture

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

- Interactive diagram: https://gitdiagram.com/a-sg23/minus-size
- Repository: https://github.com/a-sg23/minus-size

## Overview

minus size is a client-side fit-matching app for adults, centered on frame and proportion rather than height. The user enters body measurements, then the App computes a proportion profile and bra and bottoms recommendations, assesses petite frame and height separately, and displays the results in dedicated panels. Other visible product areas include a lookbook, fit records, and trusted-brand information. The graph follows documented and indexed relationships; unsampled wiring is omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/a-sg23/minus-size/blob/main/src/App.tsx) (App router), [`src/components/ProportionPanel.tsx`](https://github.com/a-sg23/minus-size/blob/main/src/components/ProportionPanel.tsx) (Proportion profile), [`src/engine/proportions.ts`](https://github.com/a-sg23/minus-size/blob/main/src/engine/proportions.ts) (Proportion engine), [`src/engine/petite.ts`](https://github.com/a-sg23/minus-size/blob/main/src/engine/petite.ts) (Petite criteria)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App router<br/>[App.tsx]"]
  node_measurements["Measurement form"]
  node_proportion_view["Proportion profile"]
  node_body_diagram["Body diagram<br/>[BodyDiagram.tsx]"]
  node_petite_view["Petite assessment<br/>[PetitePanel.tsx]"]
  node_block_chart["Sizing block chart<br/>[BlockChart.tsx]"]
  node_ratio_chart["Ratio chart<br/>[RatioChart.tsx]"]
  node_bra_view["Bra recommendations<br/>[BraPanel.tsx]"]
  node_bottoms_view["Bottoms recommendations<br/>[BottomsPanel.tsx]"]
  node_lookbook["Lookbook<br/>[Lookbook.tsx]"]
  node_fit_records["Fit records"]
  node_trusted_view["Trusted brands"]
end

subgraph group_analysis["Fit analysis"]
  node_profile_engine["Proportion engine<br/>[proportions.ts]"]
  node_bra_engine["Bra matching<br/>[bra.ts]"]
  node_bottoms_engine["Bottoms matching<br/>[bottoms.ts]"]
  node_petite_engine["Petite criteria<br/>[petite.ts]"]
  node_silhouette_engine["Silhouette geometry<br/>[silhouette.ts]"]
  node_types["Domain types<br/>[types.ts]"]
end

subgraph group_catalog["Local fit data"]
  node_bra_data["Bra brand data<br/>[braBrands.ts]"]
  node_bottom_data["Bottoms brand data<br/>[bottomBrands.ts]"]
  node_records_data["Fit record data<br/>[fitRecords.ts]"]
  node_trusted_data["Trusted brand data<br/>[trustedBrands.ts]"]
  node_lookbook_data["Lookbook data<br/>[lookbook.ts]"]
end

subgraph group_reference["Sizing references"]
  node_reference_data["Population and blocks<br/>[reference.ts]"]
end

node_user(("User"))

node_user -->|"enters measurements"| node_measurements
node_measurements -->|"updates input state"| node_app
node_app -->|"computes profile"| node_profile_engine
node_app -->|"ranks bras"| node_bra_engine
node_app -->|"ranks bottoms"| node_bottoms_engine
node_app -->|"assesses frame"| node_petite_engine
node_profile_engine -->|"uses population stats"| node_reference_data
node_profile_engine -->|"describes height"| node_petite_engine
node_bottoms_engine -->|"uses rise references"| node_reference_data
node_petite_engine -->|"uses cup lettering"| node_bra_engine
node_app -->|"supplies brand catalog"| node_bra_data
node_app -->|"supplies brand catalog"| node_bottom_data
node_app -->|"renders profile"| node_proportion_view
node_app -->|"renders results"| node_bra_view
node_app -->|"renders results"| node_bottoms_view
node_proportion_view -->|"renders"| node_body_diagram
node_proportion_view -->|"renders"| node_petite_view
node_proportion_view -->|"renders"| node_block_chart
node_proportion_view -->|"renders"| node_ratio_chart
node_body_diagram -->|"builds geometry"| node_silhouette_engine
node_fit_records -->|"reads records"| node_records_data
node_trusted_view -->|"reads brand data"| node_trusted_data
node_lookbook -->|"reads entries"| node_lookbook_data
node_bra_engine -->|"uses domain types"| node_types
node_bottoms_engine -->|"uses domain types"| node_types
node_profile_engine -->|"uses domain types"| node_types
node_petite_engine -->|"uses domain types"| node_types

click node_app "https://github.com/a-sg23/minus-size/blob/main/src/App.tsx"
click node_measurements "https://github.com/a-sg23/minus-size/blob/main/src/components/MeasurementForm.tsx"
click node_proportion_view "https://github.com/a-sg23/minus-size/blob/main/src/components/ProportionPanel.tsx"
click node_body_diagram "https://github.com/a-sg23/minus-size/blob/main/src/components/BodyDiagram.tsx"
click node_petite_view "https://github.com/a-sg23/minus-size/blob/main/src/components/PetitePanel.tsx"
click node_block_chart "https://github.com/a-sg23/minus-size/blob/main/src/components/BlockChart.tsx"
click node_ratio_chart "https://github.com/a-sg23/minus-size/blob/main/src/components/RatioChart.tsx"
click node_bra_view "https://github.com/a-sg23/minus-size/blob/main/src/components/BraPanel.tsx"
click node_bottoms_view "https://github.com/a-sg23/minus-size/blob/main/src/components/BottomsPanel.tsx"
click node_lookbook "https://github.com/a-sg23/minus-size/blob/main/src/components/Lookbook.tsx"
click node_fit_records "https://github.com/a-sg23/minus-size/blob/main/src/components/FitRecordsPanel.tsx"
click node_trusted_view "https://github.com/a-sg23/minus-size/blob/main/src/components/TrustedBrandsPanel.tsx"
click node_profile_engine "https://github.com/a-sg23/minus-size/blob/main/src/engine/proportions.ts"
click node_bra_engine "https://github.com/a-sg23/minus-size/blob/main/src/engine/bra.ts"
click node_bottoms_engine "https://github.com/a-sg23/minus-size/blob/main/src/engine/bottoms.ts"
click node_petite_engine "https://github.com/a-sg23/minus-size/blob/main/src/engine/petite.ts"
click node_silhouette_engine "https://github.com/a-sg23/minus-size/blob/main/src/engine/silhouette.ts"
click node_reference_data "https://github.com/a-sg23/minus-size/blob/main/src/engine/reference.ts"
click node_bra_data "https://github.com/a-sg23/minus-size/blob/main/src/data/braBrands.ts"
click node_bottom_data "https://github.com/a-sg23/minus-size/blob/main/src/data/bottomBrands.ts"
click node_records_data "https://github.com/a-sg23/minus-size/blob/main/src/data/fitRecords.ts"
click node_trusted_data "https://github.com/a-sg23/minus-size/blob/main/src/data/trustedBrands.ts"
click node_lookbook_data "https://github.com/a-sg23/minus-size/blob/main/src/data/lookbook.ts"
click node_types "https://github.com/a-sg23/minus-size/blob/main/src/engine/types.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_measurements,node_proportion_view,node_body_diagram,node_petite_view,node_block_chart,node_ratio_chart,node_bra_view,node_bottoms_view,node_lookbook,node_fit_records,node_trusted_view,node_user toneBlue
class node_profile_engine,node_bra_engine,node_bottoms_engine,node_petite_engine,node_silhouette_engine,node_types toneAmber
class node_bra_data,node_bottom_data,node_records_data,node_trusted_data,node_lookbook_data toneMint
class node_reference_data toneRose
```

## Components

### App experience

- [App router](https://github.com/a-sg23/minus-size/blob/main/src/App.tsx): `src/App.tsx`
- [Measurement form](https://github.com/a-sg23/minus-size/blob/main/src/components/MeasurementForm.tsx): `src/components/MeasurementForm.tsx`
- [Proportion profile](https://github.com/a-sg23/minus-size/blob/main/src/components/ProportionPanel.tsx): `src/components/ProportionPanel.tsx`
- [Body diagram](https://github.com/a-sg23/minus-size/blob/main/src/components/BodyDiagram.tsx): `src/components/BodyDiagram.tsx`
- [Petite assessment](https://github.com/a-sg23/minus-size/blob/main/src/components/PetitePanel.tsx): `src/components/PetitePanel.tsx`
- [Sizing block chart](https://github.com/a-sg23/minus-size/blob/main/src/components/BlockChart.tsx): `src/components/BlockChart.tsx`
- [Ratio chart](https://github.com/a-sg23/minus-size/blob/main/src/components/RatioChart.tsx): `src/components/RatioChart.tsx`
- [Bra recommendations](https://github.com/a-sg23/minus-size/blob/main/src/components/BraPanel.tsx): `src/components/BraPanel.tsx`
- [Bottoms recommendations](https://github.com/a-sg23/minus-size/blob/main/src/components/BottomsPanel.tsx): `src/components/BottomsPanel.tsx`
- [Lookbook](https://github.com/a-sg23/minus-size/blob/main/src/components/Lookbook.tsx): `src/components/Lookbook.tsx`
- [Fit records](https://github.com/a-sg23/minus-size/blob/main/src/components/FitRecordsPanel.tsx): `src/components/FitRecordsPanel.tsx`
- [Trusted brands](https://github.com/a-sg23/minus-size/blob/main/src/components/TrustedBrandsPanel.tsx): `src/components/TrustedBrandsPanel.tsx`

### Fit analysis

- [Proportion engine](https://github.com/a-sg23/minus-size/blob/main/src/engine/proportions.ts): `src/engine/proportions.ts`
- [Bra matching](https://github.com/a-sg23/minus-size/blob/main/src/engine/bra.ts): `src/engine/bra.ts`
- [Bottoms matching](https://github.com/a-sg23/minus-size/blob/main/src/engine/bottoms.ts): `src/engine/bottoms.ts`
- [Petite criteria](https://github.com/a-sg23/minus-size/blob/main/src/engine/petite.ts): `src/engine/petite.ts`
- [Silhouette geometry](https://github.com/a-sg23/minus-size/blob/main/src/engine/silhouette.ts): `src/engine/silhouette.ts`
- [Domain types](https://github.com/a-sg23/minus-size/blob/main/src/engine/types.ts): `src/engine/types.ts`

### Local fit data

- [Bra brand data](https://github.com/a-sg23/minus-size/blob/main/src/data/braBrands.ts): `src/data/braBrands.ts`
- [Bottoms brand data](https://github.com/a-sg23/minus-size/blob/main/src/data/bottomBrands.ts): `src/data/bottomBrands.ts`
- [Fit record data](https://github.com/a-sg23/minus-size/blob/main/src/data/fitRecords.ts): `src/data/fitRecords.ts`
- [Trusted brand data](https://github.com/a-sg23/minus-size/blob/main/src/data/trustedBrands.ts): `src/data/trustedBrands.ts`
- [Lookbook data](https://github.com/a-sg23/minus-size/blob/main/src/data/lookbook.ts): `src/data/lookbook.ts`

### Sizing references

- [Population and blocks](https://github.com/a-sg23/minus-size/blob/main/src/engine/reference.ts): `src/engine/reference.ts`

### Other components

- **User**

## Connections

- User → Measurement form: enters measurements (evidence: `src/components/MeasurementForm.tsx`)
- Measurement form → App router: updates input state (evidence: `src/App.tsx`)
- App router → Proportion engine: computes profile (evidence: `src/App.tsx`)
- App router → Bra matching: ranks bras (evidence: `src/App.tsx`)
- App router → Bottoms matching: ranks bottoms (evidence: `src/App.tsx`)
- App router → Petite criteria: assesses frame (evidence: `src/App.tsx`)
- Proportion engine → Population and blocks: uses population stats (evidence: `src/engine/proportions.ts`)
- Proportion engine → Petite criteria: describes height (evidence: `src/engine/proportions.ts`)
- Bottoms matching → Population and blocks: uses rise references (evidence: `src/engine/bottoms.ts`)
- Petite criteria → Bra matching: uses cup lettering (evidence: `src/engine/petite.ts`)
- App router → Bra brand data: supplies brand catalog (evidence: `src/App.tsx`)
- App router → Bottoms brand data: supplies brand catalog (evidence: `src/App.tsx`)
- App router → Proportion profile: renders profile (evidence: `src/App.tsx`)
- App router → Bra recommendations: renders results (evidence: `src/App.tsx`)
- App router → Bottoms recommendations: renders results (evidence: `src/App.tsx`)
- Proportion profile → Body diagram: renders (evidence: `src/components/ProportionPanel.tsx`)
- Proportion profile → Petite assessment: renders (evidence: `src/components/ProportionPanel.tsx`)
- Proportion profile → Sizing block chart: renders (evidence: `src/components/ProportionPanel.tsx`)
- Proportion profile → Ratio chart: renders (evidence: `src/components/ProportionPanel.tsx`)
- Body diagram → Silhouette geometry: builds geometry (evidence: `src/components/BodyDiagram.tsx`)
- Fit records → Fit record data: reads records (evidence: `src/components/FitRecordsPanel.tsx`)
- Trusted brands → Trusted brand data: reads brand data (evidence: `src/components/TrustedBrandsPanel.tsx`)
- Lookbook → Lookbook data: reads entries (evidence: `src/components/Lookbook.tsx`)
- Bra matching → Domain types: uses domain types (evidence: `src/engine/bra.ts`)
- Bottoms matching → Domain types: uses domain types (evidence: `src/engine/bottoms.ts`)
- Proportion engine → Domain types: uses domain types (evidence: `src/engine/proportions.ts`)
- Petite criteria → Domain types: uses domain types (evidence: `src/engine/petite.ts`)
