Skip to content

Next.js project providing real-time public transport info for Vienna using the Wiener Linien API.

Notifications You must be signed in to change notification settings

maximilianzuern/wiener-linien-dashboard

Repository files navigation

Wiener Linien Dashboard

This is a Next.js project that provides real-time public transport information for Vienna using the Wiener Linien API.

The Wiener Linien API was reverse engineered to provide details about the air conditioning in metro lines.

Screenshot of the Dashboard

Built with:

  • Next.js 14
  • TailwindCSS
  • Hosted on Cloudflare Pages via next-on-pages

Getting Started

Prerequisites

Steps

  1. Clone the repo
  2. Install dependencies via npm install in the root directory
  3. Run the development server npm run dev:

Open http://localhost:3000 with your browser to see the result.

Cloudflare Integration

This project integrates with Cloudflare Pages. Besides the dev script mentioned above, there are a few extra scripts for Cloudflare integration:

  • pages:build: Build the application for Pages using the @cloudflare/next-on-pages CLI.
  • preview: Locally preview your Pages application using the Wrangler CLI.
  • deploy: Deploy your Pages application using the Wrangler CLI.

Note: While the dev script is optimal for local development, you should periodically preview your Pages application to ensure it works properly in the Pages environment.

For more details, see the @cloudflare/next-on-pages recommended workflow.

API Routes

/api/monitor

Fetches real-time public transport information from the Wiener Linien API.

Query Parameters

  • stopID: The ID of the stop to fetch information for.

Example

"http://localhost:3000/?stopID=12345"