How sbcoding271/metromitra works
MetroMitra helps Pune Metro passengers explore stations and plan accessible journeys, ask multilingual questions by text or voice, and review AI-assisted photo issue reports. The main journey runs from the passenger-facing planner through the API client and metro route endpoint to the graph planner and verified network data, then back to route presentation. Separate branches cover AI chat and journey interpretation, issue triage, and browser-local reports and preferences. Relationships are limited to those shown in the supplied excerpts, source index, or README; unsampled components are represented without speculative internal connections.
Main entry points: App.jsx Application shell · api.js API client · geminiService.js Gemini services · issueRoutes.js Issue endpoint
Components 28
Passenger experience
- Application shell
client/src/App.jsx - Dashboard
client/src/components/Dashboard.jsx - Network explorer
client/src/components/NetworkExplorer.jsx - Stations directory
client/src/components/StationsView.jsx - Favourite stations
client/src/components/FavouritesView.jsx - Alerts and help
client/src/components/ServiceAlertsView.jsx - Language translations
client/src/i18n/translations.js - Browser-local storage
client/src/services/storage.js
Journey and network
- Journey planner
client/src/components/JourneyPlanner.jsx - Route results
client/src/components/RouteResultCard.jsx - Schematic network map
client/src/components/SchematicNetworkMap.jsx - Route and station graph
server/src/services/metroGraph.js - Verified Pune network
server/src/data/puneMetroNetwork.js
AI and reporting
- AI text assistant
client/src/components/AiAssistant.jsx - Voice assistant
client/src/components/VoiceAssistant.jsx - Browser speech
client/src/hooks/useSpeech.js - Issue reporter
client/src/components/IssueReporter.jsx - My reports
client/src/components/MyReports.jsx - Gemini services
server/src/services/geminiService.js
API backend
- API client
client/src/services/api.js - Express API app
server/src/app.js - Metro endpoints
server/src/routes/metroRoutes.js - Assistant endpoints
server/src/routes/assistantRoutes.js - Issue endpoint
server/src/routes/issueRoutes.js - Image validation
server/src/middleware/upload.js - Server configuration
server/src/config/env.js
Other components
- Passenger
- Google Gemini
Connections 41
- Passenger → Application shell: uses
README.md - Application shell → Dashboard: renders
client/src/App.jsx - Application shell → Journey planner: renders
client/src/App.jsx - Application shell → Network explorer: renders
client/src/App.jsx - Application shell → Stations directory: renders
client/src/App.jsx - Application shell → Favourite stations: renders
client/src/App.jsx - Application shell → Alerts and help: renders
client/src/App.jsx - Application shell → AI text assistant: renders
client/src/App.jsx - Application shell → Voice assistant: renders
client/src/App.jsx - Application shell → Issue reporter: renders
client/src/App.jsx - Application shell → My reports: renders
client/src/App.jsx - Application shell → API client: loads network
client/src/App.jsx - Application shell → Browser-local storage: persists reports
client/src/App.jsx - Journey planner → API client: requests routes
client/src/components/JourneyPlanner.jsx - Journey planner → Route results: renders
client/src/components/JourneyPlanner.jsx - AI text assistant → API client: sends chat
client/src/components/AiAssistant.jsx - AI text assistant → Route results: renders
client/src/components/AiAssistant.jsx - Voice assistant → API client: sends queries
client/src/components/VoiceAssistant.jsx - Voice assistant → Browser speech: uses speech
client/src/components/VoiceAssistant.jsx - Voice assistant → Route results: renders
client/src/components/VoiceAssistant.jsx - Issue reporter → API client: submits image
client/src/components/IssueReporter.jsx - Issue reporter → Browser-local storage: saves report
client/src/components/IssueReporter.jsx - My reports → Browser-local storage: manages reports
client/src/components/MyReports.jsx - Network explorer → Schematic network map: renders
client/src/components/NetworkExplorer.jsx - Dashboard → Schematic network map: renders
client/src/components/Dashboard.jsx - API client → Metro endpoints: requests metro data
client/src/services/api.js - API client → Assistant endpoints: requests assistance
client/src/services/api.js - API client → Issue endpoint: submits analysis
client/src/services/api.js - Express API app → Metro endpoints: mounts routes
server/src/app.js - Express API app → Assistant endpoints: mounts routes
server/src/app.js - Express API app → Issue endpoint: mounts routes
server/src/app.js - Metro endpoints → Route and station graph: calls planner
server/src/routes/metroRoutes.js - Assistant endpoints → Gemini services: calls services
server/src/routes/assistantRoutes.js - Issue endpoint → Image validation: validates upload
server/src/routes/issueRoutes.js - Issue endpoint → Gemini services: analyzes image
server/src/routes/issueRoutes.js - Issue endpoint → Route and station graph: finds station
server/src/routes/issueRoutes.js - Route and station graph → Verified Pune network: reads network
server/src/services/metroGraph.js - Gemini services → Route and station graph: uses verified routes
server/src/services/geminiService.js - Gemini services → Server configuration: checks configuration
server/src/services/geminiService.js - Gemini services → Google Gemini: generates responses
server/src/services/geminiService.js - Express API app → Server configuration: reads settings
server/src/app.js