How mariemammar1/multi-fog-project works
Multi-Fog EV coordinates geographically autonomous EV-charging territories, with local station recommendations and reservations, peer-to-peer capacity cooperation, demand forecasts, and an interactive dashboard/simulator. The main user path runs from the dashboard through its API client to Fog APIs for live capacity and forecasts; local recommendation ranking then helps a driver choose a station. Separately, overloaded Fogs negotiate reservations with peer Fogs. README documents the major product capabilities; unsampled implementation details and some runtime links are therefore represented only where documented.
Main entry points: main.py Fog REST API · peer_communication_service.py Peer Negotiation · App.tsx Dashboard App · api.ts Dashboard API
Components 26
Dashboard
- Dashboard App
dashboard/src/App.tsx - Dashboard API
dashboard/src/services/api.ts - Station Ranking
dashboard/src/services/recommendationEngine.ts - Dashboard Views
dashboard/src/components
Fog Runtime
- Fog REST API
fog/api/main.py - Station Routes
fog/api/stations.py - Reservation Routes
fog/api/reservations.py - Reservation Service
fog/services/reservation_service.py - Station Service
fog/services/station_service.py - Pile Repository
fog/repositories/pile_repository.py - Reservation Repository
fog/repositories/reservation_repository.py - Local SQLite
fog/database.py - Fog Configuration
fog/settings.py
Fog Cooperation
- Cooperation Routes
fog/api/cooperation.py - Round Routes
fog/api/round.py - Peer Negotiation
fog/services/peer_communication_service.py - Proposal Selection
fog/services/proposal_selection_service.py - Cooperation Service
fog/services/cooperation_service.py - Round Coordination
fog/services/round_service.py
Forecasting & Simulation
- Forecast Routes
fog/api/forecast.py - Chronos Client
fog/services/ml_client.py - Chronos Inference
ml-service/services/forecast_service.py - Simulator Routes
fog/api/simulator.py - Realtime Engine
simulator/realtime_engine.py
Other components
- Driver
- Peer Fogs
Connections 35
- Driver → Dashboard App: uses
README.md - Dashboard App → Dashboard Views: renders
dashboard/src/App.tsx - Dashboard App → Dashboard API: fetches data
dashboard/src/App.tsx - Dashboard App → Station Ranking: ranks stations
dashboard/src/App.tsx - Dashboard Views → Station Ranking: uses ranking
dashboard/src/components/StationMap.tsx - Dashboard API → Fog REST API: requests telemetry
README.md - Driver → Station Ranking: provides location
dashboard/src/services/recommendationEngine.ts - Fog REST API → Station Routes: registers routes
fog/api/main.py - Fog REST API → Reservation Routes: registers routes
fog/api/main.py - Fog REST API → Cooperation Routes: registers routes
fog/api/main.py - Fog REST API → Round Routes: registers routes
fog/api/main.py - Station Routes → Station Service: delegates
fog/api/stations.py - Station Routes → Pile Repository: reads capacity
- Reservation Routes → Reservation Service: delegates
fog/api/reservations.py - Reservation Service → Reservation Repository: manages holds
fog/services/reservation_service.py - Pile Repository → Local SQLite: reads piles
- Reservation Repository → Local SQLite: writes reservations
- Fog REST API → Local SQLite: initializes
fog/api/main.py - Local SQLite → Fog Configuration: uses configuration
fog/database.py - Cooperation Routes → Cooperation Service: delegates
fog/api/cooperation.py - Cooperation Routes → Peer Negotiation: invokes
fog/api/cooperation.py - Peer Negotiation → Proposal Selection: ranks proposals
fog/services/peer_communication_service.py - Peer Negotiation → Peer Fogs: requests help and holds
README.md - Peer Fogs → Peer Negotiation: returns proposals
README.md - Round Routes → Round Coordination: delegates
fog/api/round.py - Round Coordination → Peer Negotiation: initiates cooperation
fog/services/round_service.py - Round Coordination → Reservation Repository: completes sessions
fog/services/round_service.py - Fog REST API → Forecast Routes: registers routes
fog/api/main.py - Forecast Routes → Chronos Client: requests forecasts
- Chronos Client → Chronos Inference: requests inference
- Dashboard API → Forecast Routes: fetches forecasts
dashboard/src/services/api.ts - Fog REST API → Simulator Routes: registers routes
fog/api/main.py - Simulator Routes → Realtime Engine: controls simulation
fog/api/simulator.py - Realtime Engine → Chronos Client: uses forecasts
simulator/realtime_engine.py - Dashboard API → Simulator Routes: controls simulator
dashboard/src/services/api.ts