Skip to content

Commit ea51548

Browse files
John Gibsongitbook-bot
John Gibson
authored andcommitted
GitBook: [master] 14 pages modified
1 parent 27968be commit ea51548

10 files changed

+31
-43
lines changed

Diff for: README.md

+19-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ description: >-
77

88
# What is BloomBus?
99

10+
## Overview
11+
12+
BloomBus is comprised of 3 main software components:
13+
14+
1. BloomBus-Tracker — An Android app to be installed as on the mobile devices assigned to each shuttle driver, which when open will continuously publish location updates for a shuttle on the selected route to the database.
15+
2. BloomBus-Client — The user-facing web app that allows students and other people on campus to select between shuttle loops and available shuttles, and see their locations on a map.
16+
3. BloomBus-Server — A Node.js server, which acts as a monitor for the real-time events that occur on the database. For example, when a shuttle's position is updated, the server will see if any other shuttles have not been updated within a certain timeout, and if they haven't, their record will be removed from the database.
17+
18+
The database is currently the Firebase Realtime Database, which uses a pub-sub model for writing and listening to live changes in shuttle positions.
19+
20+
BloomBus-Server, as well as a few complementary services are run on an on-campus virtual machine.
21+
22+
* TileServerGL - Serves the vector tiles for Client's basemap
23+
* Traefik - A reverse proxy that directs incoming traffic to the virtual machine to the individual services running on it
24+
* OpenRouteService - For getting calculations of estimated walking time between 2 points, for example
25+
1026
## History
1127

1228
![](.gitbook/assets/bloombus-logo%20%281%29.svg)
@@ -19,20 +35,16 @@ Unfortunately, the advertised range of 2 miles for the XBee radios was far great
1935

2036
In the 2018 Spring semester, another student, Nelson Maher, who had previous formal training with the PA National Guard in radio telecommunications and networking, had significant interest in the project, and proposed replacing the more expensive and radio-based system with a wifi based system utilizing ESP8266 chips — thumb-drive sized boards that have an onboard wifi chip and open source firmware that allows for the use of a framework called MicroPython. MicroPython allows for a subset of Python to be executed on the board's internal memory, and Maher quickly created a script that received in the same GPS data from the Adafruit module as before, parsed it, and uploaded it to Firebase. Thanks to the modularity of Weber's user-facing application, it continued to function exactly as previously expected. However, this system is intended to backpack off of the university's wireless network infrastructure, which is certainly spotty, especially along a route such as the campus loop where there is not a strong need for wireless coverage. This limitation also restricts the scope of the project's coverage to only the Campus Loop shuttle buses.
2137

22-
I, John Gibson, began working on this project in the 2018 Fall semester as an independent under the advisement of Dr. Robert Montante, with the goal of having a more complete prototype of the system that could be proposed to the C.G.A. for official adoption.
38+
John Gibson, began working on this project in the 2018 Fall semester as an independent study under the advisement of Dr. Robert Montante, with the goal of having a more complete prototype of the system that could be proposed to the C.G.A. for official adoption.
2339

24-
My plan for having a more simplified and dependable system for this project to stand on would involve replacing the previous 2 proposed tracking hardware systems with instead using mobile phones assigned to each shuttle bus driver. The reasons for this proposal include:
40+
His plan for having a more simplified and dependable system for this project to stand on would involve replacing the previous 2 proposed tracking hardware systems with instead using mobile phones assigned to each shuttle bus driver. The reasons for this proposal include:
2541

2642
* A mobile device can easily be plugged in to the shuttle bus and charged via the bus' 12V socket
2743
* It provides an excellent GPS built into the phone
2844
* Is capable of maintaining a significantly more dependable 4G connection with mobile networks
2945
* Can provide an intuitive interface for the bus drivers can interact
3046

