# lannwyd/nebuloc architecture

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

- Interactive diagram: https://gitdiagram.com/lannwyd/nebuloc
- Repository: https://github.com/lannwyd/nebuloc

## Overview

NebuLoc is an Electron/React desktop device-loan manager. Users manage clients and device loans, update inventory, check device availability for a date, and track reservations; the dashboard summarizes loan status and revenue. The renderer is organized around a page-switching shell, with page components invoking Electron IPC for data operations and a preload bridge between the UI and desktop runtime. The README documents local storage and revenue tracking, but the main-process implementation was not excerpted, so persistence details and IPC routing are shown only as unverified relationships.

Main entry points: [`src/renderer/src/Comp.jsx`](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Comp.jsx) (Page navigation), [`src/preload/index.js`](https://github.com/lannwyd/nebuloc/blob/master/src/preload/index.js) (IPC preload bridge), [`src/renderer/src/lang/translations.js`](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/lang/translations.js) (Translations), [`src/renderer/src/DisplayClients.jsx`](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/DisplayClients.jsx) (Client loans)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Application shell"]
  node_renderer["Renderer bootstrap<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
  node_workspace["Page navigation<br/>[Comp.jsx]"]
  node_sidebar["Sidebar<br/>[Sidebar.jsx]"]
end

subgraph group_loans["Loans and clients"]
  node_client_loans["Client loans<br/>[DisplayClients.jsx]"]
  node_client_dialog["Client dialog<br/>[ModalClients.jsx]"]
end

subgraph group_inventory["Inventory planning"]
  node_devices["Device management<br/>[Devices.jsx]"]
  node_device_dialog["Device dialog<br/>[ModalDevices.jsx]"]
  node_availability["Availability search<br/>[Availability.jsx]"]
  node_reservations["Reservations<br/>[Reservations.jsx]"]
end

subgraph group_insights["Insights and shared UI"]
  node_gate["Dashboard gate<br/>[passwordGate.jsx]"]
  node_dashboard["Revenue dashboard<br/>[Dashboard.jsx]"]
  node_language["Language state"]
  node_translations["Translations<br/>[translations.js]"]
end

subgraph group_desktop["Desktop runtime"]
  node_preload["IPC preload bridge<br/>[index.js]"]
  node_main["Electron main process<br/>[index.js]"]
  node_local_data[("Local application data<br/>[index.js]")]
end

node_user(("Staff user"))

node_user -->|"opens app"| node_renderer
node_renderer -->|"mounts"| node_app
node_app -->|"renders"| node_workspace
node_workspace -->|"renders"| node_sidebar
node_workspace -->|"selects page"| node_client_loans
node_workspace -->|"selects page"| node_devices
node_workspace -->|"selects page"| node_availability
node_workspace -->|"selects page"| node_reservations
node_workspace -->|"gates dashboard"| node_gate
node_gate -.->|"renders"| node_dashboard
node_client_loans -->|"renders"| node_client_dialog
node_devices -->|"renders"| node_device_dialog
node_reservations -->|"renders"| node_device_dialog
node_client_loans -.->|"invokes IPC"| node_preload
node_devices -.->|"invokes IPC"| node_preload
node_availability -.->|"invokes IPC"| node_preload
node_reservations -.->|"invokes IPC"| node_preload
node_dashboard -.->|"invokes IPC"| node_preload
node_preload -.->|"forwards IPC"| node_main
node_main -.->|"stores locally"| node_local_data
node_app -->|"reads language"| node_language
node_renderer -->|"provides context"| node_language
node_workspace -->|"reads labels"| node_translations
node_client_loans -->|"reads labels"| node_translations
node_devices -->|"reads labels"| node_translations
node_availability -->|"reads labels"| node_translations
node_reservations -->|"reads labels"| node_translations
node_dashboard -->|"reads labels"| node_translations

click node_renderer "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/main.jsx"
click node_app "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/App.jsx"
click node_workspace "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Comp.jsx"
click node_sidebar "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Sidebar.jsx"
click node_client_loans "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/DisplayClients.jsx"
click node_client_dialog "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/ModalClients.jsx"
click node_devices "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Devices.jsx"
click node_device_dialog "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/ModalDevices.jsx"
click node_availability "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Availability.jsx"
click node_reservations "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Reservations.jsx"
click node_gate "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/passwordGate.jsx"
click node_dashboard "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Dashboard.jsx"
click node_language "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/context/LanguageContext.jsx"
click node_translations "https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/lang/translations.js"
click node_preload "https://github.com/lannwyd/nebuloc/blob/master/src/preload/index.js"
click node_main "https://github.com/lannwyd/nebuloc/blob/master/src/main/index.js"
click node_local_data "https://github.com/lannwyd/nebuloc/blob/master/src/main/index.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_renderer,node_app,node_workspace,node_sidebar,node_user toneBlue
class node_client_loans,node_client_dialog toneAmber
class node_devices,node_device_dialog,node_availability,node_reservations toneMint
class node_gate,node_dashboard,node_language,node_translations toneRose
class node_preload,node_main,node_local_data toneIndigo
```

## Components

### Application shell

- [Renderer bootstrap](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/main.jsx): `src/renderer/src/main.jsx`
- [App shell](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/App.jsx): `src/renderer/src/App.jsx`
- [Page navigation](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Comp.jsx): `src/renderer/src/Comp.jsx`
- [Sidebar](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Sidebar.jsx): `src/renderer/src/Sidebar.jsx`

### Loans and clients

- [Client loans](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/DisplayClients.jsx): `src/renderer/src/DisplayClients.jsx`
- [Client dialog](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/ModalClients.jsx): `src/renderer/src/ModalClients.jsx`

### Inventory planning

- [Device management](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Devices.jsx): `src/renderer/src/Devices.jsx`
- [Device dialog](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/ModalDevices.jsx): `src/renderer/src/ModalDevices.jsx`
- [Availability search](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Availability.jsx): `src/renderer/src/Availability.jsx`
- [Reservations](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Reservations.jsx): `src/renderer/src/Reservations.jsx`

### Insights and shared UI

- [Dashboard gate](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/passwordGate.jsx): `src/renderer/src/passwordGate.jsx`
- [Revenue dashboard](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/Dashboard.jsx): `src/renderer/src/Dashboard.jsx`
- [Language state](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/context/LanguageContext.jsx): `src/renderer/src/context/LanguageContext.jsx`
- [Translations](https://github.com/lannwyd/nebuloc/blob/master/src/renderer/src/lang/translations.js): `src/renderer/src/lang/translations.js`

### Desktop runtime

- [IPC preload bridge](https://github.com/lannwyd/nebuloc/blob/master/src/preload/index.js): `src/preload/index.js`
- [Electron main process](https://github.com/lannwyd/nebuloc/blob/master/src/main/index.js): `src/main/index.js`
- [Local application data](https://github.com/lannwyd/nebuloc/blob/master/src/main/index.js): `src/main/index.js`

### Other components

- **Staff user**

## Connections

- Staff user → Renderer bootstrap: opens app (evidence: `README.md`)
- Renderer bootstrap → App shell: mounts (evidence: `src/renderer/src/main.jsx`)
- App shell → Page navigation: renders (evidence: `src/renderer/src/App.jsx`)
- Page navigation → Sidebar: renders (evidence: `src/renderer/src/Comp.jsx`)
- Page navigation → Client loans: selects page (evidence: `src/renderer/src/Comp.jsx`)
- Page navigation → Device management: selects page (evidence: `src/renderer/src/Comp.jsx`)
- Page navigation → Availability search: selects page (evidence: `src/renderer/src/Comp.jsx`)
- Page navigation → Reservations: selects page (evidence: `src/renderer/src/Comp.jsx`)
- Page navigation → Dashboard gate: gates dashboard (evidence: `src/renderer/src/Comp.jsx`)
- Dashboard gate → Revenue dashboard: renders
- Client loans → Client dialog: renders (evidence: `src/renderer/src/DisplayClients.jsx`)
- Device management → Device dialog: renders (evidence: `src/renderer/src/Devices.jsx`)
- Reservations → Device dialog: renders (evidence: `src/renderer/src/Reservations.jsx`)
- Client loans → IPC preload bridge: invokes IPC
- Device management → IPC preload bridge: invokes IPC
- Availability search → IPC preload bridge: invokes IPC
- Reservations → IPC preload bridge: invokes IPC
- Revenue dashboard → IPC preload bridge: invokes IPC
- IPC preload bridge → Electron main process: forwards IPC
- Electron main process → Local application data: stores locally (evidence: `README.md`)
- App shell → Language state: reads language (evidence: `src/renderer/src/App.jsx`)
- Renderer bootstrap → Language state: provides context (evidence: `src/renderer/src/main.jsx`)
- Page navigation → Translations: reads labels (evidence: `src/renderer/src/Comp.jsx`)
- Client loans → Translations: reads labels (evidence: `src/renderer/src/DisplayClients.jsx`)
- Device management → Translations: reads labels (evidence: `src/renderer/src/Devices.jsx`)
- Availability search → Translations: reads labels (evidence: `src/renderer/src/Availability.jsx`)
- Reservations → Translations: reads labels (evidence: `src/renderer/src/Reservations.jsx`)
- Revenue dashboard → Translations: reads labels (evidence: `src/renderer/src/Dashboard.jsx`)
