Code Monkey home page Code Monkey logo

hacklab-booking's Introduction

Hacklab Booking System

MCS Project with Prof. Liut and Aameri
https://hacklabbooking.utm.utoronto.caDocumentation


The Hacklab Booking System is a web application that allows users to book the Hacklab for a specific time and date.

💻 Technologies Used

🧓 Legacy Deployment Instructions

As of now, the project is hosted on a VM provided by UTM. There is an Apache instance listening on ports 80 and 443 and reverse proxies to port 3555.

Our app is self-contained and has its own nginx reverse proxy to have all requests to /api directed to the backend container and all other requests to the frontend container.

The front end is created with react and is served by serve. The backend is a nodejs app.

To deploy, get the latest code, and run docker compose up -d --build. This will start up our application on port 3555. A different port would require modifying the compose file.

🌃 System Architecture

Abstracted System Architecture

User Roles and Characteristics

Student

The student role is the default role given to everyone upon first launch (given already authenticated with Shibboleth. It gives the following permissions:

  • Create a group

Request Approver

The request approver role is manually given to faculty upon request. After being granted the approver role, faculty must also request permission to become an approver for each room they would like to approve. It gives the following permissions:

  • View a log of all previous requests
  • Can approve/deny requests for all rooms that they requested

TCard Approver

The TCard Approver role is given to system administrators (e.g., Andrew Wang) for the purpose of notifying the student that TCard access has been granted. It gives the following permissions:

  • View a log of all previous requests
  • Modify students’ database entry regarding TCard access

Administrator

The administrator role has all permissions (i.e., the permissions of both Request Approver and TCard Approver) and is given to faculty upon request. It gives the following permissions:

  • View a log of all previous requests
  • Modify students’ database entry regarding TCard access
  • Can approve/deny requests made by any student
  • Reject bookings that are already approved
  • Can delete student groups

Groups

Groups are a concept used by the Hacklab Booking System to allow multiple people to view the status of bookings. There is no limit to how many members a group can have, and there is no limit to the number of total groups. Students must be added to a group or create a group to create requests.

Student Group Roles

In a group, there are two roles with the following permissions:

Group Manager
  • Can add/remove people to the group (without approval from faculty)
  • Can delete other bookings within their group
  • Can delete the group
Group Member
  • Can request bookings under their group name
  • Can leave the group
  • Can view all the group’s bookings

Design Constraints and Limitations

Our design has some limitations:

  • Upon initialization, there will be no administrators. The first administrator must be added by interacting directly with PostgreSQL.

hacklab-booking's People

Contributors

logonoff avatar ggggg avatar dakshchan avatar daniyalb avatar dependabot[bot] avatar

Stargazers

Soshi Homma avatar  avatar  avatar

Watchers

Michael Liut avatar

Forkers

exe-qwerty

hacklab-booking's Issues

Allowlist some groups for certain rooms

Some rooms may only be booked by certain rooms. An allowlist option could be added to rooms that only enable certain groups to create bookings, or even see the room at all.

Set up backend project

  • Delete existing backend folder in monorepo
  • Install typescript
  • Install eslint
  • Set up dev environment with nodemon + docker

approvers do not see others requests

Currently the approvers don't see other people's requests nor do they see their own requests that are sent to themselves.

I'm assuming that "approving" isn't setup properly.

Set up /joan6 route

Since the Hacklab is getting an iPad instead, we need a route that emulates the layout of the Joan 6

image

  • Create frontend page
  • Set up WiFi on iPad

improved permissions system

There seems to be a consensus that adding a Professor to a group isn't the way to go. What should happen is that an admin needs to add "approvers" which students can add (checkboxes) to their groups.

Wrt T-Card access granters, this should be a list of people too. Right now only Andrew Wang does it, but in future this could change.

ical API

Allow a user to see the bookings for a room in their calendar by adding an ical link for each room, which is generated from the booking data.

By using ical instead of Google Calendar API, we are able to make this integration cross-platform

Allow multiple bookings

A theoretical threat actor may create pending bookings, blocking future bookings for any other user. A proposed solution is:

  • Allow users to book overlapping pending bookings
  • When an approver looks over it, only one booking can be accepted, the other gets automatically denied
  • Frontend: a different colour is shown for pending bookings but users are allowed to book

Documentation + README

We need documentation on

  • how to maintain the web app,
  • general design decisions
  • database relations
  • how to deploy
  • backend API routes
  • user flow chart
  • tech stack
  • purpose
  • scope

It has to

  • be deployed on GitHub wiki
  • have a short, condensed version as the README.md
  • be generally readable to audiences that are not familiar with tech

prevent overlapping requests

2 requests for the same date/time should not be permitted -- putting a hold in the calendar might be a good way to resolve this.

Add ratelimits per room for bookings

To prevent excessive bookings, allow the option for rooms to limit the number of hours per group or student. Some options for how to ratelimit could be provided to the administrators, including:

  • ratelimit based on the number of hours the booking author has booked in the past
  • ratelimit based on the number of hours the group creating the booking has booked in the past
  • ratelimit based on the minimum value of the both above

Split admin/approver permission

Admins should not necessarily be exposed to students to be chosen for booking. Split this list by adding an approvers list for each room that is independent of the admin role

Make some rooms always accessible.

Some rooms do not require T-card access. Make a room-specific config that makes the requests for those rooms not require t-card approval.

Improve approver/admin email experience

Currently, emails are sent in plain text with no calls to action. This makes it annoying for users to type the URL manually.

Ideally, approvers should be able to

  1. Click "yes" / "no" on the email itself
  2. Log in using SSO
  3. Provide a reason after authentication
  4. Done!

Make room specific time config

Make a room-specific setting that allows users to only book a given room during specific times of the day.

Example use case:
Book a meeting with TAs during office hours

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.