# lz10000/lavonboard architecture

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

- Interactive diagram: https://gitdiagram.com/lz10000/lavonboard
- Repository: https://github.com/lz10000/lavonboard

## Overview

LavOnboarding is a browser-based self-install portal for onboarding laundry IoT controllers, backed by a simulator API. The principal user journey collects customer and installation details, identifies a controller, checks its status and network performance, then submits the onboarding validation. The frontend stages are implemented in one large Stepper component; the API also provides controller ping/status and network-test routes. The sampled source confirms server-side persistence and transient controller state, but does not show the frontend request implementation, so that connection is marked unverified.

Main entry points: [`src/components/Stepper.jsx`](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx) (Onboarding flow), [`simulator/server.js`](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js) (Simulator API), [`src/main.jsx`](https://github.com/lz10000/lavonboard/blob/main/src/main.jsx) (Browser bootstrap), [`src/App.jsx`](https://github.com/lz10000/lavonboard/blob/main/src/App.jsx) (Portal shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Onboarding portal"]
  node_main["Browser bootstrap<br/>[main.jsx]"]
  node_app["Portal shell<br/>[App.jsx]"]
  node_stepper["Onboarding flow<br/>[Stepper.jsx]"]
  node_customer["Customer details<br/>[Stepper.jsx]"]
  node_controller["Controller identification<br/>[Stepper.jsx]"]
  node_status["Controller status<br/>[Stepper.jsx]"]
  node_network["Network speed test<br/>[Stepper.jsx]"]
  node_validation["Onboarding result<br/>[Stepper.jsx]"]
  node_support["Support link<br/>[Stepper.jsx]"]
end

subgraph group_api["Simulator API"]
  node_server["Simulator API<br/>[server.js]"]
  node_ping["Controller ping/status<br/>[server.js]"]
  node_speed["Network test routes<br/>[server.js]"]
  node_onboarding["Validation endpoint<br/>[server.js]"]
end

subgraph group_state["Runtime state"]
  node_memory[("Controller cache<br/>[server.js]")]
end

subgraph group_integrations["External systems"]
  node_postgres[("PostgreSQL<br/>[init.sql]")]
  node_camera(("Device camera"))
  node_whatsapp(("WhatsApp support"))
end

node_user(("Installer"))

node_user -->|"opens portal"| node_main
node_main -->|"renders"| node_app
node_app -->|"renders"| node_stepper
node_stepper -->|"collects details"| node_customer
node_stepper -->|"identifies device"| node_controller
node_stepper -->|"queries status"| node_status
node_stepper -.->|"measures speed"| node_network
node_stepper -.->|"submits results"| node_validation
node_stepper -.->|"scans QR"| node_camera
node_stepper -->|"offers support"| node_support
node_support -->|"opens support"| node_whatsapp
node_stepper -.->|"calls API"| node_server
node_server -->|"routes ping/status"| node_ping
node_server -->|"routes network tests"| node_speed
node_server -->|"routes validation"| node_onboarding
node_ping -->|"reads/writes"| node_memory
node_ping -->|"upserts controller"| node_postgres
node_onboarding -->|"stores attempt"| node_postgres

click node_main "https://github.com/lz10000/lavonboard/blob/main/src/main.jsx"
click node_app "https://github.com/lz10000/lavonboard/blob/main/src/App.jsx"
click node_stepper "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_customer "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_controller "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_status "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_network "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_validation "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_support "https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx"
click node_server "https://github.com/lz10000/lavonboard/blob/main/simulator/server.js"
click node_ping "https://github.com/lz10000/lavonboard/blob/main/simulator/server.js"
click node_speed "https://github.com/lz10000/lavonboard/blob/main/simulator/server.js"
click node_onboarding "https://github.com/lz10000/lavonboard/blob/main/simulator/server.js"
click node_memory "https://github.com/lz10000/lavonboard/blob/main/simulator/server.js"
click node_postgres "https://github.com/lz10000/lavonboard/blob/main/simulator/db/init.sql"

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_main,node_app,node_stepper,node_customer,node_controller,node_status,node_network,node_validation,node_support toneBlue
class node_server,node_ping,node_speed,node_onboarding toneAmber
class node_memory toneMint
class node_postgres,node_camera,node_whatsapp toneRose
class node_user toneIndigo
```

## Components

### Onboarding portal

- [Browser bootstrap](https://github.com/lz10000/lavonboard/blob/main/src/main.jsx): `src/main.jsx`
- [Portal shell](https://github.com/lz10000/lavonboard/blob/main/src/App.jsx): `src/App.jsx`
- [Onboarding flow](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Customer details](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Controller identification](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Controller status](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Network speed test](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Onboarding result](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`
- [Support link](https://github.com/lz10000/lavonboard/blob/main/src/components/Stepper.jsx): `src/components/Stepper.jsx`

### Simulator API

- [Simulator API](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js): `simulator/server.js`
- [Controller ping/status](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js): `simulator/server.js`
- [Network test routes](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js): `simulator/server.js`
- [Validation endpoint](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js): `simulator/server.js`

### Runtime state

- [Controller cache](https://github.com/lz10000/lavonboard/blob/main/simulator/server.js): `simulator/server.js`

### External systems

- [PostgreSQL](https://github.com/lz10000/lavonboard/blob/main/simulator/db/init.sql): `simulator/db/init.sql`
- **Device camera**
- **WhatsApp support**

### Other components

- **Installer**

## Connections

- Installer → Browser bootstrap: opens portal (evidence: `src/main.jsx`)
- Browser bootstrap → Portal shell: renders (evidence: `src/main.jsx`)
- Portal shell → Onboarding flow: renders (evidence: `src/App.jsx`)
- Onboarding flow → Customer details: collects details (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Controller identification: identifies device (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Controller status: queries status (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Network speed test: measures speed (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Onboarding result: submits results (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Device camera: scans QR
- Onboarding flow → Support link: offers support (evidence: `src/components/Stepper.jsx`)
- Support link → WhatsApp support: opens support (evidence: `src/components/Stepper.jsx`)
- Onboarding flow → Simulator API: calls API
- Simulator API → Controller ping/status: routes ping/status (evidence: `simulator/server.js`)
- Simulator API → Network test routes: routes network tests (evidence: `simulator/server.js`)
- Simulator API → Validation endpoint: routes validation (evidence: `simulator/server.js`)
- Controller ping/status → Controller cache: reads/writes (evidence: `simulator/server.js`)
- Controller ping/status → PostgreSQL: upserts controller (evidence: `simulator/server.js`)
- Validation endpoint → PostgreSQL: stores attempt (evidence: `simulator/server.js`)
