How mbta/dotcom works
Dotcom is the MBTA’s public transit website. A rider request enters the Phoenix router, reaches a page or live interface, and is resolved using schedules, stops, fares, CMS content, search, or real-time predictions before HTML, JSON, or PubSub updates return to the browser. The tree and excerpts clearly show these boundaries; several controller integrations and alert paths were not sampled, so those relationships are intentionally conservative.
Main entry points: router.ex Phoenix Router · stop_controller.ex Stop Page · manager.ex Prediction Manager · server.ex Departure Server
Components 24
Web Experience
- Phoenix Router
lib/dotcom_web/router.ex - Timetable Page
lib/dotcom_web/controllers/schedule/timetable_controller.ex - Line Page
lib/dotcom_web/controllers/schedule/line_controller.ex - Stop Page
lib/dotcom_web/controllers/stop_controller.ex - Trip Planner
lib/dotcom_web/live/trip_planner_live.ex - Support Form
lib/dotcom_web/controllers/customer_support_controller.ex
Transit Information
- Timetable Data
lib/schedules/repo.ex - Stop Data
lib/stops/repo.ex - Route Data
lib/routes/repo.ex - Service Patterns
lib/dotcom/service_patterns.ex - OTP Adapter
lib/dotcom/trip_plan/open_trip_planner.ex
Realtime Operations
- Prediction Manager
lib/dotcom/predictions/manager.ex - Prediction Events
lib/dotcom/predictions/event_supervisor.ex - Departure Server
lib/dotcom/upcoming_departures/server.ex - Phoenix Endpoint
lib/dotcom_web/endpoint.ex
Content and Search
- Search Service
lib/dotcom/search_service.ex - Algolia Client
lib/algolia_client.ex - CMS API
lib/cms/api.ex - Feedback Store
lib/feedback/repo.ex
Other components
- Rider
- OpenTripPlanner
- Algolia
- CMS Service
- MBTA V3 API
Connections 25
- Rider → Phoenix Router: requests
- Phoenix Router → Timetable Page: dispatches
- Phoenix Router → Line Page: dispatches
- Phoenix Router → Stop Page: dispatches
- Phoenix Router → Trip Planner: dispatches
- Phoenix Router → Support Form: dispatches
- Timetable Page → Timetable Data: reads schedules
- Timetable Page → Stop Data: reads stops
- Line Page → Service Patterns: loads services
- Stop Page → Stop Data: reads stop
- Stop Page → Route Data: loads routes
- Stop Page → Prediction Manager: gets predictions
- Trip Planner → OTP Adapter: plans trip
- OTP Adapter → OpenTripPlanner: queries routes
- Support Form → Feedback Store: sends ticket
- Prediction Manager → Prediction Events: starts events
- Prediction Manager → Phoenix Endpoint: broadcasts updates
- Departure Server → Prediction Manager: subscribes
- Departure Server → Timetable Data: loads schedules
- Departure Server → Phoenix Endpoint: broadcasts departures
- Search Service → Algolia Client: runs search
- Algolia Client → Algolia: queries indexes
- CMS API → CMS Service: fetches content
- CMS API → CMS Service: loads pages
- MBTA V3 API → Route Data: provides routes