All Projects β†’ wtg β†’ shuttletracker

wtg / shuttletracker

Licence: AGPL-3.0 license
🚐 Shuttle tracking for RPI.

Programming Languages

go
31211 projects - #10 most used programming language
Vue
7211 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
SCSS
7915 projects

Projects that are alternatives of or similar to shuttletracker

zenith
Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, branching, and bottomless storage.
Stars: ✭ 4,239 (+9534.09%)
Mutual labels:  postgres
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (-38.64%)
Mutual labels:  leaflet
mitoc-trips
The MIT Outing Club's trip management system
Stars: ✭ 30 (-31.82%)
Mutual labels:  postgres
vaguely-rude-places
The map of Vaguely Rude Place Names
Stars: ✭ 19 (-56.82%)
Mutual labels:  leaflet
clock-in-out
A clock-in/out system using nestJS, PostgreSQL, TypeORM, Angular, Arduino, RxJS
Stars: ✭ 61 (+38.64%)
Mutual labels:  postgres
lego
A lightweight SQL (string) builder using ES6 template strings. Lego embraces SQL instead of adding yet another abstraction layer.
Stars: ✭ 54 (+22.73%)
Mutual labels:  postgres
ParseCareKit
Securely synchronize any CareKit 2.1+ based app to a Parse Server Cloud. Compatible with parse-hipaa.
Stars: ✭ 28 (-36.36%)
Mutual labels:  postgres
realtime-flask-experiment
Experimenting with PostgreSQL's Listen/Notify and Flask-SocketIO
Stars: ✭ 22 (-50%)
Mutual labels:  postgres
pgsql-ast-parser
Yet another simple Postgres SQL parser
Stars: ✭ 152 (+245.45%)
Mutual labels:  postgres
connect4
Connect 4️⃣Game
Stars: ✭ 1 (-97.73%)
Mutual labels:  postgres
Venflow
A brand new, fast and lightweight ORM, build for PostgreSQL.
Stars: ✭ 162 (+268.18%)
Mutual labels:  postgres
gpxstudio.github.io
The online GPX file editor
Stars: ✭ 233 (+429.55%)
Mutual labels:  leaflet
cloud-tileserver
Serve mapbox vectortiles via AWS stack
Stars: ✭ 48 (+9.09%)
Mutual labels:  postgres
google-bigtable-postgres-fdw
Google Bigtable Postgres FDW in Rust
Stars: ✭ 37 (-15.91%)
Mutual labels:  postgres
ChefAPI
API using FastAPI and PostgreSQL for sharing or keeping track of awesome food recipes Based on Oauth2 and JWT πŸ’Ž
Stars: ✭ 16 (-63.64%)
Mutual labels:  postgres
leaflet-draw-toolbar
Leaflet.toolbar for Leaflet.draw. Example: https://justinmanley.github.io/leaflet-draw-toolbar/examples/popup.html.
Stars: ✭ 55 (+25%)
Mutual labels:  leaflet
postgres-deno
A PostgreSQL extension for Deno: run Typescript in PostgreSQL functions and triggers.
Stars: ✭ 87 (+97.73%)
Mutual labels:  postgres
papyruscs
PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Stars: ✭ 221 (+402.27%)
Mutual labels:  leaflet
graphql-to-sql
GraphQL model to SQL
Stars: ✭ 13 (-70.45%)
Mutual labels:  postgres
leaflet-react-track-player
This is plugin for react-leaflet. It create player for control of track. πŸƒπŸŒŽβš”
Stars: ✭ 21 (-52.27%)
Mutual labels:  leaflet

Shuttle Tracker Build Status codecov GoDoc

Tracks and maps RPI's shuttles with Go, Postgres, Vue.js, TypeScript, and Leaflet. Check it out in action at shuttles.rpi.edu.

Looking to contribute? Please review our Contribution Guidelines.

More project documentation can be found on the Repository Wiki.

If you encounter issues setting up, check the Common Installation Problems for potential solutions.

