wtg / shuttle-signups

A web interface to simplify the process of signing up for special shuttles at RPI.
BSD 2-Clause "Simplified" License
5 stars 4 forks source link
css html javascript node-js typescript

Shuttle Signups Build Status Stories in Ready Code Climate

A web interface to simplify the process of signing up for special shuttles at RPI.

What exactly is a special shuttle?

The Rensselaer Union, along with support from Auxiliary Services and Parking & Transportation, runs a pilot program for a Capital District shuttle service. Certain weekends of the year, shuttles leave from the Rensselaer Union to destinations around the Capital District such as Crossgates Mall and Albany International Airport.

Why is this project needed?

Before this project came to exist, a Google Form was used to facilitate sign-ups for these special shuttles. These forms weren't the best solution. This project aims to simplify that process, helping both students, and those at Auxiliary Services and Parking & Transportation.

Development and Deployment

It isn't currently recommended that you deploy this project for production. It's still under heavy development, and things will most likely change (break, but we didn't say that 😉).

This project is developed on the MEAN stack (MongoDB, Express.js, Angular.js, and Node.js).

Development and Non-Docker Production

Before you begin, you should make sure that you have both MongoDB and Node.js installed on your system. If you don't, you can find information about installing each here and here, respectively. Eventually, we want to look into installing MongoDB using npm automatically when you run npm install below.

Next, you're going to want to clone this repository (if you haven't done so already), and cd into it. Run npm install, sit back and relax. This project has many dependencies that need to download.

After that's finished, we need to configure the application with some basic parameters. Look for the the file dev-config.js and copy it to config.js. Modify the configuration parameters to match your desired configuration.

module.exports = {
    service_url: URL to call back to after CAS authentication,
    cas_dev_mode: If you'd like to run CAS in development mode (you need set this to false in production)
    cas_dev_mode_user: The CAS development mode user
    admins: [Array of the user IDs of the desired administrators],
    cms_key: Your API key for the RPI Club Management System
};

Any of the above configuration parameters can also be set as environment variables.

    CMS_KEY
    CAS_DEV_MODE
    CAS_DEV_MODE_USER
    SERVICE_URL
    ADMINS

Great! Now, we're ready to run the application. Make sure MongoDB is already running, and simply run npm start. By default, the application runs on port 8080, but this can easily be changed using an environment variable.

In the future, we'll provide an init script that will allow running Shuttle Signups as a service on Linux distributions (which grants you tons of amenities, such as automatically running on start-up). For now, you can look into using forever.

Docker Production

  1. Clone this repository and cd into it
  2. Install Docker
    • $sudo apt install docker-engine, or equivalent
    • $docker-compose --version, sanity check for version >= 1.10
  3. mv dev-config.js config.js and fill out valid run time secrets (see above for more information)
    • Contact the project maintainers for RPI specific secrets
  4. Run docker-compose up , it will build the app and pull a mongo container then link everything
  5. In your browser of choice naviagate to http://localhost:8080

Roadmap