Skip to content

xytxxx/studyBuddy

Repository files navigation

Usage

  1. install node and redis
  2. npm install
  3. start redis
  4. node app

API

Register and Login

  1. Register: POST /account/register (do not need to implement)
    payload:
{
    userId: string,
    name: string,
    password: string,
    courses: [
        string
    ]
}

  1. Login: POST /account/login
    payload:
{
    userId: string,
    password: string
}

respond: 200 - {uuid: string} or 400 - failed
UUID is like user ID but unique for each user


  1. Get profile: GET /account/:UUID
    response:
200 -  {
    name: string,
    courses: [
        string
    ]
}

or 

400 - failed
  1. Get profile picture: GET /account/picture/:UUID
    response: image

  1. Update profile: PUT /account/:UUID
    payload:
{
    name: string (optional),
    courses: [
        string
    ]
}

Find groups

  1. Sign up for study: POST /study/schedule
    payload:
{
    uuid: string,
    date: "DDMMYY",
    maxMembers: int,
    courses: [
        string
    ]
}
  1. Remove for study: DELETE /study/schedule
    payload:
{
    uuid: string,
    date: "DDMMYY",
    groupMembers: [
        (UUIDs of group members)
    ],
    courses: [
        string
    ]
}
  1. Check status for study group: GET /study/schedule/:UUID
    response:
[
    {
        date: "DDMMYY", 
        courses: [
            string
        ],
        group: [
            (UUIDs of group numbers)
        ]
    }, 
    {
        date: "DDMMYY",
        courses: [
            string
        ],
        group: [
            (UUIDs of group numbers)
        ]
    } 
]

About

Backend for studyBuddy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published