/shift-reservation

Shift Reservation system using Rails 5 and Patternfly, with RSPEC for testing and HAML instead or ERB

Primary LanguageRubyApache License 2.0Apache-2.0

Shift reservation

Dependency Status Build Status Chat Coverage Status

Build history for master branch

Introduction

This application tries to make it possible to reserve places in a school where the users are not capable of doing on their own (because they are under age). Parents can sign up with their own data and then add their offspring. Once that is done they can ask for a particular shift where they want their offspring to be assigned.

It is also a technology example for the following:

  • Rails 5
  • Haml
  • Patternfly
  • RSPEC
  • Rubocop

TODO

There is a TODO file describing what is still missing

Configuration

This application has been created to be deployed in OpenShift online v 3. You need:

  • An OpenShift online account
  • A Rails cartridge (5.1.0.)
  • A PostgreSQL cartridge (9.5, but any should work) I recommend to set up the application as an elastic one so the database is in a different place
  • Environment variables (oc or console):
    • SECRET_KEY_BASE
    • GMAIL_DOMAIN
    • GMAIL_PASSWORD
    • GMAIL_USERNAME

If you are using gmail, you should use two-factor authentication to avoid the account to be considered as an spam account

Description

Shift reservation is a simple program to make it possible distributed assignment of shifts to students that can not do it by themselves, and need their parents to do it in their behalf. There are different rooms that hold classes in parallel, and each of those rooms have a group of shift. A new student needs to be assigned to one of the shifts for the full course. Rooms have a capacity, but some of the shifts can have some places reserved (prebooked) for different reasons, and the parent is free to choose any shift that has some free space left.

This does not take into account that the parents can need

Users

Users are identified as parents. They can add and delete offspring and assigning them to a shift. Only one parent is in the system, and there is no option for two parents (although it could be added). They can sign up and add children into the system, and they can assign those children to shifts that have some space available. They can also delete those children from the system. The amount of information requested is the minimum possible.

Offsprings

Offsprings are related to parents and they are the subject that is assigned to a shift. An offspring is assigned to a single shift for the year.

Room and shift

There are different rooms that can be assigned. Each one has different shifts that corresponds to a group of students and a teacher.

An offspring can only be assigned to a shift in a single room. Trying to add another will result in the first one being deleted.

Getting started

Prerequisites

Get the Rails environment up and running

$ bin/setup            # Installs dependencies, config, prepares database, etc
$ rails s              # Application starting in development

You can also install dependencies and database manually. If you choose this way, you should install bower before starting the application, and don't forget to update it when necessary.

$ bower install