# jx273/simepark architecture

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

- Interactive diagram: https://gitdiagram.com/jx273/simepark
- Repository: https://github.com/jx273/simepark

## Overview

SimePark is a browser-based Malaysian home-affordability estimator and property explorer. Users enter household finances and preferences; the app estimates borrowing capacity, enriches local property listings with payment and match calculations, and presents filterable matches with detail views. The internal calculation layer separates DSR and mortgage math from affordability orchestration and property scoring. The README is empty, so capabilities and relationships here are based on the source index and shown excerpts; unsampled UI details are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/jx273/simepark/blob/main/src/App.tsx) (App coordinator), [`src/utils/mortgage.ts`](https://github.com/jx273/simepark/blob/main/src/utils/mortgage.ts) (Mortgage calculations), [`src/utils/propertyFilter.ts`](https://github.com/jx273/simepark/blob/main/src/utils/propertyFilter.ts) (Property scoring and filters), [`src/components/PropertyExplorer.tsx`](https://github.com/jx273/simepark/blob/main/src/components/PropertyExplorer.tsx) (Property explorer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_header["Navigation header<br/>[Header.tsx]"]
  node_hero["Landing hero<br/>[Hero.tsx]"]
  node_form["Finance form"]
  node_results["Affordability results"]
  node_explorer["Property explorer"]
  node_card["Property card<br/>[PropertyCard.tsx]"]
  node_modal["Property details<br/>[PropertyModal.tsx]"]
  node_how["How it works<br/>[HowItWorks.tsx]"]
  node_footer["Page footer<br/>[Footer.tsx]"]
end

subgraph group_domain["Affordability calculations"]
  node_affordability["Affordability engine<br/>[affordability.ts]"]
  node_dsr["DSR calculations<br/>[dsr.ts]"]
  node_mortgage["Mortgage calculations<br/>[mortgage.ts]"]
  node_afftypes["Affordability models<br/>[affordability.ts]"]
end

subgraph group_catalog["Property matching"]
  node_propertytypes["Property models<br/>[property.ts]"]
  node_listings["Local listings<br/>[properties.json]"]
  node_matching["Property scoring and filters<br/>[propertyFilter.ts]"]
end

node_user(("Home seeker"))

node_user -->|"enters finances"| node_form
node_form -->|"submits inputs"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_hero
node_app -->|"renders"| node_form
node_app -->|"renders results"| node_results
node_app -->|"renders matches"| node_explorer
node_app -->|"renders"| node_how
node_app -->|"renders"| node_footer
node_app -->|"renders selection"| node_modal
node_app -->|"calculates results"| node_affordability
node_app -->|"enriches listings"| node_matching
node_app -->|"loads data"| node_listings
node_affordability -->|"uses DSR math"| node_dsr
node_affordability -->|"computes loan limit"| node_mortgage
node_matching -->|"computes property DSR"| node_dsr
node_matching -->|"computes payments"| node_mortgage
node_explorer -->|"filters and sorts"| node_matching
node_explorer -->|"renders listings"| node_card
node_card -->|"selects property"| node_app
node_results -->|"formats amounts"| node_mortgage
node_card -->|"formats amounts"| node_mortgage
node_modal -->|"formats amounts"| node_mortgage

click node_app "https://github.com/jx273/simepark/blob/main/src/App.tsx"
click node_header "https://github.com/jx273/simepark/blob/main/src/components/Header.tsx"
click node_hero "https://github.com/jx273/simepark/blob/main/src/components/Hero.tsx"
click node_form "https://github.com/jx273/simepark/blob/main/src/components/AffordabilityForm.tsx"
click node_results "https://github.com/jx273/simepark/blob/main/src/components/AffordabilityResults.tsx"
click node_explorer "https://github.com/jx273/simepark/blob/main/src/components/PropertyExplorer.tsx"
click node_card "https://github.com/jx273/simepark/blob/main/src/components/PropertyCard.tsx"
click node_modal "https://github.com/jx273/simepark/blob/main/src/components/PropertyModal.tsx"
click node_how "https://github.com/jx273/simepark/blob/main/src/components/HowItWorks.tsx"
click node_footer "https://github.com/jx273/simepark/blob/main/src/components/Footer.tsx"
click node_affordability "https://github.com/jx273/simepark/blob/main/src/utils/affordability.ts"
click node_dsr "https://github.com/jx273/simepark/blob/main/src/utils/dsr.ts"
click node_mortgage "https://github.com/jx273/simepark/blob/main/src/utils/mortgage.ts"
click node_afftypes "https://github.com/jx273/simepark/blob/main/src/types/affordability.ts"
click node_propertytypes "https://github.com/jx273/simepark/blob/main/src/types/property.ts"
click node_listings "https://github.com/jx273/simepark/blob/main/src/data/properties.json"
click node_matching "https://github.com/jx273/simepark/blob/main/src/utils/propertyFilter.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_header,node_hero,node_form,node_results,node_explorer,node_card,node_modal,node_how,node_footer toneBlue
class node_affordability,node_dsr,node_mortgage,node_afftypes toneAmber
class node_propertytypes,node_listings,node_matching toneMint
class node_user toneIndigo
```

## Components

### User experience

- [App coordinator](https://github.com/jx273/simepark/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation header](https://github.com/jx273/simepark/blob/main/src/components/Header.tsx): `src/components/Header.tsx`
- [Landing hero](https://github.com/jx273/simepark/blob/main/src/components/Hero.tsx): `src/components/Hero.tsx`
- [Finance form](https://github.com/jx273/simepark/blob/main/src/components/AffordabilityForm.tsx): `src/components/AffordabilityForm.tsx`
- [Affordability results](https://github.com/jx273/simepark/blob/main/src/components/AffordabilityResults.tsx): `src/components/AffordabilityResults.tsx`
- [Property explorer](https://github.com/jx273/simepark/blob/main/src/components/PropertyExplorer.tsx): `src/components/PropertyExplorer.tsx`
- [Property card](https://github.com/jx273/simepark/blob/main/src/components/PropertyCard.tsx): `src/components/PropertyCard.tsx`
- [Property details](https://github.com/jx273/simepark/blob/main/src/components/PropertyModal.tsx): `src/components/PropertyModal.tsx`
- [How it works](https://github.com/jx273/simepark/blob/main/src/components/HowItWorks.tsx): `src/components/HowItWorks.tsx`
- [Page footer](https://github.com/jx273/simepark/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Affordability calculations

- [Affordability engine](https://github.com/jx273/simepark/blob/main/src/utils/affordability.ts): `src/utils/affordability.ts`
- [DSR calculations](https://github.com/jx273/simepark/blob/main/src/utils/dsr.ts): `src/utils/dsr.ts`
- [Mortgage calculations](https://github.com/jx273/simepark/blob/main/src/utils/mortgage.ts): `src/utils/mortgage.ts`
- [Affordability models](https://github.com/jx273/simepark/blob/main/src/types/affordability.ts): `src/types/affordability.ts`

### Property matching

- [Property models](https://github.com/jx273/simepark/blob/main/src/types/property.ts): `src/types/property.ts`
- [Local listings](https://github.com/jx273/simepark/blob/main/src/data/properties.json): `src/data/properties.json`
- [Property scoring and filters](https://github.com/jx273/simepark/blob/main/src/utils/propertyFilter.ts): `src/utils/propertyFilter.ts`

### Other components

- **Home seeker**

## Connections

- Home seeker → Finance form: enters finances (evidence: `src/components/AffordabilityForm.tsx`)
- Finance form → App coordinator: submits inputs (evidence: `src/App.tsx`)
- App coordinator → Navigation header: renders (evidence: `src/App.tsx`)
- App coordinator → Landing hero: renders (evidence: `src/App.tsx`)
- App coordinator → Finance form: renders (evidence: `src/App.tsx`)
- App coordinator → Affordability results: renders results (evidence: `src/App.tsx`)
- App coordinator → Property explorer: renders matches (evidence: `src/App.tsx`)
- App coordinator → How it works: renders (evidence: `src/App.tsx`)
- App coordinator → Page footer: renders (evidence: `src/App.tsx`)
- App coordinator → Property details: renders selection (evidence: `src/App.tsx`)
- App coordinator → Affordability engine: calculates results (evidence: `src/App.tsx`)
- App coordinator → Property scoring and filters: enriches listings (evidence: `src/App.tsx`)
- App coordinator → Local listings: loads data (evidence: `src/App.tsx`)
- Affordability engine → DSR calculations: uses DSR math (evidence: `src/utils/affordability.ts`)
- Affordability engine → Mortgage calculations: computes loan limit (evidence: `src/utils/affordability.ts`)
- Property scoring and filters → DSR calculations: computes property DSR (evidence: `src/utils/propertyFilter.ts`)
- Property scoring and filters → Mortgage calculations: computes payments (evidence: `src/utils/propertyFilter.ts`)
- Property explorer → Property scoring and filters: filters and sorts (evidence: `src/components/PropertyExplorer.tsx`)
- Property explorer → Property card: renders listings (evidence: `src/components/PropertyExplorer.tsx`)
- Property card → App coordinator: selects property (evidence: `src/components/PropertyCard.tsx`)
- Affordability results → Mortgage calculations: formats amounts (evidence: `src/components/AffordabilityResults.tsx`)
- Property card → Mortgage calculations: formats amounts (evidence: `src/components/PropertyCard.tsx`)
- Property details → Mortgage calculations: formats amounts (evidence: `src/components/PropertyModal.tsx`)
