A modern, location-aware public transit information dashboard built with React and Vite. Transcyclopedia provides real-time transit data including routes, stops, departures, service alerts, and an interactive mapβall based on your current location.
- Routes Nearby: View all transit routes within 500 meters of your location, including route numbers, names, and operating agencies
- Stops Nearby: Discover nearby transit stops with expandable departure information
- Agencies Nearby: See transit agencies serving your area with contact information (website, email, phone)
- Search for any transit agency by name
- View detailed agency information including:
- Phone number
- Email address
- Website
- Timezone
- Look up real-time departures by agency and stop ID
- View estimated vs. scheduled arrival times (estimated times shown in green)
- See route alerts associated with departures
- View active service alerts from nearby agencies
- Check route-specific alerts with visual route identification
- Stay informed about service disruptions, detours, and delays
- Powered by Mapbox GL with 3D building visualization
- View transit routes plotted on the map with official route colors
- See nearby transit stops with custom markers
- Hover over routes to see route numbers
- Pan and zoom to explore routes in the current view
- Light/Dark Mode: Toggle between themes with system preference detection
- Responsive Design: Fully responsive layout for desktop and mobile devices
- Real-time Clock & Weather: Current date, time, and local weather displayed in the header
- Glassmorphic UI: Modern, sleek interface with translucent elements
- Node.js (v18 or higher recommended)
- npm or yarn
Transcyclopedia requires the following API keys:
-
Transitland API Key - For transit data (routes, stops, agencies, departures, alerts)
- Get your key at: transit.land
-
OpenWeatherMap API Key - For weather information
- Get your key at: openweathermap.org
-
Mapbox Access Token - For interactive map functionality
- Get your token at: mapbox.com
-
Clone the repository:
git clone <repository-url> cd Transcyclopedia
-
Install dependencies:
npm install
-
Create a
.envfile in the project root with your API keys:VITE_TRANSITLAND_API_KEY=your_transitland_api_key VITE_WEATHER_KEY=your_openweathermap_api_key VITE_MAPBOX_KEY=your_mapbox_access_token
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run buildThe built files will be in the dist/ directory.
npm run previewWhen you first load Transcyclopedia, your browser will request permission to access your location. This is required for:
- Finding nearby routes, stops, and agencies
- Displaying local weather
- Centering the interactive map
Use the left sidebar to navigate between sections:
- Overview - Dashboard with nearby transit information
- Agency - Search for transit agencies
- Departures - Look up departures by agency and stop
- Alerts - View service alerts
- Map - Interactive transit map
- About - Application information
In the Overview section, click the βΎ button on any stop card to expand and view upcoming departures for that stop.
Click the sun/moon icon in the top right to switch between light and dark modes. Your preference is saved and persists across sessions.
- Frontend Framework: React 19.2.0
- Build Tool: Vite 7.2.4
- Mapping: Mapbox GL JS 3.17.0
- Icons: Font Awesome 6.4.0
- Weather Icons: Weather Icons 2.0.9
- Linting: ESLint 9.39.1
Transcyclopedia/
βββ public/
β βββ favicon.ico
βββ src/
β βββ scripts/
β β βββ Agency.jsx # Agency search functionality
β β βββ AllAlerts.jsx # Service alerts handling
β β βββ Departures.jsx # Departure lookups
β β βββ InteractiveMap.jsx # Mapbox map component
β β βββ Overview.jsx # Nearby routes, stops, agencies
β β βββ Responsiveness.jsx # Responsive layout handling
β β βββ TimeAndWeather.jsx # Date, time, and weather
β β βββ envUnloader.jsx # Environment variable loader
β βββ styles/
β β βββ index.css # Global styles
β β βββ MainConts.css # Main container styles
β β βββ Navbar.css # Navigation styles
β β βββ InterfaceMaterials.css
β β βββ Scrollbars.css
β β βββ Responsive.css # Media queries
β β βββ lightDarkMode.css # Theme styles
β βββ main.jsx # React entry point
β βββ MainConts.jsx # Main application component
β βββ Navbar.jsx # Navigation sidebar
βββ .env # Environment variables (not committed)
βββ eslint.config.js
βββ index.html
βββ package.json
βββ vite.config.js
- Transit Data: Transitland - An open platform that aggregates transit data from agencies worldwide
- Weather Data: OpenWeatherMap - Current weather conditions
- Map Tiles: Mapbox - Interactive maps with 3D buildings
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source. Please check the repository for license information.
Created by Dino Wun
Transcyclopedia - Your encyclopedia for public transit πππ
