A timetable-based simulation of Istanbul’s Marmaray line, with animated train positions, station arrivals, and journey planning.
Open the demo: https://omerdikyol.github.io/rayda
Train positions are calculated from stored schedules and travel times, not a live GPS feed. Estimated arrivals can differ from actual service; use the app to explore the timetable and network rather than as an official operational tracker.
Start with trainSimulation, timetable calculations, and the journey planner. src/data holds route geometry and timetable inputs.
Rayda is an open-source web application that provides a real-time simulation of train positions on Istanbul's Marmaray line. Since official real-time tracking isn't publicly available, we create an schedule-based simulation using official schedules, station coordinates, and travel times.
- Interactive Map: Full Marmaray route with all 43 stations on an Istanbul map
- Real-time Simulation: Animated train icons showing estimated positions
- Station Timetables: Click any station to see next arrivals
- Multiple Routes: Supports different service patterns (Halkalı↔Gebze, Ataköy↔Pendik)
- Mobile Optimized: Responsive design for commuters on-the-go
- Open Source: Community-driven with transparent development
- Node.js 18+ and npm
- A Mapbox access token (free at mapbox.com)
# Clone the repository
git clone https://github.com/omerdikyol/rayda.git
cd rayda
# Install dependencies
npm install
# Set up environment (add your Mapbox token)
cp .env.example .env.local
# Edit .env.local and add: VITE_MAPBOX_ACCESS_TOKEN=your_token_here
# Start development server
npm run devOpen http://localhost:5173 to view the app.
npm run dev- Start development server with hot reloadnpm run build- Build production bundlenpm run lint- Run ESLint for code qualitynpm run preview- Preview production build locally
- Frontend: React 19 + TypeScript
- Mapping: Mapbox GL JS for interactive visualization
- State: Zustand for train position management
- Styling: Tailwind CSS + Radix UI components
- Build: Vite for fast development and optimized builds
Since real-time train location data isn't publicly available, Rayda creates an schedule-based simulation:
- Schedule Data: Uses official Marmaray timetables and route patterns
- Time Calculation: Calculates train positions based on departure times and inter-station travel data
- Position Mapping: Converts timing data to geographic coordinates for map display
- Real-time Updates: Updates every second to show current estimated positions
We welcome contributions from the community! This project especially needs:
- Accurate Data: Station coordinates and precise travel times
- Bug Reports: Testing on different devices and browsers
- Features: Ideas for improving the user experience
- Localization: Turkish language support and other translations
Read our Contributing Guide to get started.
- Verification of station coordinates (see issues labeled
data-needed) - Inter-station travel time collection
- Mobile testing and UX improvements
- Accessibility enhancements
Check our Roadmap for planned features and development timeline.
Current Phase: Completed Station Timetables & Mobile UX (Phase 3) ✅
Next: Advanced features and user experience (Phase 4)
This project is licensed under the MIT License - see the LICENSE file for details.
- Istanbul Metropolitan Municipality for public transport data
- OpenStreetMap contributors for geographic data
- Mapbox for mapping infrastructure
- The open-source community for tools and libraries
- Bug Reports: Create an issue
- Feature Requests: Start a discussion
- Questions: Check our FAQ
- Security: See our Security Policy