How amanxchaubey/delhi-route-optimizer-clean works
Delhi Route Optimizer is a commuter-facing transit planner with a React interface and Express/MongoDB API. The main journey resolves entered places to nearby metro stations, computes a metro route, then presents timing, fare, crowd and bus-comparison information alongside maps and route details. Separate branches provide route browsing, fares, line exploration, authentication, administration and newsletter subscription. The README documents these capabilities; unsampled subsystem internals and their wiring are represented only where the tree supports a path.
Main entry points: App.jsx Planner app · server.js API server · routeSearch.js Station routing · Routes.jsx Route browser
Components 29
Route planning
- Planner app
delhi-transit-frontend/src/App.jsx - Station routing
delhi-transit-frontend/src/utils/routeSearch.js - Metro network data
delhi-transit-frontend/src/data/metroData.js - Delhi places
delhi-transit-frontend/src/data/delhiPlaces.js - Route search form
delhi-transit-frontend/src/components/Hero.jsx - Route browser
delhi-transit-frontend/src/components/Routes.jsx - Fare calculator
delhi-transit-frontend/src/components/FareCalculator.jsx
Transit information
- Interactive map
delhi-transit-frontend/src/components/LiveMap.jsx - Static metro map
delhi-transit-frontend/src/components/StaticMap.jsx - Metro line explorer
delhi-transit-frontend/src/components/MetroLines.jsx - Realtime panel
delhi-transit-frontend/src/components/RealTimePanel.jsx - Crowd and station info
delhi-transit-frontend/src/utils/stationInfo.js - Transit estimates
delhi-transit-frontend/src/utils/transitHelpers.js
Accounts and admin
- Auth state
delhi-transit-frontend/src/context/AuthContext.jsx - Admin dashboard
delhi-transit-frontend/src/components/AdminDashboard.jsx
Backend services
- Frontend API client
delhi-transit-frontend/src/services/api.js - API server
delhi-transit-backend/server.js - Route endpoints
delhi-transit-backend/routes/routes.js - Route queries
delhi-transit-backend/controllers/routeController.js - Transit endpoints
delhi-transit-backend/routes/transit.js - Auth endpoints
delhi-transit-backend/routes/auth.js - OAuth endpoints
delhi-transit-backend/routes/oauth.js - Credential auth
delhi-transit-backend/controllers/authController.js - OAuth strategies
delhi-transit-backend/config/passport.js - Newsletter endpoints
delhi-transit-backend/routes/newsletter.js - Welcome email
delhi-transit-backend/services/emailService.js - Route records
delhi-transit-backend/models/Route.js
Other components
- Commuter
- MongoDB
Connections 30
- Commuter → Planner app: uses
- Planner app → Route search form: renders
- Planner app → Station routing: resolves and searches
- Station routing → Metro network data: reads network
- Station routing → Delhi places: matches places
- Planner app → Crowd and station info: gets crowd data
- Planner app → Transit estimates: gets estimates
- Planner app → Route browser: renders routes
- Planner app → Fare calculator: opens calculator
- Planner app → Interactive map: shows searched route
- Planner app → Static metro map: opens map
- Planner app → Metro line explorer: shows lines
- Planner app → Realtime panel: opens panel
- Route browser → Frontend API client: requests routes
- Planner app → Auth state: uses auth state
- Planner app → Admin dashboard: shows admin
- Frontend API client → API server: HTTP requests
- API server → Route endpoints: mounts
- API server → Transit endpoints: mounts
- API server → Auth endpoints: mounts
- API server → OAuth endpoints: mounts
- API server → Newsletter endpoints: mounts
- Route endpoints → Route queries: dispatches
- Route queries → Route records: queries
- Route records → MongoDB: persists through
- Auth endpoints → Credential auth: dispatches
- Credential auth → MongoDB: reads and writes users
- OAuth endpoints → OAuth strategies: uses strategies
- Newsletter endpoints → Welcome email: sends welcome email
- Welcome email → Commuter: emails subscriber