Skip to content

Robustic/Jumptonext

Repository files navigation

Jumptonext

Jumptonext is a web application that shows users the next departures from the selected stop. Jumptonext works in the Helsinki metropolitan area. It queries timeslots for HSL public transport automatically.

Jumptonext is free for all! No registration or password is needed. But the user can create an account and save favorite stops to quickly check the next vehicles leaving from those stops.

You can watch the video jumptonext.cy.js.mp4 of testing the Jumptonext app with Cypress. It demonstrates the main features of the app.

Tools used to develop Jumptonext

Jumptonext is created with React (UI and business logic, both). Testing of Jumptonext is done using Jest and Cypress. All the most important functions and components are tested.

A backend to save user account information and favorite stops is created with Node.js. Node.js uses a MongoDB database. Queries between the Digitransit API, the React app, and the Node.js server are handled using GraphQL. The backend has its own GitHub repository: jumptonext-backend.

Render

You can easily test Jumptonext in your web browser by clicking the following link: Jumptonext in Render (Note: It can take about 30 seconds for the web server to start. This is because a free account for the Render cloud service is used.)

How does Jumptonext work?

Jumptonext uses Realtime API provided by the external service provider (Realtime API license). Timetables and stop information are collected in real time from the Realtime API. Queries to the API are made based on user activities.

The map in the Jumptonext view is generated with Leaflet. The map is OpenStreetMap that uses open data.

Information is obtained directly from the external APIs because up-to-date information is needed. General stop information is queried only once when the application starts, as it does not change often and the amount of data is large. Detailed real-time timetables for selected stops are updated every 10 seconds, as the amount of data is limited and up-to-date information is crucial.

Instructions for use

You can start using Jumptonext by clicking the link to the application: https://jumptonext.onrender.com/. It can take about 30 seconds for the web server to start. This is because a free Render cloud account is used.

Searching stops and next departures

In the general view, you can select the right stop by writing the stop name as input or clicking stop on the map.

When you type a stop name into the input field, the application shows all stops whose names contain the given string.

You can go to the stop view by clicking the button related to your choice.

In the stop view, you can see the next departures from the selected stop and the time left for each departure.

You can reselect another stop by clicking the Reselect stop button and making another selection.

As an alternative to the text search, you can select a stop from the map. You can pan and zoom to the right place on the map. When the right stop is visible on the map, you can choose it by clicking its icon on the map.

Creating a new account

When clicking the toggle button in the menu and clicking the Create account link, the Create account form is viewed. In the form, you can provide a username and password for a new account. A new account is created by clicking the Create account button.

Login

When clicking the Login link, the Login form is viewed. In the form, you can enter your username and password and log in by clicking the Login button.

Add new stop to favorite stops

When a stop is selected, the logged-in user can add it to their favorite stops by clicking the Add to favourites button.

Favorite stops

When logged in, users can view their favorite stops in the Favourite stops view.

Remove stop from favorites

When logged in, the user can remove a selected stop from the favorite stops in the Favourite stops view, first selecting the stop to remove and clicking the Remove from favourites button. When the wrong stop is accidentally removed, the user can click Add to favourites to add the stop again to the favorites.

Logout

Users can log out by clicking the Logout link.

Removing the account and all favorite stops

Users can remove their own account by clicking the Account settings link when logged in. The account is removed by clicking Remove account and confirming with the Are you sure to remove current account? button. The user account and all favorite stops related to it are removed from the database.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors