This app let you save every StadtRAD station in Hamburg and shows you the available bikes at the saved station.
Visit & use App
·
Report Bug
·
Request Feature
I recently found out that my hometown has these internet of things api which gives back the information of the StadradHH service. In the last time I'm using the bike service quite often and the offical booking app did not provide a "save your favorite station" feature. And the officeal app is sometimes not showing the availables bikes.
Right now the my-stadtRAD-favorite
app let you search for every bike station in Hamburg and let you save it as a favorite. React-query is updating the data when you come back to the app or you click the refesh button.
The IOT api is quite big and powerful. To handle all the data I wrote a BFF (backend for frontend) that handles all the necessary fetching and just send the data back to a react frontend that is needed.
The App is deployed on vercel. The express server is served as well with vercel as serverless functions.
- Find every StadtRAD station in Hamburg
- Inspect every StadtRAD station with map and available bikes
- Every station is updated every 5 minutes
- save StadtRAD station in a favorite list
- See saved stations in a small dashboard (updates automatically)
- save number, when app should show when few bicycles are available
- Internationalization (German/English)
- React
- Express as BFF
- react-query
- react-router
- leatlef-react
- dayjs
- styled-components
- lingui-js
- StadtRADHH API
To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/mpagels/my-stadtrad-favorites
- Install NPM packages
npm install
- Work with express.js in local development run express.js server
npm run api
- Start react
npm start
Q: You said, the stations are updated every 5min, but my station is currently not updated since 30min or more
TL;DR: The station is checked every 5 minutes. But the IOT api is only updating when the stations is reporting any changes in the available bikes. This means, since 30min there was no change in the bike count.
How I understand it is that the IOT api is asking the station every 5min for any new changes since last update.
Lets asume at 00:00 o'clock there are 5 bikes available at a station. From 00:00 to 00:05 one bike was rented. Now the API ask for a report at 00:05 and the station reports a change of 1 bike less. The api updates.
From 00:05 to 00:10 there were 2 more bike rents but 2 bikes were also returned. So at 00:10 there are still 4 bikes at the station. Therefore no change in the count. The api is not updated, because no change since last call.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Martin Pagels - @MPagels - [email protected]
Project Link: https://github.com/github_username/repo_namehttps://github.com/mpagels/my-stadtrad-favorites