How expediteinternationa/monitor1 works
This repository implements an infrastructure and website-traffic dashboard. Users view fleet, container, traffic, and alert data, and can configure agent or direct-Docker sources; the frontend polls an API and presents the results. The backend has both a database-backed server and a file-backed live-server implementation, plus collection, alerting, and persistence components. The excerpts show only parts of the backend routes and UI, so uncertain inter-module calls are omitted; the API-to-server connection is shown as unverified.
Main entry points: App.js Dashboard shell · server.py API and polling · api.js Polling API client · live_server.py File-backed API
Components 21
Dashboard UI
- Dashboard shell
frontend/src/App.js - Polling API client
frontend/src/lib/api.js - Fleet overview
frontend/src/components/KpiStrip.js - Server charts
frontend/src/components/ServerLoadChart.js - Visitor charts
frontend/src/components/VisitorCharts.js - Container table
frontend/src/components/ContainersTable.js - Traffic views
frontend/src/components/TrafficSection.js - Source setup
frontend/src/components/SetupPanel.js - Alerts panel
frontend/src/components/AlertsPanel.js - Infrastructure view
frontend/src/components/InfrastructurePanel.js
Backend API
- API and polling
backend/server.py - File-backed API
backend/live_server.py - Alert evaluation
backend/alerts.py - Container controls
backend/controls.py
Collection and Controls
- Host agent
backend/agent_script.py - Docker utilities
backend/docker_utils.py - GCP inventory
backend/gcp_inventory.py - Website tracker
backend/tracker.js
Persistence
- Mongo database
backend/database.py - File-backed store
backend/file_store.py
Other components
- Dashboard user
Connections 24
- Dashboard user → Dashboard shell: uses
frontend/src/App.js - Dashboard shell → Polling API client: polls through
frontend/src/App.js - Dashboard shell → Fleet overview: renders
frontend/src/App.js - Dashboard shell → Server charts: renders
frontend/src/App.js - Dashboard shell → Visitor charts: renders
frontend/src/App.js - Dashboard shell → Container table: renders
frontend/src/App.js - Dashboard shell → Traffic views: renders
frontend/src/App.js - Dashboard shell → Source setup: renders
frontend/src/App.js - Dashboard shell → Alerts panel: renders
frontend/src/App.js - Dashboard shell → Infrastructure view: renders
frontend/src/App.js - Source setup → Polling API client: requests via
frontend/src/components/SetupPanel.js - Visitor charts → Polling API client: polls via
frontend/src/components/VisitorCharts.js - Infrastructure view → Polling API client: polls via
frontend/src/components/InfrastructurePanel.js - Polling API client → API and polling: sends API requests
- API and polling → Mongo database: reads and writes
backend/server.py - API and polling → Alert evaluation: evaluates alerts
backend/server.py - API and polling → Container controls: delegates controls
backend/server.py - API and polling → Docker utilities: uses utilities
backend/server.py - File-backed API → Docker utilities: uses utilities
backend/live_server.py - File-backed API → File-backed store: reads and writes
backend/live_server.py - File-backed API → GCP inventory: uses inventory
backend/live_server.py - File-backed store → Docker utilities: parses user agents
backend/file_store.py - Host agent → API and polling: submits metrics
- Website tracker → API and polling: submits tracking events