# mrsltycrml/adapt-x architecture

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

- Interactive diagram: https://gitdiagram.com/mrsltycrml/adapt-x
- Repository: https://github.com/mrsltycrml/adapt-x

## Overview

ADAPT-X is a browser-based intersection operations console prototype. Operators sign in, then use the routed dashboard to monitor intersections and traffic signals, review and adjudicate violation events, inspect offender records, build reports, and adjust settings. The app uses sample records and client-side demo state rather than an API or database; selected preferences and actions persist in browser storage. The README documents product capabilities beyond the sampled page excerpts, so those are represented at their page paths without assuming unsampled implementation details.

Main entry points: [`src/components/DashboardLayout.jsx`](https://github.com/mrsltycrml/adapt-x/blob/main/src/components/DashboardLayout.jsx) (Dashboard layout), [`src/App.jsx`](https://github.com/mrsltycrml/adapt-x/blob/main/src/App.jsx) (Routing and auth), [`src/data/demoStore.js`](https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoStore.js) (Demo state access), [`src/data/demoData.js`](https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoData.js) (Sample records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app_entry["App entry<br/>[main.jsx]"]
  node_routing_auth["Routing and auth<br/>[App.jsx]"]
  node_login["Sign-in and recovery<br/>[LoginPage.jsx]"]
  node_workspace["Dashboard layout"]
end

subgraph group_operations["Traffic operations"]
  node_dashboard["Operator overview"]
  node_signals["Intersection signals"]
end

subgraph group_adjudication["Violation adjudication"]
  node_violations["Violation review<br/>[ViolationsPage.jsx]"]
  node_violators["Offender profiles<br/>[ViolatorsPage.jsx]"]
end

subgraph group_insights["Reports and records"]
  node_reports["Report builder<br/>[ReportsPage.jsx]"]
  node_settings["Settings and privacy"]
end

subgraph group_state["Demo data and preferences"]
  node_sample_data["Sample records<br/>[demoData.js]"]
  node_demo_store["Demo state access<br/>[demoStore.js]"]
  node_browser_storage[("Browser storage")]
end

node_operator(("Operator"))

node_operator -->|"signs in"| node_login
node_app_entry -->|"renders"| node_routing_auth
node_routing_auth -->|"shows when unauthenticated"| node_login
node_login -->|"submits login"| node_routing_auth
node_routing_auth -->|"reads and writes auth"| node_browser_storage
node_routing_auth -->|"mounts routes"| node_workspace
node_operator -->|"uses workspace"| node_workspace
node_workspace -->|"routes to"| node_dashboard
node_workspace -->|"routes to"| node_signals
node_workspace -->|"routes to"| node_violations
node_workspace -->|"routes to"| node_violators
node_workspace -->|"routes to"| node_reports
node_workspace -->|"routes to"| node_settings
node_dashboard -->|"displays demo metrics"| node_sample_data
node_signals -->|"loads intersections"| node_sample_data
node_signals -->|"reads assignments"| node_demo_store
node_violations -->|"uses demo events"| node_sample_data
node_violators -->|"uses demo roster"| node_sample_data
node_reports -->|"uses report defaults"| node_sample_data
node_reports -->|"reads and writes reports"| node_demo_store
node_settings -->|"reads and writes preferences"| node_demo_store
node_workspace -->|"loads notifications and account"| node_demo_store
node_demo_store -->|"persists demo state"| node_browser_storage
node_operator -->|"monitors operations"| node_dashboard
node_operator -->|"reviews events"| node_violations
node_operator -->|"builds reports"| node_reports
node_operator -->|"adjusts preferences"| node_settings

click node_app_entry "https://github.com/mrsltycrml/adapt-x/blob/main/src/main.jsx"
click node_routing_auth "https://github.com/mrsltycrml/adapt-x/blob/main/src/App.jsx"
click node_login "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/LoginPage.jsx"
click node_workspace "https://github.com/mrsltycrml/adapt-x/blob/main/src/components/DashboardLayout.jsx"
click node_dashboard "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/OperatorOverviewPage.jsx"
click node_signals "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/TrafficLightsPage.jsx"
click node_violations "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ViolationsPage.jsx"
click node_violators "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ViolatorsPage.jsx"
click node_reports "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ReportsPage.jsx"
click node_settings "https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/SettingsPageReference.jsx"
click node_sample_data "https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoData.js"
click node_demo_store "https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoStore.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_app_entry,node_routing_auth,node_login,node_workspace toneBlue
class node_dashboard,node_signals toneAmber
class node_violations,node_violators toneMint
class node_reports,node_settings toneRose
class node_sample_data,node_demo_store,node_browser_storage,node_operator toneIndigo
```

## Components

### Application shell

- [App entry](https://github.com/mrsltycrml/adapt-x/blob/main/src/main.jsx): `src/main.jsx`
- [Routing and auth](https://github.com/mrsltycrml/adapt-x/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in and recovery](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/LoginPage.jsx): `src/pages/LoginPage.jsx`
- [Dashboard layout](https://github.com/mrsltycrml/adapt-x/blob/main/src/components/DashboardLayout.jsx): `src/components/DashboardLayout.jsx`

### Traffic operations

- [Operator overview](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/OperatorOverviewPage.jsx): `src/pages/OperatorOverviewPage.jsx`
- [Intersection signals](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/TrafficLightsPage.jsx): `src/pages/TrafficLightsPage.jsx`

### Violation adjudication

- [Violation review](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ViolationsPage.jsx): `src/pages/ViolationsPage.jsx`
- [Offender profiles](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ViolatorsPage.jsx): `src/pages/ViolatorsPage.jsx`

### Reports and records

- [Report builder](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/ReportsPage.jsx): `src/pages/ReportsPage.jsx`
- [Settings and privacy](https://github.com/mrsltycrml/adapt-x/blob/main/src/pages/SettingsPageReference.jsx): `src/pages/SettingsPageReference.jsx`

### Demo data and preferences

- [Sample records](https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoData.js): `src/data/demoData.js`
- [Demo state access](https://github.com/mrsltycrml/adapt-x/blob/main/src/data/demoStore.js): `src/data/demoStore.js`
- **Browser storage**

### Other components

- **Operator**

## Connections

- Operator → Sign-in and recovery: signs in
- App entry → Routing and auth: renders
- Routing and auth → Sign-in and recovery: shows when unauthenticated
- Sign-in and recovery → Routing and auth: submits login
- Routing and auth → Browser storage: reads and writes auth
- Routing and auth → Dashboard layout: mounts routes
- Operator → Dashboard layout: uses workspace
- Dashboard layout → Operator overview: routes to
- Dashboard layout → Intersection signals: routes to
- Dashboard layout → Violation review: routes to
- Dashboard layout → Offender profiles: routes to
- Dashboard layout → Report builder: routes to
- Dashboard layout → Settings and privacy: routes to
- Operator overview → Sample records: displays demo metrics
- Intersection signals → Sample records: loads intersections
- Intersection signals → Demo state access: reads assignments
- Violation review → Sample records: uses demo events
- Offender profiles → Sample records: uses demo roster
- Report builder → Sample records: uses report defaults
- Report builder → Demo state access: reads and writes reports
- Settings and privacy → Demo state access: reads and writes preferences
- Dashboard layout → Demo state access: loads notifications and account
- Demo state access → Browser storage: persists demo state
- Operator → Operator overview: monitors operations
- Operator → Violation review: reviews events
- Operator → Report builder: builds reports
- Operator → Settings and privacy: adjusts preferences