Setting up (Linux / WSL)

  1. Install Go. Shuttle Tracker requires Go 1.11 or newer, and we recommend using the latest stable Go release.
    • Other instructions found here
  2. Clone the repository to your computer. This can be done with git clone https://github.com/wtg/shuttletracker.
  3. Ensure you have Postgres downloaded, installed.
    • This can be done with sudo apt-get install postgresql
  4. Create a postgres databased titled "shuttletracker". (WE HIGHLY RECOMMEND USING PGADMIN)
    • This can be done by running createdb shuttletracker. If there is an error createdb: could not connect to database postgres: FATAL: role "<username>" does not exist, it is due that adminstrator has not created a PostgreSQL user account for you. It can be fixed by psql -U postgres in terminal, CREATE USER <username>;, ALTER USER <username> SUPERUSER CREATEDB; in postgres=#. And you can confirm the success by running \du in postgres=#.
    • Alternatively, download the Postgres management software pgAdmin. Click on the Servers drop down, then the Databases drop down, and add a database titled "shuttletracker" by right-clicking on Databases and selecting create.
  5. Switch to the Shuttle Tracker directory (cd shuttletracker)
  6. Rename conf.json.sample to conf.json
  7. Edit conf.json with the following, if necessary:
    • Postgres.URL: URL where Postgres is located. This will generally look like postgres://user:password@localhost/shuttletracker?sslmode=disable where user and password are replaced
  8. Install Node.js and npm
    • This can be done with sudo apt-get install nodejs.
    • Make sure you are on version 10.16.0 or higher by running node -v.
    • If your version of node is old, install n by running npm install -g n.
    • Type apt-get remove nodejs to remove all versions of node installed through apt-get.
    • Type n stable to install the latest version of nodejs. Type node -v after to verify.
  9. Switch to the ./frontend directory.
  10. Run npm install
  11. Build the frontend using npx vue-cli-service build --mode development
    • Note: if you are working on the frontend, you may instead use npx vue-cli-service build --mode development --watch in another terminal to continuously watch for changes and rebuild.
  12. Go back up to the project root directory and build Shuttle Tracker by running go build -o shuttletracker ./cmd/shuttletracker
  13. Start the app by running ./shuttletracker
  14. Add yourself as an administrator by using ./shuttletracker admins --add RCS_ID, replacing RCS_ID with your RCS ID. See the "Administrators" section below for more information.
  15. Visit http://localhost:8080/ to view the tracking application and http://localhost:8080/admin to view the administration panel.
  16. (Optional) Import live data from /routes, /stops, and /vehicles.

Setting up (macOS)

  1. Install Go. Shuttle Tracker requires Go 1.11 or newer, and we recommend using the latest stable Go release.
  2. Clone the repository to your computer. This can be done with git clone [email protected]:wtg/shuttletracker.git. If you receive a "permission denied" error, ensure you have added your SSH key to your GitHub account.
  3. Download Postgres.app and Postico. Postgres.app allows a Postgres server to be started using a graphical interface, while Postico allows a PostgreSQL database to be managed using a graphical interface.
  4. Open Postgres.app and create a new Postgres server by pressing the + in the sidebar. Name the server "shuttletracker" and specify its port as 5432. Then press start to run the server.
  5. Open Postico and create a new database named "shuttletracker" by pressing "+ Database".
  6. Switch to the Shuttle Tracker directory (cd shuttletracker)
  7. Rename conf.json.sample to conf.json
  8. Edit conf.json with the following, if necessary:
    • Postgres.URL: URL where Postgres is located. This will generally look like postgres://user:password@localhost/shuttletracker?sslmode=disable where user and password are replaced
  9. Install Node.js and npm. Be sure to download the latest LTS version. Do not download the current version or errors will occur when building the project
  10. Switch to the ./frontend directory.
  11. Run npm install
  12. Build the frontend using npx vue-cli-service build --mode development
    • Note: if you are working on the frontend, you may instead use npx vue-cli-service build --mode development --watch in another terminal to continuously watch for changes and rebuild.
  13. Go back up to the project root directory and build Shuttle Tracker by running go build -o shuttletracker ./cmd/shuttletracker
  14. Start the app by running ./shuttletracker
  15. Add yourself as an administrator by using ./shuttletracker admins --add RCS_ID, replacing RCS_ID with your RCS ID. See the "Administrators" section below for more information.
  16. Visit http://localhost:8080/ to view the tracking application and http://localhost:8080/admin to view the administration panel.
  17. (Optional) Import live data from /routes, /stops, and /vehicles.

Configuration

