How burak3745/traflux-admin-panel-frontend works
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: App.js Routed application · index.js HTTP client · LineChart.jsx Chart components · lightAction.js Light actions
Components 26
Application shell
- Routed application
src/App.js
Vehicle monitoring
- Dashboard
src/scenes/dashboard/index.jsx - Vehicle records
src/scenes/cars/index.jsx - Line view
src/scenes/line/index.jsx - Pie view
src/scenes/pie/index.jsx - Chart components
src/components/LineChart.jsx - Chart sample data
src/data/mockData.js - Vehicle actions
src/actions/carsAction.js
Traffic light control
- Traffic lights
src/scenes/lights/index.jsx - Add light
src/scenes/add/index.jsx - Edit light
src/scenes/edit/EditLight.jsx - Signal control
src/scenes/settings/index.jsx - Light actions
src/actions/lightAction.js
Identity and state
- User management
src/scenes/users/index.jsx - User actions
src/actions/userAction.js - Login
src/scenes/auth/Login.jsx - Authentication actions
src/actions/authAction.js - Redux store
src/store.js - State reducers
src/reducers
Shared infrastructure
- HTTP client
src/axios/index.js - Detection WebSocket
src/components/WebSocket.js - Theme and color mode
src/theme.js - Theme cookie helper
src/utils/cookie.js
Other components
- Administrator
- Backend API
- Detection service
Connections 34
- Administrator → Routed application: uses
src/App.js - Routed application → Login: routes to
src/App.js - Routed application → Dashboard: routes to
src/App.js - Routed application → Vehicle records: routes to
src/App.js - Routed application → Traffic lights: routes to
src/App.js - Routed application → Add light: routes to
src/App.js - Routed application → Edit light: routes to
src/App.js - Routed application → Signal control: routes to
src/App.js - Routed application → Line view: routes to
src/App.js - Routed application → Pie view: routes to
src/App.js - Routed application → User management: routes to
src/App.js - Routed application → Detection WebSocket: receives events
src/App.js - Detection service → Detection WebSocket: sends events
- Routed application → Vehicle actions: dispatches
src/App.js - Routed application → User actions: dispatches
src/App.js - Dashboard → Chart components: renders
src/scenes/dashboard/index.jsx - Line view → Chart components: renders
src/scenes/line/index.jsx - Pie view → Chart components: renders
src/scenes/pie/index.jsx - Chart components → Chart sample data: imports
src/components/LineChart.jsx - Vehicle records → Vehicle actions: dispatches
src/scenes/cars/index.jsx - Traffic lights → Light actions: uses
src/scenes/lights/index.jsx - Add light → Light actions: uses
src/scenes/add/index.jsx - Edit light → Light actions: uses
src/scenes/edit/EditLight.jsx - Signal control → HTTP client: calls
src/axios/index.js - Light actions → HTTP client: calls
src/actions/lightAction.js - User actions → HTTP client: calls
src/actions/userAction.js - Vehicle actions → HTTP client: calls
src/actions/carsAction.js - Login → Authentication actions: dispatches
src/scenes/auth/Login.jsx - Authentication actions → HTTP client: calls
src/actions/authAction.js - HTTP client → Backend API: requests
src/axios/index.js - Redux store → State reducers: combines
src/store.js - Routed application → Redux store: uses
src/index.js - Theme and color mode → Theme cookie helper: reads and writes
src/theme.js - Routed application → Theme and color mode: provides theme
src/App.js