CS180-spring / cs180-21-gohighlander

cs180-21-gohighlander created by GitHub Classroom
0 stars 1 forks source link

Open in Visual Studio Code

GoHighlander

Authors: Kevin Qu, Wesley Fan, Haolin Liu, Tiffany Wang

Project Description

A web app that saves students’ schedule information into an easy-to-read schedule and gathers parking lot occupancy each hour during weekdays to display an occupancy forecast. The project is important to us because as college students we need to be organized as we need to drive to school for classes, discussions, exams, etc. Students who use this program would be able to stay organized and thus be able to keep their focus on their eductation. It will be interesting to see how to develop new features from a user's perspective. The languages/tools/technologies we plan to use are:

Features:

Interface Documentation

Frontend Interfaces:

index.php - Dashboard for this app, displays links to pages

login.php - Login page for users

register.php - Registration page for users

my_schedule.php - Displays courses in order for each day of the week

add_course.php - Allows users to add courses to their schedule

manage_schedule.php - Allows users to delete added schedule from the courses list

Backend Interfaces:

URL Method Permission Request Params Responses Description
/api/check_session GET 0 - yes/no Returns yes or no, if the user is logged in
/api/login.php POST 0 name, password logged_in / error_msg Returns logged_in on success and error message if failed
/api/register.php POST 0 name, password success/error_msg Returns success on success and error message if failed.
/api/get_schedule.php GET 0 - courses_gzipped Returns gzipped course informations in JSON
/api/save_schedule.php POST 0 sh success Saves Gzipped courses into JSON database returns success if saved correctly
/api/get_users.php GET 1 - users_JSON Returns all usernames in the database.
/api/remove_user.php GET 1 username success / Unauthorized Deletes username by given username. Returns Unauthorized if user does not have sufficient permission
/api/change_password.php GET 1 username, password Operation Success / Unauthorized Changes a user's password. Returns Unauthorized if user does not have 1+ permission or insufficient permission to change a username's password.
/api/change_permission.php GET 1 username,perm Operation Success / Unauthorized Changes a user's permission. Returns Unauthorized if user have insufficient permission to change a username's password.
/api/admin_get_schedule.php GET 1 username Operation Success / Unauthorized Get user's schedule gzipped hash, returns Unauthorized if permission <=0
/api/admin_save_schedule.php GET 1 username, sh success / Unauthorized Saves a gzipped hash schedule information to specific username, returns Unauthorized if permission <=0

Permission 0 is regular user, 1 is Admin, 2 is Super Admin

Screenshots

Screenshots

Installation/Usage

pip install -r requirements.txt

Development

python main.py

Production

gunicorn main:app -b IP:PORT

Testing

TBD