(Source: blog.data.gov.sg)

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

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

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: TBA

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

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 will be covered in a separate blog post.

beeline-server — Handling commute workflow

Release date: 2017–10–10

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.

More Info: blog.data.gov.sg

Advertisements