Skip to content

Get the prices of Singapore's Electronic Road Pricing (ERP) gantries, based on the time and your vehicle type.

Notifications You must be signed in to change notification settings

sebastianquek/gantries

Repository files navigation

banner

Gantries: ERP rates at a glance

Get the prices of Singapore's Electronic Road Pricing (ERP) gantries, based on the time and your vehicle type.

Tech overview

  • React app written entirely in TypeScript that runs without a backend.
  • Data is periodically fetched, processed and added to a custom Mapbox style using GitHub Actions.
  • Playwright is used for E2E tests and cross-platform snapshots are generated using GitHub Actions.

Usage

Create a .env file in the root directory:

DATAMALL_ACCOUNT_KEY=$datamall_key
REACT_APP_MAPBOX_ACCESS_TOKEN=$mapbox_access_token

Refer to LTA's DataMall website to get an account key

Refer to Mapbox's website to get an access token

Running on Windows

Because cross-env does not support command substitution out of the box, some additional setup is needed.

  1. Create a .npmrc file with the following content (reference):
script-shell = "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
  1. Try running npm start. If you receive an error that "...cross-env.ps1 cannot be loaded because running scripts is disabled on this system", allow the running of scripts by opening a powershell (or terminal in vscode) and enter the following (reference):
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Running npm start and npm run build should now work as expected.

About

Get the prices of Singapore's Electronic Road Pricing (ERP) gantries, based on the time and your vehicle type.

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages