DoluMu is an AI-powered web app that predicts crowding levels on Istanbul public transit up to 24 hours ahead. Before you leave, you can check how crowded your bus, metro, or ferry is likely to be and plan a more comfortable trip.
- Forecast up to 24 hours ahead: See predicted crowding for any line for every hour of today and tomorrow
- Easy-to-read crowd levels: Clear, color-coded levels ("Low", "Medium", "High", "Very High")
- Occupancy percentage: View estimated occupancy (%) and passenger volume for each hour
- Smart predictions: A machine learning model combining historical ridership, weather, and calendar features
- Important: These values are not real-time sensor measurements โ they are forecasts learned from past patterns.
- Line visualization:
- Bus routes rendered on the map with start/end stops and route polylines
- Location-based features:
- See your current location on the map
- Find nearby lines more easily
- Map UX enhancements:
- Smooth zoom and pan
- Metro station amenity badges (elevator, escalator, WC)
- Distinct line and stop styling for fast recognition
- Live timetable info:
- Metro Istanbul API integration for live schedule data
- Next 5 departures with minute-level countdowns
- โOn platformโ / โin X minutesโ style status messages
- Full-day timetable:
- First/last departures
- Direction-aware schedules (outbound/inbound)
- Clear messaging for out-of-service hours
- Service-hour awareness: Automatic warnings when a line is outside service hours
- Quick access: Save frequently used lines
- Favorite line cards:
- Show current-hour crowding summary
- One-tap access to details
- Persistent storage: Favorites are stored locally in your browser
- Turkish + English: Full localization support
- Smart language detection: Uses browser language by default
- Easy switching: Change language from the Settings page
- Add to Home Screen: Use like a native app
- Offline support: Core UI keeps working without network
- Fast loading: Service worker caching for smoother performance
- Cross-platform: iOS, Android, and desktop support
- View line-specific
max_capacity,vehicle_capacity, and (when available)trips_per_hour. - For bus lines, review capacity assumptions and a vehicle-mix summary in the Capacity modal.
- For rail, a static capacity table and a Marmaray static schedule integration help keep capacity/service-hour logic stable.
What you see on the start screen:
- Top bar:
- Smart search (search by line code or description)
- Traffic widget: Istanbul-wide traffic congestion index (0โ100%)
- Weather widget: current temperature + 6-hour forecast
- Language switcher
- Map view:
- Istanbul map with public transit layers
- Metro lines rendered with official colors and stations
- Bus route visualization after selecting a line
- Bottom navigation:
- Quick switch between Map, Favorites, and Settings
Search experience:
- Type a line code in the search bar (e.g., "M2", "500T", "15F")
- Results filter instantly
- Each result shows:
- Line code (highlighted)
- Transport type label (Bus/Metro)
- Route description (matched terms highlighted)
- Tap a result to update the map and open the line panel
A smart panel that opens when you select a line:
- Bottom sheet:
- Swipe up to expand
- Swipe down to minimize
- Close button at the top-right
- Draggable modal:
- Drag anywhere on the screen
- Resize from the corner
- โReset positionโ button to return to default
- Minimize / maximize: work in a compact title-bar mode
1. Header
- Line code and name
- Current-hour occupancy badge
- Add/remove favorite button
- Direction selector (Bus) or station selector (Metro)
2. Crowding Card (Main Summary)
- Selected hour label: โEstimated crowding โ 14:00โ
- Crowd level: Large, color-coded label (e.g., โMediumโ)
- Occupancy bar: Percentage-based progress bar
- Details:
- Estimated passenger volume (e.g., โ1,234 peopleโ)
- Max capacity (explained via tooltip)
- Time slider: Select an hour (0โ23)
- Defaults to current hour
- Updates data instantly while sliding
3. Schedule Card
- Next 3โ5 departures: live countdown
- โView full timetableโ button
- Modal view:
- Full-day schedule
- First/last departure times
- Station + direction options for Metro
4. 24-Hour Chart
- Interactive chart (Recharts):
- Estimated passenger volume per hour
- Color/gradient styling based on crowd levels
- Hover for details
- Service hours visualization:
- Gray bars show out-of-service hours
- Tooltip shows โNo serviceโ
5. Status Banners (when active)
- Warning banner: disruptions and announcements
- Out-of-service banner: if the line is not running right now
- Clickable for details (opens a modal)
Manage saved lines in one place:
- Favorite line cards:
- Mini summary for the current hour
- Passenger volume and occupancy percentage
- Line metadata (code, name, type)
- Tap to open the full detail panel
- Empty state:
- If no favorites are saved, shows a guide card
- โGo to linesโ button navigates back to the map
- Step-by-step instructions for adding favorites
Customize your app:
- Language: Turkish โ English
- PWA install: add-to-home-screen instructions
- iOS Safari/Chrome-specific steps
- Animated, step-by-step visuals
- Data management:
- Clear favorites (with confirmation)
- Reset app (clears cache)
- Feedback form:
- Bug reports
- Data issue reports
- Feature requests
- Optional email follow-up
- Dark theme: modern slate-gray palette
- Neon accents: purple/amber gradients and bright highlights
- Glassmorphism: translucent surfaces with backdrop blur
- Rounded UI: friendly 2xl border radius style
- Crowding colors:
- ๐ข Green: Low
- ๐ก Yellow: Medium
- ๐ Orange: High
- ๐ด Red: Very High
- โซ Gray: Out of service / Unknown
- Transport types:
- Metro: blue tones
- Bus: green/amber tones
- Framer Motion:
- Panel open/close animations
- Page transitions
- Drag interactions
- Haptic feedback: optional vibration on mobile devices
- Skeleton loaders: placeholders during fetch
- Smooth scrolling: custom scrollbar styling in lists
- Semantic HTML: proper heading hierarchy
- ARIA labels: screen reader support
- Keyboard navigation: tab-through navigation
- High contrast: WCAG-aware color contrast
- Loading states:
aria-busyandsr-onlypatterns
- Mobile-first: touch-optimized layouts
- Tablet support: mid-size layouts
- Desktop: multi-panel / wide layout behavior
- Dynamic viewport: 100dvh for full-screen experience
This section is a short technical summary for developers. If you only want to use the app, you can skip it.
Developer docs:frontend/README_TECHNICAL_UI.mdandsrc/api/README_API.md
- Next.js 16 (App Router): modern React framework
- React 19: current React version
- next-intl 4.5.5: internationalization
- Zustand: lightweight state management
- Tailwind CSS: utility-first styling
- Framer Motion: animations
- React Leaflet: interactive maps
- Recharts: charts and data visualization
- Axios: HTTP client
- date-fns: date utilities
{
selectedLine: null, // Selected line object
isPanelOpen: false, // Is the detail panel open?
isPanelMinimized: false, // Is the panel minimized?
selectedHour: 14, // Selected hour (0-23)
userLocation: [41.0, 28.9], // GPS coordinates
favorites: ['M2', '500T'], // Favorite line codes
selectedDirection: 'G', // 'G' (outbound) or 'D' (inbound)
showRoute: true, // Show route polyline on map
metroSelection: { // Metro selection state
lineCode: 'M2',
stationId: 123,
directionId: 1
}
}- Backend: FastAPI (Python)
- Base URL:
NEXT_PUBLIC_API_URL(default if unset:https://ibb-transport.onthewifi.com/api) - Endpoints:
GET /lines/search?query={query}: line searchGET /forecast/{lineCode}?target_date={date}&direction={dir}: 24-hour forecast (note:directionfilters service-hours/alerts; the forecast series is not split by direction)GET /lines/{lineCode}: line metadataGET /lines/{lineCode}/status: service status and alerts
- Metro API: Metro Istanbul live timetable API
- Weather: Open-Meteo integration
Forecast response (24 hours):
[
{
"hour": 14,
"predicted_value": 1234,
"occupancy_pct": 67,
"crowd_level": "High",
"max_capacity": 1850,
"in_service": true
}
]Line metadata:
{
"line_name": "M2",
"transport_type_id": 2,
"road_type": "metro",
"line": "Yenikapฤฑ - Hacฤฑosman Metro Line"
}- Debounced search: 300ms delay to reduce API calls
- Lazy loading: pages/components load on demand
- Image optimization: Next.js Image component
- Code splitting: automatic route-based splitting
- Service worker: PWA caching strategies
- localStorage: favorites stored locally
- Static data:
public/data/line_routes.json: bus line stop sequencespublic/data/metro_topology.json: metro topologypublic/data/stops_geometry.json: stop coordinates
- Cache strategy:
- Metro schedule: short-lived cache for responsive UX
- Route data: cached at first load, refreshed on reload
- Forecast: re-fetched periodically while the app is open
useDebounce: input debouncinguseGetTransportLabel: transport label translations via i18nuseMediaQuery: responsive breakpointsuseMetroSchedule: metro schedule stateuseMetroTopology: parse metro topologyusePwaInstall: PWA install event handlinguseRoutePolyline: route polyline builder
- Open the app โ map view
- Search for โM2โ
- Tap the M2 metro line
- The panel opens for 08:00:
- Very High crowding (92% occupancy)
- Estimated 1,847 passengers
- Slide to 09:00:
- High crowding (78% occupancy)
- Estimated 1,562 passengers
- Decision: travel one hour later for a more comfortable ride
- Tap the star icon to add it to favorites
- Tap the location button on the map
- Your GPS location appears as a blue dot
- Search for nearby bus โ500Tโ
- The panel opens and the route is drawn on the map
- Start/end stops are highlighted in green/red
- Check departure info: โin 5 minutesโ
- The 24-hour chart shows crowding rising at 18:00
- Plan your return trip accordingly
- Open the Favorites page
- Tap your saved M4 line
- Choose station โKadฤฑkรถyโ
- Direction: โtowards Tavลantepeโ
- Live departures:
- Train arriving in 2 minutes
- Next train in 7 minutes
- Tap โView full timetableโ to open the daily schedule
- Last departure: 23:45 โ plan your return accordingly
- Detects when a line is out of service for the selected hour
- Dedicated UI for โNo serviceโ states
- Shows next service time to guide the user
- Visual โgapsโ / gray bars for out-of-service hours in charts
In DoluMu, the โdirectionโ selection exists to correctly display direction-dependent info such as service hours, alerts, and route geometry:
- Different operating hours and out-of-service periods per direction (G/D)
- Direction-specific route polyline (bus)
- Station + direction selection for accurate metro timetables
- Full network rendering:
- All stations shown in order
- Connection segments between stations
- Transfer stations highlighted
- Station details:
- Amenity info (elevator, escalator)
- Functional codes
- Station order (stop 1, stop 2, ...)
- Dynamic line logic:
- M1 branch handling (M1A / M1B)
- Station order reverses based on direction
- Crowd level mapping:
- Occupancy percentage โ crowd level
- Instant recognition via color
- Visual proportion via progress bars
- 24-hour chart:
- Trend visualization
- Interactive tooltips
- Gradient fill for readability
- Graceful degradation:
- Clear messages on API errors
- Automatic retry on timeouts
- Connection guidance for network errors
- Loading states:
- Skeleton screens while loading
- Screen-reader friendly loading text
- Shimmer placeholders
- iOS:
- Safari-specific install instructions
- Safe-area inset handling
- Touch delay optimizations
- Android:
- Chrome PWA install prompt
- Material Design aligned UX
- Desktop:
- Hover states
- Keyboard navigation
- Resize handles
- Reduce waiting time by choosing less crowded hours
- Compare alternative times and routes quickly
- Check conditions before leaving
- Avoid peak crowding
- Increase the chance of finding a seat
- Reduce travel stress by planning ahead
- Machine learning models trained on historical data
- Official ridership data sources
- Updated forecasts produced daily
- Free to use
- Works in any modern browser
- PWA keeps core functionality available even when offline
User Interaction
โ
Next.js Frontend (React Components)
โ
Zustand Store (State Management)
โ
API Client (Axios)
โ
FastAPI Backend
โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ PostgreSQL โ LightGBM โ Metro API โ
โ (Metadata) โ (ML Model) โ (Live Data) โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
- Forecasts: precomputed daily (24-hour horizon)
- Metro schedules: near real-time experience with short-lived caching
- Line status: fetched on demand
- Routes: static JSON assets (updated when sources change)
For the detailed design system, see DESIGN_SYSTEM.md. Key elements:
- Typography: Inter font family, responsive font sizes
- Spacing: 4px grid system (space-1 โ space-20)
- Colors:
- Background: slate-950
- Surface: slate-900
- Text: gray-100
- Primary: purple-600
- Secondary: amber-500
- Shadows: multi-layer shadows for depth
- Borders: subtle white/10 opacity borders
From the frontend/ directory:
npm installnpm run devOpen http://localhost:3000 in your browser.
npm run build
npm startnpm run lintThis platform is built to help millions of people in Istanbul make daily trips more predictable and comfortable. It keeps improving thanks to user feedback and community support.
Have a great trip! ๐๐โด๏ธ