# rdz-2026/routeops architecture

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

- Interactive diagram: https://gitdiagram.com/rdz-2026/routeops
- Repository: https://github.com/rdz-2026/routeops

## Overview

This repository contains a browser-based RDZ security reporting application, alongside several other standalone HTML tools whose runtime behavior is not described by the sampled evidence. The reports workflow is: load reference data and reports, create a type-specific report with the wizard, save and view it, then browse, analyze, configure, or prepare email summaries. The reports modules and offline synchronization are represented; other top-level tools and the planning API are omitted because their behavior was not sampled. Edges reflect explicit calls or documented data access in excerpts.

Main entry points: [`reports/shared.js`](https://github.com/rdz-2026/routeops/blob/main/reports/shared.js) (Auth and navigation), [`reports/module_rapport.js`](https://github.com/rdz-2026/routeops/blob/main/reports/module_rapport.js) (Report views), [`reports/module_admin.js`](https://github.com/rdz-2026/routeops/blob/main/reports/module_admin.js) (Report configuration), [`reports/module_wizard.js`](https://github.com/rdz-2026/routeops/blob/main/reports/module_wizard.js) (Report wizard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reporting["Report workflow"]
  node_wizard["Report wizard<br/>[module_wizard.js]"]
  node_report_records[("Report records<br/>[shared.js]")]
  node_report_views["Report views<br/>[module_rapport.js]"]
end

subgraph group_operations["Reporting operations"]
  node_report_list["Report list<br/>[module_liste.js]"]
  node_statistics["Statistics<br/>[module_stats.js]"]
  node_email_reports["Email summaries<br/>[module_email.js]"]
  node_admin_config["Report configuration<br/>[module_admin.js]"]
end

subgraph group_platform["Shared platform"]
  node_shared_runtime["Auth and navigation<br/>[shared.js]"]
  node_sync_queue["Offline sync queue<br/>[shared.js]"]
end

node_agent(("Security agent"))
node_supabase[("Supabase REST")]
node_resident_service[("Resident data service")]
node_local_storage[("Browser local storage")]
node_email_client["Email client"]

node_agent -->|"enters details"| node_wizard
node_wizard -->|"updates DB reports"| node_report_records
node_report_records -->|"renders report"| node_report_views
node_report_records -->|"filters reports"| node_report_list
node_report_records -->|"aggregates reports"| node_statistics
node_report_records -->|"selects reports"| node_email_reports
node_shared_runtime -->|"dispatches panel"| node_report_list
node_shared_runtime -->|"dispatches panel"| node_statistics
node_shared_runtime -->|"dispatches panel"| node_email_reports
node_shared_runtime -->|"opens admin tab"| node_admin_config
node_shared_runtime -->|"loads reference data"| node_supabase
node_shared_runtime -->|"loads residents"| node_resident_service
node_shared_runtime -->|"loads local cache"| node_local_storage
node_report_views -->|"saves report"| node_supabase
node_report_views -->|"queues offline save"| node_sync_queue
node_shared_runtime -->|"persists pending ops"| node_sync_queue
node_sync_queue -->|"syncs reports"| node_supabase
node_admin_config -->|"writes configuration"| node_supabase
node_admin_config -->|"persists config"| node_local_storage
node_email_reports -->|"opens mail draft"| node_email_client
node_report_records -->|"reads reference data"| node_wizard

click node_wizard "https://github.com/rdz-2026/routeops/blob/main/reports/module_wizard.js"
click node_report_records "https://github.com/rdz-2026/routeops/blob/main/reports/shared.js"
click node_report_views "https://github.com/rdz-2026/routeops/blob/main/reports/module_rapport.js"
click node_report_list "https://github.com/rdz-2026/routeops/blob/main/reports/module_liste.js"
click node_statistics "https://github.com/rdz-2026/routeops/blob/main/reports/module_stats.js"
click node_email_reports "https://github.com/rdz-2026/routeops/blob/main/reports/module_email.js"
click node_admin_config "https://github.com/rdz-2026/routeops/blob/main/reports/module_admin.js"
click node_shared_runtime "https://github.com/rdz-2026/routeops/blob/main/reports/shared.js"
click node_sync_queue "https://github.com/rdz-2026/routeops/blob/main/reports/shared.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_wizard,node_report_records,node_report_views,node_email_client toneBlue
class node_report_list,node_statistics,node_email_reports,node_admin_config,node_supabase,node_resident_service,node_local_storage toneAmber
class node_shared_runtime,node_sync_queue toneMint
class node_agent toneIndigo
```

## Components

### Report workflow

- [Report wizard](https://github.com/rdz-2026/routeops/blob/main/reports/module_wizard.js): `reports/module_wizard.js`
- [Report records](https://github.com/rdz-2026/routeops/blob/main/reports/shared.js): `reports/shared.js`
- [Report views](https://github.com/rdz-2026/routeops/blob/main/reports/module_rapport.js): `reports/module_rapport.js`

### Reporting operations

- [Report list](https://github.com/rdz-2026/routeops/blob/main/reports/module_liste.js): `reports/module_liste.js`
- [Statistics](https://github.com/rdz-2026/routeops/blob/main/reports/module_stats.js): `reports/module_stats.js`
- [Email summaries](https://github.com/rdz-2026/routeops/blob/main/reports/module_email.js): `reports/module_email.js`
- [Report configuration](https://github.com/rdz-2026/routeops/blob/main/reports/module_admin.js): `reports/module_admin.js`

### Shared platform

- [Auth and navigation](https://github.com/rdz-2026/routeops/blob/main/reports/shared.js): `reports/shared.js`
- [Offline sync queue](https://github.com/rdz-2026/routeops/blob/main/reports/shared.js): `reports/shared.js`

### Other components

- **Security agent**
- **Supabase REST**
- **Resident data service**
- **Browser local storage**
- **Email client**

## Connections

- Security agent → Report wizard: enters details (evidence: `reports/module_wizard.js`)
- Report wizard → Report records: updates DB reports (evidence: `reports/module_wizard.js`)
- Report records → Report views: renders report (evidence: `reports/module_rapport.js`)
- Report records → Report list: filters reports (evidence: `reports/module_liste.js`)
- Report records → Statistics: aggregates reports (evidence: `reports/module_stats.js`)
- Report records → Email summaries: selects reports (evidence: `reports/module_email.js`)
- Auth and navigation → Report list: dispatches panel (evidence: `reports/shared.js`)
- Auth and navigation → Statistics: dispatches panel (evidence: `reports/shared.js`)
- Auth and navigation → Email summaries: dispatches panel (evidence: `reports/shared.js`)
- Auth and navigation → Report configuration: opens admin tab (evidence: `reports/shared.js`)
- Auth and navigation → Supabase REST: loads reference data (evidence: `reports/shared.js`)
- Auth and navigation → Resident data service: loads residents (evidence: `reports/shared.js`)
- Auth and navigation → Browser local storage: loads local cache (evidence: `reports/shared.js`)
- Report views → Supabase REST: saves report (evidence: `reports/module_rapport.js`)
- Report views → Offline sync queue: queues offline save (evidence: `reports/module_rapport.js`)
- Auth and navigation → Offline sync queue: persists pending ops (evidence: `reports/shared.js`)
- Offline sync queue → Supabase REST: syncs reports (evidence: `reports/shared.js`)
- Report configuration → Supabase REST: writes configuration (evidence: `reports/module_admin.js`)
- Report configuration → Browser local storage: persists config (evidence: `reports/module_admin.js`)
- Email summaries → Email client: opens mail draft (evidence: `reports/module_email.js`)
- Report records → Report wizard: reads reference data (evidence: `reports/module_wizard.js`)
