# antoinesoros/houserate architecture

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

- Interactive diagram: https://gitdiagram.com/antoinesoros/houserate
- Repository: https://github.com/antoinesoros/houserate

## Overview

HouseRate is a small React app for splitting a house-stay price among occupants according to each occupant’s person-nights. Users configure the stay dates, total price, and occupants, then save the settings and view the resulting per-occupant shares. The router connects the configuration and calculator screens; both use shared data functions, which load and save settings in browser localStorage. The README is empty, so this map reflects the sampled source files and does not assume additional capabilities.

Main entry points: [`src/components/Calculator.jsx`](https://github.com/antoinesoros/houserate/blob/develop/src/components/Calculator.jsx) (Share calculator), [`src/components/Config.jsx`](https://github.com/antoinesoros/houserate/blob/develop/src/components/Config.jsx) (Stay configuration), [`src/App.jsx`](https://github.com/antoinesoros/houserate/blob/develop/src/App.jsx) (App router), [`src/data.js`](https://github.com/antoinesoros/houserate/blob/develop/src/data.js) (Settings data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["App screens"]
  node_router["App router<br/>[App.jsx]"]
  node_calculator["Share calculator<br/>[Calculator.jsx]"]
  node_config["Stay configuration<br/>[Config.jsx]"]
end

subgraph group_domain["Stay and pricing"]
  node_data["Settings data<br/>[data.js]"]
  node_sharecalc["Share calculation<br/>[data.js]"]
end

subgraph group_persistence["Browser persistence"]
  node_browserstore[("localStorage")]
end

node_user(("User"))
node_entry["React entry<br/>[main.jsx]"]

node_entry -->|"mounts"| node_router
node_router -->|"routes to"| node_calculator
node_router -->|"routes to"| node_config
node_user -->|"views and uses"| node_calculator
node_user -->|"edits settings"| node_config
node_calculator -->|"loads settings"| node_data
node_calculator -->|"calculates shares"| node_sharecalc
node_config -->|"loads and saves"| node_data
node_config -->|"previews shares"| node_sharecalc
node_data -->|"reads and writes"| node_browserstore

click node_entry "https://github.com/antoinesoros/houserate/blob/develop/src/main.jsx"
click node_router "https://github.com/antoinesoros/houserate/blob/develop/src/App.jsx"
click node_calculator "https://github.com/antoinesoros/houserate/blob/develop/src/components/Calculator.jsx"
click node_config "https://github.com/antoinesoros/houserate/blob/develop/src/components/Config.jsx"
click node_data "https://github.com/antoinesoros/houserate/blob/develop/src/data.js"
click node_sharecalc "https://github.com/antoinesoros/houserate/blob/develop/src/data.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_router,node_calculator,node_config,node_user toneBlue
class node_data,node_sharecalc toneAmber
class node_browserstore toneMint
class node_entry toneTeal
```

## Components

### App screens

- [App router](https://github.com/antoinesoros/houserate/blob/develop/src/App.jsx): `src/App.jsx`
- [Share calculator](https://github.com/antoinesoros/houserate/blob/develop/src/components/Calculator.jsx): `src/components/Calculator.jsx`
- [Stay configuration](https://github.com/antoinesoros/houserate/blob/develop/src/components/Config.jsx): `src/components/Config.jsx`

### Stay and pricing

- [Settings data](https://github.com/antoinesoros/houserate/blob/develop/src/data.js): `src/data.js`
- [Share calculation](https://github.com/antoinesoros/houserate/blob/develop/src/data.js): `src/data.js`

### Browser persistence

- **localStorage**

### Other components

- **User**
- [React entry](https://github.com/antoinesoros/houserate/blob/develop/src/main.jsx): `src/main.jsx`

## Connections

- React entry → App router: mounts
- App router → Share calculator: routes to
- App router → Stay configuration: routes to
- User → Share calculator: views and uses
- User → Stay configuration: edits settings
- Share calculator → Settings data: loads settings
- Share calculator → Share calculation: calculates shares
- Stay configuration → Settings data: loads and saves
- Stay configuration → Share calculation: previews shares
- Settings data → localStorage: reads and writes
