BEVL is a simple clojure app to show availbility of bikes around Leyton. It depends on the Traffic for London Unified API, particularly the bikepoints api. It renders a web page protected by Basic Authentication and shows a table of 5 nearest bikepoints around Leyton.
DEMO
A screencast of the app is available at http://jmp.sh/DG64sEI
How it works ?
- BEVL has the coordinates of Leyton stored in config.
- It fetches all bikepoints from the api mentioned above and sorts them by
haversine
distance between the bikepoint and Leyton. - Next it picks the top 5 bikepoints and renders them to html (with some styling).
Dependencies
- tachyons functional css for ui rendering
- clj-http for sending request to TFL api
- hiccup for generating html
- yada for handling resources
- minimal-yada-bidi boilerplate
- haversine for calculating distances between lat and lngs
- aero for config management
- cheshire for json parsing
Setup
Clone this repo
git clone git@github.com:shivekkhurana/bevl.git
Run the server
lein run
Browse to http://localhost:3000