Source code for the Airport Bus UI at https://kia.bengawalk.com/
For additional help/information, please join the Discord chat
In the repository root, run:
yarn install
yarn startThe site is served by a Cloudflare Worker (worker/index.js) which also proxies the Google Places and Geocoding APIs used by search, so the API key never reaches the browser. For search to work locally, copy .dev.vars.example to .dev.vars, add a Google API key with Places API (New) and Geocoding API enabled, and run the worker alongside the dev server:
yarn start:workeryarn start proxies /api requests to the worker on port 8787.
Pushes to main build the site and deploy it with wrangler deploy (.github/workflows/deploy.yml). The Google API key is a Worker secret, set once with npx wrangler secret put GOOGLE_MAPS_API_KEY.
Timings, intermediate stops and route lines (src/utils/timings.tsv, stops.json, routelines.json) are generated from the BMTC GTFS feed at Vonter/bmtc-gtfs. .github/workflows/update-data.yml regenerates them every 3 days, and commits and deploys when anything changed. To regenerate locally, run:
yarn data:updateDon't edit the generated files by hand. The next update overwrites them.
- Add an entry to
BUS_DATAinsrc/utils/constants.js. Theroutenameis<route> UPfor trips to the airport and<route> DOWNfor trips from the airport - The route shows up in the app once the feed has data for it
