- Interactive map with 22,000+ railway stations across Italy, Switzerland, Germany, Finland, Belgium, Denmark, the Netherlands, Norway, Sweden, Poland, the United Kingdom, Ireland, France, and Luxembourg
- Real-time arrivals and departures, where supported by each official source (RFI, SBB, DB, Digitraffic, iRail, Rejseplanen, NS, Entur, Trafiklab, PLK, LDBWS, Irish Rail, SNCF, Mobiliteit.lu)
- Station search with fuzzy matching
- Operator directory with network metadata and static coverage maps
- Trending stations ranked by unique visitors, with both unique and total visit counts available
- Shareable URLs with map state, saved stations, and recent stations
- User geolocation support
- Responsive mobile-friendly design
| Directory | Description |
|---|---|
| apps/api | Cloudflare Workers API for train data |
| apps/studio | Admin tool for station data management |
| apps/web | TanStack Start frontend and media Worker |
| packages/data | Shared station data and TypeScript types |
| packages/ui | Shared React component library |
# Install dependencies
pnpm install
# Run all development apps
pnpm dev
# Run specific app
pnpm --filter=web dev # Frontend at localhost:3000
pnpm --filter=api dev # API server
pnpm --filter=studio dev # Admin tool at localhost:3001| Command | Description |
|---|---|
pnpm dev |
Start all development servers |
pnpm --filter=studio dev |
Start the admin tool at localhost:3001 |
pnpm build |
Build all packages |
pnpm lint --force |
Lint all packages |
pnpm format |
Format code with oxfmt |
pnpm check-types --force |
Run TypeScript type checking |
pnpm --filter=api cf-typegen |
Generate API Worker types |
pnpm --filter=web cf-typegen |
Generate web Worker types |
pnpm --filter=api deploy |
Deploy the API Worker to Cloudflare |
pnpm --filter=web deploy |
Build and deploy the web Worker to Cloudflare |
The public website runs on Cloudflare Workers using TanStack Start, Vite, and the Cloudflare Vite
plugin. The browser assets are deployed with the Worker through Cloudflare Workers Static Assets,
while request-time rendering and same-origin /media/* routes run in the Worker. The Hono API is a
separate Cloudflare Worker at api.railradar24.com.
The Studio app remains a separate SvelteKit application and uses the Cloudflare adapter for production builds.
Shared media is served by apps/web on the same origin as the TanStack Start frontend.
Repo-owned media such as flags, operator logos, screenshots, and static social images is served
under /assets/* through Cloudflare Workers Static Assets. Generated images and R2-backed station
photos use same-origin /media/* routes; curated photos live in an EU Cloudflare R2 bucket and are
described by per-station manifests. See the
web media delivery documentation for the directory convention,
manifest template, image requirements, and upload workflow.
Rail Radar is free to use and independently maintained. If it's useful to you, you can help cover the API calls, hosting, and map tiles that keep it running.
Donate via Polar — one-time, monthly, or yearly support. Also reachable from the in-app /donate page or the "Sponsor" button at the top of this repository.
See CONTRIBUTING.md for setup, development workflow, quality checks, and pull request guidelines.
Station data contributions are supported through Rail Radar Studio. For the full workflow, see CONTRIBUTING.md and apps/studio/README.md.
This project is licensed under the MIT License - see the LICENSE file.
- 🇮🇹 Italian train data from RFI (Rete Ferroviaria Italiana)
- 🇨🇭 Swiss train data from transport.opendata.ch
- 🇫🇮 Finnish train data from Digitraffic
- 🇧🇪 Belgian train data from iRail (NMBS/SNCB)
- 🇳🇱 Dutch train data from NS (Nederlandse Spoorwegen)
- 🇬🇧 UK train data from LDBWS (National Rail)
- 🇮🇪 Irish train data from Irish Rail (Iarnród Éireann)
- 🇳🇴 Norwegian train data from Entur
- 🇸🇪 Swedish train data from Trafiklab
- 🇵🇱 Polish train data from PKP Polskie Linie Kolejowe (PLK)
- 🇩🇰 Danish train data from Rejseplanen
- 🇩🇪 German train data from Deutsche Bahn (DB)
- 🇫🇷 French train data from SNCF (Navitia)
- 🇱🇺 Luxembourg train data from Mobiliteit.lu
- Map rendering by Mapbox
