A modern, real-time transit departure board built with Vite, React, TypeScript, and TailwindCSS v3. Display upcoming departures for any GTFS-compatible transit system with live updates and multi-language support.
View Live Demo on GitHub Pages
- π Multi-language Support: English, French, Spanish, and German (EN, FR, ES, DE)
- β±οΈ Real-time Updates: GTFS-RT integration for live departure times
- π¨ Customizable Themes: Configure primary and secondary colors via URL parameters
- π§ Interactive URL Builder: Easy-to-use form for building configuration URLs with live preview
- π Browse Stops: Interactive modal to search and select stops from your GTFS feed
- π± Fully Responsive: Mobile-first design with adaptive layouts
- π Auto-refresh: Configurable refresh intervals
- β° Timezone-Aware: All times displayed in the agency's timezone
- π― Adaptive Height: Uses CSS Container Queries for optimal screen usage
- π Service Alerts: Optional panel showing relevant transit alerts
- π οΈ Technical Details: Optional panel for debugging (timezone, agency, render time)
- πΎ localStorage Persistence: Your configuration is automatically saved
Departure board with route icons, real-time updates, and color-coded departure times.
Interactive configuration form with live preview and one-click URL generation.
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/sysdevrun/gtfs-sqljs-departures.git
cd gtfs-sqljs-departures
# Install dependencies
npm install
# Start development server
npm run devThe application will be available at http://localhost:5173
# Build the project
npm run build
# Preview the production build
npm run preview- Navigate to the URL Builder
- Enter your GTFS feed URL
- Select your stops (or use "Browse stops" to search)
- Customize colors, language, and other settings
- Click "Copy URL" or "Go to Departure Board"
The application is configured entirely through URL parameters:
gtfsUrl- URL to GTFS static feed (ZIP file)stops- Comma-separated stop IDs (e.g.,1001,1002,1003)
gtfsRtUrls- Comma-separated GTFS-RT feed URLs for realtime updatesshowAlerts- Set totrueto display the alerts panelrefresh- Refresh interval in seconds (default: 20)lang- Language code:en,fr,es, ordetech- Set totrueto show technical details panel and trip short namesprimaryColor- Primary theme color as hex without # (default:3b82f6)secondaryColor- Secondary theme color as hex without # (default:f97316)builder- Show the URL builder interface
https://sysdevrun.github.io/gtfs-sqljs-departures/?gtfsUrl=https://pysae.com/api/v2/groups/car-jaune/gtfs/pub>fsRtUrls=https://pysae.com/api/v2/groups/car-jaune/gtfs-rt&stops=1001,1002,1003&showAlerts=true&refresh=20&lang=fr&tech=true&primaryColor=3b82f6&secondaryColor=f97316
Customize the appearance using URL parameters:
- Primary Color: Used for interactive elements, clock, and theme accents
- Secondary Color: Used for "LAST" departure indicators and accents
Example with custom colors (dark blue primary, orange secondary):
?primaryColor=1e40af&secondaryColor=ea580c
Change the language using the lang URL parameter:
en- Englishfr- FranΓ§ais (French)es- EspaΓ±ol (Spanish)de- Deutsch (German)
If not specified, the application will use your browser's default language.
- React 18.3+ - UI framework
- TypeScript - Type safety
- Vite - Build tool and dev server
- TailwindCSS v3 - Utility-first CSS framework
- react-i18next - Internationalization
- gtfs-sqljs - GTFS data parsing and querying (same author)
- sql.js - SQLite in the browser
- date-fns & date-fns-tz - Date/time manipulation with timezone support
- URL Parsing: Extracts configuration from URL parameters
- GTFS Loading: Loads static GTFS data (skips unnecessary files for performance)
- GTFS-RT Integration: Fetches real-time updates every 30 seconds
- Departure Processing: Filters, groups, and sorts departures by route and direction
- Display Updates: Refreshes UI based on configured interval
- CSS Container Queries: Adaptive height layout that automatically fits routes to available screen space
- CSS Custom Properties: Dynamic theming with configurable colors
- Responsive Design: Mobile-first approach with Tailwind breakpoints
All time operations use the agency timezone from the GTFS feed, not the browser timezone. This ensures accurate departure times regardless of where users are located.
See CLAUDE.md for detailed documentation on timezone handling.
This project is configured for automatic deployment to GitHub Pages:
- Push to the
mainbranch - GitHub Actions will automatically build and deploy
- Access your deployment at
https://[username].github.io/gtfs-sqljs-departures/
The deployment workflow is defined in .github/workflows/deploy.yml.
The project can be deployed to any static hosting service:
npm run build
# Deploy the 'dist' folder to your hosting serviceContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
sysdevrun
- GitHub: @sysdevrun
- Creator of gtfs-sqljs
- Built with gtfs-sqljs for efficient GTFS data processing
- Uses sql.js for in-browser SQLite
- Inspired by real-world transit departure boards
- gtfs-sqljs - GTFS data parsing library (same author)
Please use the GitHub Issues page to report bugs or request features.
Made with β€οΈ for public transit enthusiasts