# burak3745/traflux-admin-panel-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/burak3745/traflux-admin-panel-frontend
- Repository: https://github.com/burak3745/traflux-admin-panel-frontend

## Overview

This is a React/Redux traffic-monitoring admin dashboard. An administrator signs in, then the routed application loads user and vehicle records, while vehicle-detection events can arrive over a WebSocket; dashboard and management views present those records and support traffic-light and account operations. The graph captures documented routes, API/action relationships, and sampled component usage. Several listed modules were not excerpted, so uncertain internal relationships are omitted.

Main entry points: [`src/App.js`](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/App.js) (Routed application), [`src/axios/index.js`](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/axios/index.js) (HTTP client), [`src/components/LineChart.jsx`](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/components/LineChart.jsx) (Chart components), [`src/actions/lightAction.js`](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/lightAction.js) (Light actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application shell"]
  node_app["Routed application<br/>[App.js]"]
end

subgraph group_monitoring["Vehicle monitoring"]
  node_dashboard["Dashboard<br/>[index.jsx]"]
  node_cars["Vehicle records<br/>[index.jsx]"]
  node_lineview["Line view<br/>[index.jsx]"]
  node_pieview["Pie view<br/>[index.jsx]"]
  node_charts["Chart components<br/>[LineChart.jsx]"]
  node_mockdata["Chart sample data<br/>[mockData.js]"]
  node_caractions["Vehicle actions<br/>[carsAction.js]"]
end

subgraph group_traffic["Traffic light control"]
  node_lights["Traffic lights<br/>[index.jsx]"]
  node_addlight["Add light<br/>[index.jsx]"]
  node_editlight["Edit light<br/>[EditLight.jsx]"]
  node_lightcontrol["Signal control<br/>[index.jsx]"]
  node_lightactions["Light actions<br/>[lightAction.js]"]
end

subgraph group_identity["Identity and state"]
  node_users["User management<br/>[index.jsx]"]
  node_useractions["User actions<br/>[userAction.js]"]
  node_login["Login<br/>[Login.jsx]"]
  node_authactions["Authentication actions<br/>[authAction.js]"]
  node_store[("Redux store<br/>[store.js]")]
  node_reducers["State reducers"]
end

subgraph group_shared["Shared infrastructure"]
  node_http["HTTP client<br/>[index.js]"]
  node_socket["Detection WebSocket<br/>[WebSocket.js]"]
  node_theme["Theme and color mode<br/>[theme.js]"]
  node_cookie["Theme cookie helper<br/>[cookie.js]"]
end

node_admin(("Administrator"))
node_api{{"Backend API"}}
node_detection{{"Detection service"}}

node_admin -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_cars
node_app -->|"routes to"| node_lights
node_app -->|"routes to"| node_addlight
node_app -->|"routes to"| node_editlight
node_app -->|"routes to"| node_lightcontrol
node_app -->|"routes to"| node_lineview
node_app -->|"routes to"| node_pieview
node_app -->|"routes to"| node_users
node_app -->|"receives events"| node_socket
node_detection -.->|"sends events"| node_socket
node_app -->|"dispatches"| node_caractions
node_app -->|"dispatches"| node_useractions
node_dashboard -->|"renders"| node_charts
node_lineview -->|"renders"| node_charts
node_pieview -->|"renders"| node_charts
node_charts -->|"imports"| node_mockdata
node_cars -->|"dispatches"| node_caractions
node_lights -->|"uses"| node_lightactions
node_addlight -->|"uses"| node_lightactions
node_editlight -->|"uses"| node_lightactions
node_lightcontrol -->|"calls"| node_http
node_lightactions -->|"calls"| node_http
node_useractions -->|"calls"| node_http
node_caractions -->|"calls"| node_http
node_login -->|"dispatches"| node_authactions
node_authactions -->|"calls"| node_http
node_http -->|"requests"| node_api
node_store -->|"combines"| node_reducers
node_app -->|"uses"| node_store
node_theme -->|"reads and writes"| node_cookie
node_app -->|"provides theme"| node_theme

click node_app "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/App.js"
click node_dashboard "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/dashboard/index.jsx"
click node_cars "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/cars/index.jsx"
click node_lineview "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/line/index.jsx"
click node_pieview "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/pie/index.jsx"
click node_charts "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/components/LineChart.jsx"
click node_mockdata "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/data/mockData.js"
click node_caractions "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/carsAction.js"
click node_lights "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/lights/index.jsx"
click node_addlight "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/add/index.jsx"
click node_editlight "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/edit/EditLight.jsx"
click node_lightcontrol "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/settings/index.jsx"
click node_lightactions "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/lightAction.js"
click node_users "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/users/index.jsx"
click node_useractions "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/userAction.js"
click node_login "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/auth/Login.jsx"
click node_authactions "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/authAction.js"
click node_store "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/store.js"
click node_reducers "https://github.com/burak3745/traflux-admin-panel-frontend/tree/main/src/reducers"
click node_http "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/axios/index.js"
click node_socket "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/components/WebSocket.js"
click node_theme "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/theme.js"
click node_cookie "https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/utils/cookie.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 toneBlue
class node_dashboard,node_cars,node_lineview,node_pieview,node_charts,node_mockdata,node_caractions toneAmber
class node_lights,node_addlight,node_editlight,node_lightcontrol,node_lightactions,node_api toneMint
class node_users,node_useractions,node_login,node_authactions,node_store,node_reducers toneRose
class node_http,node_socket,node_theme,node_cookie,node_admin,node_detection toneIndigo
```

## Components

### Application shell

- [Routed application](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/App.js): `src/App.js`

### Vehicle monitoring

- [Dashboard](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/dashboard/index.jsx): `src/scenes/dashboard/index.jsx`
- [Vehicle records](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/cars/index.jsx): `src/scenes/cars/index.jsx`
- [Line view](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/line/index.jsx): `src/scenes/line/index.jsx`
- [Pie view](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/pie/index.jsx): `src/scenes/pie/index.jsx`
- [Chart components](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/components/LineChart.jsx): `src/components/LineChart.jsx`
- [Chart sample data](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/data/mockData.js): `src/data/mockData.js`
- [Vehicle actions](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/carsAction.js): `src/actions/carsAction.js`

### Traffic light control

- [Traffic lights](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/lights/index.jsx): `src/scenes/lights/index.jsx`
- [Add light](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/add/index.jsx): `src/scenes/add/index.jsx`
- [Edit light](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/edit/EditLight.jsx): `src/scenes/edit/EditLight.jsx`
- [Signal control](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/settings/index.jsx): `src/scenes/settings/index.jsx`
- [Light actions](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/lightAction.js): `src/actions/lightAction.js`

### Identity and state

- [User management](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/users/index.jsx): `src/scenes/users/index.jsx`
- [User actions](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/userAction.js): `src/actions/userAction.js`
- [Login](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/scenes/auth/Login.jsx): `src/scenes/auth/Login.jsx`
- [Authentication actions](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/actions/authAction.js): `src/actions/authAction.js`
- [Redux store](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/store.js): `src/store.js`
- [State reducers](https://github.com/burak3745/traflux-admin-panel-frontend/tree/main/src/reducers): `src/reducers`

### Shared infrastructure

- [HTTP client](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/axios/index.js): `src/axios/index.js`
- [Detection WebSocket](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/components/WebSocket.js): `src/components/WebSocket.js`
- [Theme and color mode](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/theme.js): `src/theme.js`
- [Theme cookie helper](https://github.com/burak3745/traflux-admin-panel-frontend/blob/main/src/utils/cookie.js): `src/utils/cookie.js`

### Other components

- **Administrator**
- **Backend API**
- **Detection service**

## Connections

- Administrator → Routed application: uses (evidence: `src/App.js`)
- Routed application → Login: routes to (evidence: `src/App.js`)
- Routed application → Dashboard: routes to (evidence: `src/App.js`)
- Routed application → Vehicle records: routes to (evidence: `src/App.js`)
- Routed application → Traffic lights: routes to (evidence: `src/App.js`)
- Routed application → Add light: routes to (evidence: `src/App.js`)
- Routed application → Edit light: routes to (evidence: `src/App.js`)
- Routed application → Signal control: routes to (evidence: `src/App.js`)
- Routed application → Line view: routes to (evidence: `src/App.js`)
- Routed application → Pie view: routes to (evidence: `src/App.js`)
- Routed application → User management: routes to (evidence: `src/App.js`)
- Routed application → Detection WebSocket: receives events (evidence: `src/App.js`)
- Detection service → Detection WebSocket: sends events
- Routed application → Vehicle actions: dispatches (evidence: `src/App.js`)
- Routed application → User actions: dispatches (evidence: `src/App.js`)
- Dashboard → Chart components: renders (evidence: `src/scenes/dashboard/index.jsx`)
- Line view → Chart components: renders (evidence: `src/scenes/line/index.jsx`)
- Pie view → Chart components: renders (evidence: `src/scenes/pie/index.jsx`)
- Chart components → Chart sample data: imports (evidence: `src/components/LineChart.jsx`)
- Vehicle records → Vehicle actions: dispatches (evidence: `src/scenes/cars/index.jsx`)
- Traffic lights → Light actions: uses (evidence: `src/scenes/lights/index.jsx`)
- Add light → Light actions: uses (evidence: `src/scenes/add/index.jsx`)
- Edit light → Light actions: uses (evidence: `src/scenes/edit/EditLight.jsx`)
- Signal control → HTTP client: calls (evidence: `src/axios/index.js`)
- Light actions → HTTP client: calls (evidence: `src/actions/lightAction.js`)
- User actions → HTTP client: calls (evidence: `src/actions/userAction.js`)
- Vehicle actions → HTTP client: calls (evidence: `src/actions/carsAction.js`)
- Login → Authentication actions: dispatches (evidence: `src/scenes/auth/Login.jsx`)
- Authentication actions → HTTP client: calls (evidence: `src/actions/authAction.js`)
- HTTP client → Backend API: requests (evidence: `src/axios/index.js`)
- Redux store → State reducers: combines (evidence: `src/store.js`)
- Routed application → Redux store: uses (evidence: `src/index.js`)
- Theme and color mode → Theme cookie helper: reads and writes (evidence: `src/theme.js`)
- Routed application → Theme and color mode: provides theme (evidence: `src/App.js`)
