# lumanodestudios/lns_housing architecture

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

- Interactive diagram: https://gitdiagram.com/lumanodestudios/lns_housing
- Repository: https://github.com/lumanodestudios/lns_housing

## Overview

LNS Housing is a FiveM housing and real-estate resource with a React NUI. A player or staff member initiates housing actions in-game; the UI supports those actions, while the resource handles property, security, and simulation behavior backed by a database. The README documents the broader capabilities, but server and client Lua excerpts were not provided, so links to those runtime subsystems are documented relationships rather than verified calls. The UI entry point and selected component relationships are supported by the source index and excerpts.

Main entry points: [`web/src/App.jsx`](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/App.jsx) (NUI application), [`server/sv_housing.lua`](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_housing.lua) (Housing runtime), [`web/src/components/Furniture/FurnitureMenu.jsx`](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Furniture/FurnitureMenu.jsx) (Furniture studio), [`web/src/components/RealEstate/RealEstate.jsx`](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/RealEstate/RealEstate.jsx) (Real estate UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Housing interface"]
  node_nui["NUI application<br/>[App.jsx]"]
end

subgraph group_property["Property management"]
  node_realestate["Real estate UI<br/>[RealEstate.jsx]"]
  node_contracts["Contract papers<br/>[ContractPaper.jsx]"]
  node_panel["Property dashboard<br/>[Panel.jsx]"]
  node_aptcreator["Apartment creator"]
  node_apartments["Starter apartments<br/>[sv_apartments.lua]"]
  node_housing["Housing runtime<br/>[sv_housing.lua]"]
end

subgraph group_living["Living systems"]
  node_furniture["Furniture studio<br/>[FurnitureMenu.jsx]"]
  node_modeler["3D placement modeler<br/>[Modeler3D.jsx]"]
  node_electricity["Power and climate<br/>[sv_electricity.lua]"]
  node_lawn["Yard simulation<br/>[sv_lawn.lua]"]
  node_screenshot["Thumbnail pipeline<br/>[sv_screenshot.js]"]
end

subgraph group_security["Security and access"]
  node_breachui["Breach minigame<br/>[BreachMinigame.jsx]"]
  node_security["Locks and breaches<br/>[sv_breach.lua]"]
  node_locksmith["Keys and locksmith<br/>[sv_locksmith.lua]"]
end

subgraph group_platform["Resource platform"]
  node_db[("Housing database<br/>[sv_db.lua]")]
end

node_player(("Player or staff"))
node_framework{{"FiveM framework"}}
node_integrations{{"External resources"}}

node_player -.->|"opens and uses"| node_nui
node_nui -->|"renders"| node_realestate
node_nui -->|"renders"| node_contracts
node_nui -->|"renders"| node_panel
node_nui -->|"renders"| node_aptcreator
node_nui -->|"renders"| node_furniture
node_nui -->|"renders"| node_breachui
node_aptcreator -->|"uses"| node_modeler
node_furniture -->|"uses"| node_modeler
node_realestate -->|"opens contract"| node_contracts
node_realestate -.->|"manages listings"| node_housing
node_panel -.->|"manages property"| node_housing
node_aptcreator -.->|"creates units"| node_apartments
node_furniture -.->|"places furnishings"| node_housing
node_housing -.->|"persists housing"| node_db
node_apartments -.->|"uses stored data"| node_db
node_player -.->|"uses power controls"| node_electricity
node_player -.->|"mows yard"| node_lawn
node_player -.->|"initiates breach"| node_security
node_breachui -.->|"sends strike input"| node_security
node_player -.->|"gets physical keys"| node_locksmith
node_player -.->|"starts capture"| node_screenshot
node_housing -.->|"supports ESX and Qbox"| node_framework
node_housing -.->|"integrates optionally"| node_integrations
node_furniture -.->|"uses inventory and wardrobe"| node_integrations
node_screenshot -.->|"uploads to CDN or storage"| node_integrations

click node_nui "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/App.jsx"
click node_realestate "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/RealEstate/RealEstate.jsx"
click node_contracts "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/RealEstate/ContractPaper.jsx"
click node_panel "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Panel/Panel.jsx"
click node_aptcreator "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/ApartmentCreator/ApartmentCreator.jsx"
click node_apartments "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_apartments.lua"
click node_housing "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_housing.lua"
click node_furniture "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Furniture/FurnitureMenu.jsx"
click node_modeler "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Furniture/Modeler3D.jsx"
click node_electricity "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_electricity.lua"
click node_lawn "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_lawn.lua"
click node_screenshot "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_screenshot.js"
click node_breachui "https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/BreachMinigame/BreachMinigame.jsx"
click node_security "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_breach.lua"
click node_locksmith "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_locksmith.lua"
click node_db "https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_db.lua"

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_nui toneBlue
class node_realestate,node_contracts,node_panel,node_aptcreator,node_apartments,node_housing toneAmber
class node_furniture,node_modeler,node_electricity,node_lawn,node_screenshot toneMint
class node_breachui,node_security,node_locksmith toneRose
class node_db,node_player,node_framework,node_integrations toneIndigo
```

## Components

### Housing interface

- [NUI application](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/App.jsx): `web/src/App.jsx`

### Property management

- [Real estate UI](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/RealEstate/RealEstate.jsx): `web/src/components/RealEstate/RealEstate.jsx`
- [Contract papers](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/RealEstate/ContractPaper.jsx): `web/src/components/RealEstate/ContractPaper.jsx`
- [Property dashboard](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Panel/Panel.jsx): `web/src/components/Panel/Panel.jsx`
- [Apartment creator](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/ApartmentCreator/ApartmentCreator.jsx): `web/src/components/ApartmentCreator/ApartmentCreator.jsx`
- [Starter apartments](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_apartments.lua): `server/sv_apartments.lua`
- [Housing runtime](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_housing.lua): `server/sv_housing.lua`

### Living systems

- [Furniture studio](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Furniture/FurnitureMenu.jsx): `web/src/components/Furniture/FurnitureMenu.jsx`
- [3D placement modeler](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/Furniture/Modeler3D.jsx): `web/src/components/Furniture/Modeler3D.jsx`
- [Power and climate](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_electricity.lua): `server/sv_electricity.lua`
- [Yard simulation](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_lawn.lua): `server/sv_lawn.lua`
- [Thumbnail pipeline](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_screenshot.js): `server/sv_screenshot.js`

### Security and access

- [Breach minigame](https://github.com/lumanodestudios/lns_housing/blob/main/web/src/components/BreachMinigame/BreachMinigame.jsx): `web/src/components/BreachMinigame/BreachMinigame.jsx`
- [Locks and breaches](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_breach.lua): `server/sv_breach.lua`
- [Keys and locksmith](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_locksmith.lua): `server/sv_locksmith.lua`

### Resource platform

- [Housing database](https://github.com/lumanodestudios/lns_housing/blob/main/server/sv_db.lua): `server/sv_db.lua`

### Other components

- **Player or staff**
- **FiveM framework**
- **External resources**

## Connections

- Player or staff → NUI application: opens and uses (evidence: `README.md`)
- NUI application → Real estate UI: renders (evidence: `web/src/App.jsx`)
- NUI application → Contract papers: renders (evidence: `web/src/App.jsx`)
- NUI application → Property dashboard: renders (evidence: `web/src/App.jsx`)
- NUI application → Apartment creator: renders (evidence: `web/src/App.jsx`)
- NUI application → Furniture studio: renders (evidence: `web/src/App.jsx`)
- NUI application → Breach minigame: renders (evidence: `web/src/App.jsx`)
- Apartment creator → 3D placement modeler: uses (evidence: `web/src/components/ApartmentCreator/ApartmentCreator.jsx`)
- Furniture studio → 3D placement modeler: uses (evidence: `web/src/components/Furniture/FurnitureMenu.jsx`)
- Real estate UI → Contract papers: opens contract (evidence: `web/src/components/RealEstate/RealEstate.jsx`)
- Real estate UI → Housing runtime: manages listings (evidence: `README.md`)
- Property dashboard → Housing runtime: manages property (evidence: `README.md`)
- Apartment creator → Starter apartments: creates units (evidence: `README.md`)
- Furniture studio → Housing runtime: places furnishings (evidence: `README.md`)
- Housing runtime → Housing database: persists housing (evidence: `README.md`)
- Starter apartments → Housing database: uses stored data (evidence: `README.md`)
- Player or staff → Power and climate: uses power controls (evidence: `README.md`)
- Player or staff → Yard simulation: mows yard (evidence: `README.md`)
- Player or staff → Locks and breaches: initiates breach (evidence: `README.md`)
- Breach minigame → Locks and breaches: sends strike input
- Player or staff → Keys and locksmith: gets physical keys (evidence: `README.md`)
- Player or staff → Thumbnail pipeline: starts capture (evidence: `README.md`)
- Housing runtime → FiveM framework: supports ESX and Qbox (evidence: `README.md`)
- Housing runtime → External resources: integrates optionally (evidence: `README.md`)
- Furniture studio → External resources: uses inventory and wardrobe (evidence: `README.md`)
- Thumbnail pipeline → External resources: uploads to CDN or storage (evidence: `README.md`)