Shuttle Tracker needs configuration to run properly. The preferred method during development is to create a conf.json file. See conf.json.sample for an example of what it should contain.

Updater.DataFeed: API with tracking information from iTrak. For RPI, this is a unique API URL that we can get data from. It's private, and a Shuttle Tracker developer can provide it to you if necessary. However, by default, Shuttle Tracker will reach out to the instance running at shuttles.rpi.edu to piggyback off of its data feed. This means that most developers will not have to configure this key.

Environment variables

Most keys can be overridden with environment variables. The variables names usually take the format PACKAGE_KEY. For example, overriding the iTRAK updater's update interval could be done with a variable named UPDATER_UPDATEINTERVAL.

Database URL

The database URL is a special case. Following the above convention, it can be set with POSTGRES_URL. However, for ease of deployment on Dokku, it can also be set with DATABASE_URL.

Administrators

The admin interface (at /admin) is only accessible to users who have been added as administrators. There is a command-line utility to do this: shuttletracker admins. It has two flags: --add RCS_ID and --remove RCS_ID. Replace RCS_ID with a valid RCS ID.

Example usage

> ./shuttletracker admins
No Shuttle Tracker administrators.
> ./shuttletracker admins --add naraya5
Added naraya5.
> ./shuttletracker admins --add lazare2
Added lazare2.
> ./shuttletracker admins
naraya5
lazare2
> ./shuttletracker admins --remove lazare2
Removed lazare2.
> ./shuttletracker admins
naraya5

Setting up (Windows)

  1. Download Go. Shuttle Tracker targets Go version 1.11 and newer, but we recommend using the latest stable release of Go.
  2. Open your System Properties by searching Edit the system environment variables then press Environment Variables....
  • Ensure your GOPATH variable is set correctly in the User variables for (Username).
  • Select Path under User variables for (Username) and make sure %GOPATH%\bin is on the list.
  • Make sure GOROOT is set correctly under System variables.
  • Select Path under System variables Make sure GOROOT\bin is on the list.

This step should be done for you already.

3a

3b

3c

  1. Open a command prompt by pressing windows + r, then type cmd and hit ok, or search for command prompt.
  2. Run go get github.com/wtg/shuttletracker.
  3. Switch to the Shuttle Tracker directory ($GOPATH/src/github.com/wtg/shuttletracker).
  4. Download and run the installer PostgreSQL from here. Select the latest version. When prompted to set a password, make it something simple, as you will be using this later, for example shuttle. Use default options for everything else. Remember your password.
  5. When complete, open pgAdmin from your search bar. If you do not see pgAdmin restart your computer. In the Object Browser, open Servers, then open your PostgreSQL server. You will need to enter your password from step 8. Once this is done, right click on Databases and select New Database. Name it shuttletracker and hit Ok.

11

11

  1. Navigate to your shuttle tracker directory ($GOPATH/src/github.com/wtg/shuttletracker) and rename conf.json.sample to conf.json
  2. Edit conf.json with the following, if necessary:
    • Postgres.URL: URL where Postgres is located which will be the default with postgres:password@localhost added before the database name, where password is your password from step 8. For example: "URL": "postgres://postgres:shuttle@localhost/shuttletracker?sslmode=disable".

11

  1. Install Node.js and npm. Download the recommended version and install. Restart your command prompt.
  2. Navigate to the frontend directory within the shuttle tracker directory ($GOPATH/src/github.com/wtg/shuttletracker/frontend).
  3. Run npm install
  4. Build the frontend using npx vue-cli-service build --mode development
    • Note: if you are working on the frontend, you may instead use npx vue-cli-service build --mode development --watch in another terminal to continuously watch for changes and rebuild.

11

  1. Go back up to the project root directory (using cd ..) and build Shuttle Tracker by running go build -o shuttletracker.exe cmd/shuttletracker/main.go
  2. Start the app by running shuttletracker.exe in the project root directory.
  3. Add yourself as an administrator by using shuttletracker.exe admins --add RCS_ID, replacing RCS_ID with your RCS ID. See the "Administrators" section above for more information.
  4. Visit http://localhost:8080/ to view the tracking application and http://localhost:8080/admin to view the administration panel.
  5. Copy the information from vehicles, routes, and stops into the admin panel if you want to mimic the current shuttle tracker site.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].