Skip to content

ThorTveito/vognstaor

Repository files navigation

Vognstaor

A real-time bus departure display built with Next.js. Shows upcoming departures for selected bus lines at a chosen stop, with live updates and service messages.

Features

  • Real-time bus departure info from Entur API
  • Weather information from yr.no - Shows current temperature and conditions
  • Select stop and bus lines to display
  • Shows delays and service messages
  • Responsive, modern UI
  • Customizable number of departures per line

Getting Started

  1. Install dependencies:

    npm install
  2. Run the development server:

    npm run dev

    Open http://localhost:3000 in your browser.

Finding Stop Place ID

To find the stop place ID, use the Entur GraphQL Explorer:

Usage

  • On first launch, enter the stop place ID and select which bus lines to display.
  • Choose how many departures per line to show.
  • The display updates automatically every 30 seconds.
  • Service messages (if any) are shown in a yellow bar under the relevant bus line.
  • Ctrl + Shift + S is used to setup a new stop or change settings on current stop.

Customization

  • Edit app/page.jsx for main display logic.
  • UI components are in components/ui/.
  • Styles are in app/globals.css.

API

Uses Entur’s Journey Planner GraphQL API for live data.

Weather Integration

Weather data is fetched from the Norwegian Meteorological Institute's LocationForecast API (yr.no) every 30 seconds, displaying:

  • Current temperature
  • Weather conditions (clear, cloudy, rain, snow, etc.)
  • Appropriate weather icons
  • Default location: Trondheim (coordinates can be customized in the code)

About

A real-time bus departure display built with Next.js. Shows upcoming departures for selected bus lines at a chosen stop, with live updates and service messages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors