A low-cost, open source solution for bike share systems
WhiteBikes gets start in Slovakia, dreams of a city near you
For the past few months I've been working on an open source software project aimed at improving life in a city called Bratislava in Slovakia. It's an Open Source Bike Share system that I, along with creator Michal Maly and a few others, have been developing for Bratislava's Cyklokuchyna (Bike Kitchen). It's community bike share system we call WhiteBikes.
The idea of a bike share system is nothing new. It stems from a 1960s experiment in the Netherlands in which white bicycles were placed unlocked in the streets to be used by anyone and everyone. The experiment didn't last long—the bikes were either stolen or, ironically, confiscated by the police because it was illegal to leave a bike unlocked.
Send a message, get a bike
The Bike Kitchen started WhiteBikes in Bratislava after a failed attempt by the city to finance a similar program. At first users shared donated bikes with the same lock code. They needed a system that would work somewhat automatically without the need for manual rentals (e.g. somebody giving out bicycles).
From there, smsBikeShare was born. Users registered with a mobile phone number and could send basic SMS commands (RENT, RETURN, FREE, WHERE, etc.). The system used an inexpensive SMS gateway API and a local message-back number to receive and respond to messages. Shared bicycles have a coded U-lock with a four-digit number, and upon renting a bike, users receive a code to unlock the bicycle and another to reset it to once they are done.
Send a message, receive the answer, unlock the bike, reset the lock, and you're off pedaling.
The next stage for open bikes
In three months, WhiteBikes had a working system with more than 30 daily users. I immediately saw we had something really interesting on our hands and got to work developing a web application. We already had a primitive Google map available showing the locations of the stands, but you didn't know if there were free bicycles until you used the FREE command (in a text message). So, I created a map with a better user experience and the ability to log in through a phone (or PC), find a nearby stand, and rent a bicycle with the press of a button.
Upon reaching a destination and finding a nearby bike stand, users lock the bicycle with the new (pre-selected) code, click on the appropriate stand on the map, and press the "return" button. Around this time, we renamed the software Open Source Bike Share on GitHub to WhiteBikes because it had expanded beyond the original SMS messaging.
Bigger and better features
Geolocation was next, showing the nearest bike stands and giving users walking directions to them. The app refreshes every 30 seconds, so if anyone rents or returns a bicycle, it's reflected on the map.
We are able to track users' phones (and therefore the bicycle’s movements) to some extent. Unfortunately, HTML5 GEO API is usually paused by Android and iOS mobiles when in the background. So once the phone display is off, tracking stops until the web app is turned on again.
Because some of the admin functions were already available via SMS, we added them to the web application too. We also got some simple and colorful pathmaps showing how the bicycle is used, i.e. how it has moved from one stand to another. Administrators can also see current network usage and stand occupation, etc.
Open source software behind it
Running on a PHP/JS combination, Open Source Bike Share is custom developed, but built on Bootstrap, Bootstrap validator, and JQuery. It uses MariaDB for its database and is open to accommodate a connection to any SMS API gateway you can find (you will probably have to develop the HTTP connector first, as we currently have just one).
I have written a short installation manual, but the most important requirement here is the real-life bicycles and at least one stand (but I am sure there are lots of stands available in your city, right?). However, feel free to install and test ride it using virtual bicycles you create in the database.
Community at the core
The community plays an important role in the system. Volunteers of all kinds—repairmen, developers, and even users—are working toward improving WhiteBikes. Servicemen take bicycles with reported issues off the streets to repair them, developers improve the web app and its features, and users help us with their real-world experiences and keep bikes moving between the stands.
Every new user needs two recommendations from existing users and is then trained by one of the experienced users at the Bike Kitchen. This way there is responsibility placed on the recommending users as well as on the new user. Only one bicycle has been stolen since the system's launch. A user left it unlocked in front of a shop while grabbing a quick snack.
Our administrators also receive a notification every 24 hours when someone has stretched their rental period over 24 hours. In addition to the 24 hour check, admins can get notified if somebody rents too many bicycles in a short time.
Today, WhiteBikes manages more than 50 community-serviced bicycles through the web and text messaging. Still in its pilot phase, the system has 70 users (67% active ones, with at least one rental in the past few months) and will expand to more in spring of 2015.
We want to see the Open Source Bike Share appear in other communities! Tell us your ideas and comments about how you think we can improve it. Follow us on Twitter for updates.