How dmau1420/transystem-twins works
TranSystem-Twins is a modular platform for building and evaluating intelligent-transport digital twins. The visible user workflow is to authenticate, explore a map, search for a location, and define map data; the project/scenario and SUMO modules describe the broader workflow of importing an OSM area, building a scenario, simulating it, and analyzing results. The graph combines sampled calls with module references in the source index; some frontend integrations and unsampled backend capabilities are therefore shown only where their ownership is documented.
Main entry points: sumo/main.py Simulation coordinator · App.jsx App routes · backend/main.py FastAPI application · MapContainer.jsx Map view
Components 27
Mapping interface
- App routes
frontend/src/App.jsx - Map view
frontend/src/components/map/MapContainer.jsx - Map data state
frontend/src/context/MapDataContext.jsx - Map data panel
frontend/src/components/MapDataPanel.jsx - Location search
frontend/src/components/SearchBar.jsx - Geocoding
frontend/src/utils/geocoding.js - Projects panel
frontend/src/components/dashboard/ProjectsPanel.jsx - Sidebar
frontend/src/components/sidebar/Sidebar.jsx
Authentication
- Login and registration
frontend/src/pages/RegisterPage.jsx - Frontend auth state
frontend/src/context/AuthContext.jsx
Backend API
- FastAPI application
backend/main.py - Auth routes
backend/routers/r_auth.py - Auth service
backend/services/auth_service.py - User records
backend/models/md_user.py - Scenario routes
backend/routers/r_escenarios.py - Points routes
backend/routers/r_points.py - Points storage
backend/services/points_service.py
SUMO workflow
- OSM import
backend/services/importacion_osm.py - Simulation coordinator
sumo/main.py - Network and demand data
sumo/data_generators.py - Scenario network builder
sumo/scenario_builder.py - SUMO simulation
sumo/simulation_engine.py - Result analysis
sumo/result_analyzer.py - SUMO tools
sumo/sumo_tools.py
Other components
- User
- Overpass / OSM
- SUMO runtime
Connections 30
- User → App routes: opens
frontend/src/App.jsx - App routes → Map view: renders
frontend/src/App.jsx - App routes → Map data panel: renders
frontend/src/App.jsx - App routes → Location search: renders
frontend/src/App.jsx - App routes → Sidebar: renders
frontend/src/App.jsx - App routes → Login and registration: routes to
frontend/src/App.jsx - App routes → Frontend auth state: provides
frontend/src/App.jsx - Map view → Map data state: reads
frontend/src/components/map/MapContainer.jsx - Map view → Geocoding: uses
frontend/src/components/map/MapContainer.jsx - Location search → Geocoding: searches
frontend/src/components/SearchBar.jsx - Location search → Map data state: sets target
frontend/src/components/SearchBar.jsx - Map data panel → Map data state: reads
frontend/src/components/MapDataPanel.jsx - Map data panel → FastAPI application: requests data
frontend/src/components/MapDataPanel.jsx - Sidebar → Projects panel: renders
frontend/src/components/sidebar/Sidebar.jsx - Login and registration → Frontend auth state: uses
frontend/src/pages/RegisterPage.jsx - FastAPI application → Auth routes: registers
backend/main.py - FastAPI application → Scenario routes: registers
backend/main.py - FastAPI application → Points routes: registers
backend/main.py - Auth routes → Auth service: calls
backend/routers/r_auth.py - Auth service → User records: queries and writes
backend/services/auth_service.py - Points routes → Points storage: calls
backend/routers/r_points.py - Simulation coordinator → OSM import: imports OSM
- Simulation coordinator → Overpass / OSM: downloads network
sumo/main.py - Simulation coordinator → Network and demand data: generates inputs
sumo/main.py - Simulation coordinator → Scenario network builder: builds network
sumo/main.py - Simulation coordinator → SUMO simulation: runs
sumo/main.py - Simulation coordinator → Result analysis: processes results
sumo/main.py - SUMO simulation → SUMO runtime: drives simulation
sumo/simulation_engine.py - SUMO simulation → SUMO tools: checks output
sumo/simulation_engine.py - Simulation coordinator → FastAPI application: posts results
sumo/main.py