31-
As part of my efforts to flesh out the software systems to create a prototype for the system, I have chosen to architect it broadly into 3 discrete applications:
32-
33-
1. BloomBus-Location-Tracker — A [Progressive Web Application](https://developers.google.com/web/progressive-web-apps/) \(PWA\) to be installed as apps on the mobile devices assigned to each shuttle driver, which when open provides an interface for selecting which loop the driver is currently driving, and displays the GPS position the device is providing. Using standard geolocation Web APIs, the device's position is published to Firebase every time the position is updated.
34-
2. BloomBus-Client — Also a PWA, this is the user-facing app that allows students and other people on campus to select between shuttle loops and available shuttles, and see their locations on a map.
35-
3. BloomBus-Server — A JavaScript based application that is run serverside, which acts as a monitor for the alterations on data within Firebase. For example, when a shuttle's position is updated, this application will start a timeout, where if that shuttle's position is not updated again with the timeout, its record will be removed from the database. This way, the client-side application only has to be concerned about displaying what is currently in the database. It will also monitor for proximity events using the [GeoFire](https://github.com/firebase/geofire-js) library for doing query's on the shuttles' updating coordinates. This way, when a shuttle nears a shuttle station, a record on the shuttle's reference in the database will be updated as a sort of "checkpoint" within the route.
47+
As a result, the project was architected into three primary software components as described above.
3648

3749

3850

Diff for: SUMMARY.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Table of contents
22

33
* [What is BloomBus?](README.md)
4-
* [Trello](trello.md)
54
* [Code Repositories & Deployment](code-repositories-and-deployment.md)
65
* [Publishing](publishing.md)
76
* [Editing Geospatial Features](editing-geospatial-features.md)
@@ -19,10 +18,10 @@
1918

2019
## BloomBus-Server
2120

22-
* [Architecture](bloombus-server-1/architecture.md)
23-
* [REST API](bloombus-server-1/rest-api.md)
24-
* [Developing Locally](bloombus-server-1/developing-locally.md)
25-
* [Authentication](bloombus-server-1/authentication.md)
21+
* [Architecture](bloombus-server/architecture.md)
22+
* [REST API](bloombus-server/rest-api.md)
23+
* [Developing Locally](bloombus-server/developing-locally.md)
24+
* [Authentication](bloombus-server/authentication.md)
2625

2726
## Future Plans
2827

File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: bloombus-server-1/rest-api.md renamed to bloombus-server/rest-api.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ Retrieves the current state of the GeoJSON representing the geometry of shuttle
1818
Stops GeoJSON successfully retrieved.
1919
{% endapi-method-response-example-description %}
2020

21-
{% code-tabs %}
22-
{% code-tabs-item title="stops-2019-05-26.geojson" %}
21+
{% code title="stops-2019-05-26.geojson" %}
2322
```javascript
2423
{
2524
"type": "FeatureCollection",
@@ -42,8 +41,7 @@ Stops GeoJSON successfully retrieved.
4241
]
4342
}
4443
```
45-
{% endcode-tabs-item %}
46-
{% endcode-tabs %}
44+
{% endcode %}
4745
{% endapi-method-response-example %}
4846

4947
{% api-method-response-example httpCode=404 %}
@@ -79,8 +77,7 @@ Retrieves the current state of the GeoJSON representing the geometry of shuttle
7977
Loops GeoJSON successfully retrieved.
8078
{% endapi-method-response-example-description %}
8179

82-
{% code-tabs %}
83-
{% code-tabs-item title="loops-2019-05-26.geojson" %}
80+
{% code title="loops-2019-05-26.geojson" %}
8481
```
8582
{
8683
"crs": {
@@ -133,8 +130,7 @@ Loops GeoJSON successfully retrieved.
133130
}
134131
135132
```
136-
{% endcode-tabs-item %}
137-
{% endcode-tabs %}
133+
{% endcode %}
138134
{% endapi-method-response-example %}
139135
{% endapi-method-response %}
140136
{% endapi-method-spec %}

Diff for: code-repositories-and-deployment.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ All 3 of the project's code repos are on GitHub under the [BloomBus](https://git
1616

1717
For more information about any of these repos, visit their respective pages within this GitBook.
1818

19-
At the current moment, BloomBus-Client and BloomBus-Tracker are deployed to Heroku at [https://bloombus.herokuapp.com](https://bloombus-tracker.herokuapp.com) and [https://bloombus-tracker.herokuapp.com](https://bloombus-tracker.herokuapp.com).
19+
Currently, BloomBus-Client is deployed to Heroku at [https://bloombus.herokuapp.com](https://bloombus-tracker.herokuapp.com).
2020

2121
## Deployment
2222

2323
#### What's Heroku?
2424

2525
Heroku is a "cloud application platform". In short, it provides a CLI tool to add a git remote to your project, and whenever new changes are pushed to that remote, it will analyze the project, try and determine a "buildpack" to run to build the project, and stand it up on one of Heroku's servers.
2626

27-
For **BloomBus-Tracker**, that project is a simple HTML5 project with just an index.html, some CSS, and a JavaScript script to run. In order to deploy this on Heroku, since Heroku does not have a buildpack for static HTML projects, I have added an index.php file that redirects to the index.html. Because of this file being present, Heroku detects the project as a PHP project and builds it accordingly.
28-
29-
For **BloomBus-Client**, that project is a Node.js application. It was also created using the **create-react-app** package from Facebook, which is a very popular tool for generating a basic React.js application without having to write all of the boilerplate yourself. There is a[ community-made buildpack](https://github.com/mars/create-react-app-buildpack) for Heroku specifically for create-react-app that I have used to resolve some build errors when pushing to Heroku.
27+
BloomBus-Client was created using the **create-react-app** package from Facebook, which is a very popular tool for bootstrapping a basic React application without having to write all of the boilerplate yourself. The [ community-made buildpack](https://github.com/mars/create-react-app-buildpack) for create-react-app apps on Heroku is used for deployment.
3028

Diff for: editing-geospatial-features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The spatial data for the BloomBus project \(the collections of points, lines and polygons that represent shuttle loops, shuttle stops, etc\) are stored in the Firebase Realtime Database as [GeoJSON](https://geojson.org/), the most popular interchange format for geospatial data, especially over the web. The shuttle loops are kept as a GeoJSON FeatureCollection at the `/shuttles` ref, and under the `/stops` ref there is a collection of keys that correspond to a shuttle stop with it's value being a GeoJSON Feature.
44

5-
To download the GeoJSON for the shuttle stops or the shuttle loops, go to the admin dashboard served by [BloomBus-Server](bloombus-server-1/architecture.md), go to the **Edit Geometry** task, and click the corresponding download button.
5+
To download the GeoJSON for the shuttle stops or the shuttle loops, go to the admin dashboard served by [BloomBus-Server](bloombus-server/architecture.md), go to the **Edit Geometry** task, and click the corresponding download button.
66

77
![](.gitbook/assets/edit-geometry-tut-1.png)
88

Diff for: publishing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
BloomBus-Tracker-Android is published to the Google Play Store under an Internal Testing release. This allows the app to be private with a specified list of emails that are registered as testers, including any users that follow the opt-in link.
44
BloomBus-Client is on its way to being deployed to the Google Play Store now that it supports publishing Progressive Web Apps. PWAs are supported through a new API added in Chrome 72 called "Trusted Web Activities". John Gibson started working on publishing the BloomBus-Client PWA by following [this guide by @firt on Medium](https://medium.com/@firt/google-play-store-now-open-for-progressive-web-apps-ec6f3c6ff3cc), although [this guide from fireship.io](https://fireship.io/lessons/pwa-to-play-store/) looks even more thorough. The TWA API allows for some important features such as adding an Android Wear companion app and delivering native push notifications.
55

6-
To sign releases for BloomBus-Tracker-Android, the Android keystore for the project needs to be acquired from the Firebase storage bucket which you can access through Firebase Console, and should be put in the `/app` directory of the repo. You should also have a gradle.properties file which holds the values for the various keystore secrets, and these values can be acquired by asking any of the project admins on the Discord chat.
6+
To sign releases for BloomBus-Tracker-Android, the Android keystore for the project and the gradle.properties which holds the values for the various keystore secrets are needed, and can be found in the \#devs-resources channel in the Discord server, accessible to those with the "dev" role.
77

Diff for: trello.md

-17
This file was deleted.

0 commit comments

Comments
 (0)