Narrative: Alwyn Tan, Senior Software Engineer
Beeline is Singapore’s first crowd-sourced transportation platform. Introduced to the public in 2015, the platform helps to band commuters together through their suggestions, and establish transport routes which can then be serviced by private transport operators.

What makes up the Beeline platform?
Beeline users typically interact through the following applications:
The mobile app is used by commuters to book rides on existing routes, discover and back crowdstart routes and track the arrival of their ride through the tickets they book;
A dedicated web page allows commuters to make route suggestions;
The driver app informs drivers where their next stop is, how many passengers are waiting there, and the trip code that should appear on their tickets;
An admin user-interface (UI) grants transport companies the means to plan their day-to-day trips and manage bookings.
Motivation behind open-sourcing Beeline
We hope that by open-sourcing Beeline, others might take advantage of our codebase, building on it to create applications and platforms to help improve transportation in Singapore. Further, there are lessons that we have learnt while building Beeline, that we feel could be shared with the wider developer community.
What exactly are we open-sourcing?
Listed below are the components of Beeline that we have either already open-sourced or are in the process of open-sourcing (the list will be updated as more of the platform gets released):
beeline-frontend — The mobile app
Release date: 2017–09–25
datagovsg/beeline-frontend
beeline-frontend — Source Code for Beeline’s mobile appgithub.com
The Beeline app is used by commuters daily to participate in route crowdstart campaigns, book tickets, and to track when the bus arrives at their stop. It is built on the Ionic Framework, which allows developers to write cross-platform mobile applications using JavaScript and Angular.
One of the more interesting features that we have built into the app can be found in pull request #395. This change allows the app to minimise the number of map tile-set load requests made to Google Maps by sharing one map overlay across multiple views within the app.
beeline-admin — The dashboard for transport operators
Release date: 2017–09–25
datagovsg/beeline-admin
beeline-admin — A web interface for transport operators on Beelinegithub.com
Transport operators on Beeline use a web application to perform administrative tasks, including route creation, trip logistics and ticketing matters. Originally written as an Angular web application, parts of it have been re-written in Vue as part of a planned migration, in a manner that allows the two frameworks to co-exist. A single directive is written to serve as a bridge between Angular and Vue, allowing a Vue page and its components to be rendered in Angular, provided that a minimal Angular template and controller are also provided for each page.
beeline-driver — The mobile app for drivers
Release date: 2018–02–01
datagovsg/beeline-driver
beeline-driver - The app used by driversgithub.com
Drivers have a separate app to give them relevant information for the trips they are driving on for the day. Such information includes trip stops and passenger pick ups.
beeline-routing — The routing service
Release date: 2017–10–10
datagovsg/beeline-routing
beeline-routing - Provides routing services for Beelinegithub.com
The most important part of Beeline, this service is written in Scala and is responsible for proposing routes based on suggestion data. An in-depth explanation of the routing algorithm is covered here.
beeline-server — Handling commute workflow
Release date: 2017–10–10
datagovsg/beeline-server
beeline-server - The backend service for Beelinegithub.com
beeline-server is a Node.js service hosted on Heroku, providing RESTful endpoints that both the admin UI and the mobile app depend on to handle the workflows described previously. It uses Hapi to do so, which we appreciate for its batteries-included approach to building web services, incorporating features like authentication and request validation, and allowing the predictable set-up of endpoints via configuration.
Using Hapi does tend to lead to a significant amount of boilerplate code however, so to that end, we have written a small set of functions that can be combined to form the workflows needed to service requests. Central to this is the function handleRequestWith
, which chains together a set of functions, each one passing its output to the input of the next function, the eventual output being returned as a response to the user.
How can you contribute to the Beeline platform?
We’re still working on making it easier for the public to make contributions to the codebase. For now, if you’re interested to add new features or help hunt for bugs, get in touch by creating an issue in the relevant repositories.