Skip to content

md131376st/PolitoWebExam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exam #1: "StudyPlan"

Student: s296589 DAVARI MONA

React Client Application Routes

  • Route /: page content and purpose
  • Route /something/:param: page content and purpose, param specification
  • ...

API Server

  • GET /api/v1/Courses
    • Description: Get the full list of courses
    • Request body: None
    • Request query parameter: None
    • Response: 200 OK (success)
    • Response body: Array of objects, each describing one Course :
{
    "courseList": [
        {
            "code": "01UDFOV",
            "name": "Applicazioni Web I",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01TXYOV"
            ]
        },
        {
            "code": "02GOLOV",
            "name": "Architetture dei sistemi di elaborazione",
            "numCredit": 12,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "02LSEOV"
            ]
        },
        {
            "code": "03UEWOV",
            "name": "Challenge",
            "numCredit": 5,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        },
        {
            "code": "01URROV",
            "name": "Computational intelligence",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        },
        {
            "code": "02LSEOV",
            "name": "Computer architectures",
            "numCredit": 12,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "02GOLOV"
            ]
        },
        {
            "code": "01OTWOV",
            "name": "Computer network technologies and services",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": 3,
            "IncompatibeCourse": [
                "02KPNOV"
            ]
        },
        {
            "code": "01SQJOV",
            "name": "Data Science and Database Technology",
            "numCredit": 8,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01SQMOV",
                "01SQLOV"
            ]
        },
        {
            "code": "01SQMOV",
            "name": "Data Science e Tecnologie per le Basi di Dati",
            "numCredit": 8,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01SQJOV",
                "01SQLOV"
            ]
        },
        {
            "code": "01SQLOV",
            "name": "Database systems",
            "numCredit": 8,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01SQJOV",
                "01SQMOV"
            ]
        },
        {
            "code": "01TYMOV",
            "name": "Information systems security services",
            "numCredit": 12,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01UDUOV"
            ]
        },
        {
            "code": "05BIDOV",
            "name": "Ingegneria del software",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "04GSPOV"
            ]
        },
        {
            "code": "01URSPD",
            "name": "Internet Video Streaming",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": 2,
            "IncompatibeCourse": []
        },
        {
            "code": "01OUZPD",
            "name": "Model based software design",
            "numCredit": 4,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        },
        {
            "code": "02GRSOV",
            "name": "Programmazione di sistema",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01NYHOV"
            ]
        },
        {
            "code": "01SQOOV",
            "name": "Reti Locali e Data Center",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        },
        {
            "code": "01UDUOV",
            "name": "Sicurezza dei sistemi informativi",
            "numCredit": 12,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "01TYMOV"
            ]
        },
        {
            "code": "04GSPOV",
            "name": "Software engineering",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": [
                "05BIDOV"
            ]
        },
        {
            "code": "01TYDOV",
            "name": "Software networking",
            "numCredit": 7,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        },
        {
            "code": "01NYHOV",
            "name": "System and device programming",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": 3,
            "IncompatibeCourse": [
                "02GRSOV"
            ]
        },
        {
            "code": "02KPNOV",
            "name": "Tecnologie e servizi di rete",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": 3,
            "IncompatibeCourse": [
                "01OTWOV"
            ]
        },
        {
            "code": "01TXYOV",
            "name": "Web Applications I",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": 3,
            "IncompatibeCourse": [
                "01UDFOV"
            ]
        },
        {
            "code": "01TXSOV",
            "name": "Web Applications II",
            "numCredit": 6,
            "numInRole": null,
            "maxCapacity": null,
            "IncompatibeCourse": []
        }
    ]
}
  • GET /api/v1/StudyPlan/+userId

    • Description: Get the full list study plan
    • Request body: None
    • Request query parameter: userID
    • Response: 200 OK (success)
    • Response body: Array of Course code list :
    [
      "01UDFOV",
      "02GOLOV",
      "03UEWOV",
      "01URROV"]
    • post /api/v1/StudyPlan/+userId
      • Description: Update/CreateStudyPlan
      • Request body:
      • {"PlanType": 1,

    "studyPlanList": [ "01UDFOV", "02GOLOV", "03UEWOV", "01URROV" ] } ```

    • Request query parameter: userID
    • Response: 201 CREATE (success)
  • DELETE /api/v1/StudyPlan/+userId

    • Description: Delete the hole study plan
    • Request body: None
  • Request query parameter: userID

  • Response: 200 CREATE (success)

  • POST /api/vi/sessions

    • Description: login data
    • Request body:
{
"username":"[email protected]",
"password":"password"
}
  • Request query parameter: None
  • Response: 200 OK (success)
  • Response body: Array of user object
 {
    "id": 1,
    "username": "[email protected]",
    "name": "test",
    "studyplan": 1
}
  • Delete /api/v1/sessions/current

    • Description: logout
    • Response: 200 OK (success)
  • GET /api/v1/sessions/current

  • Description: Get credintioals of the corrent user

  • Response: 200 OK (success)

  • Response body: Array of user object

{
   "id": 1,
   "username": "[email protected]",
   "name": "test",
   "studyplan": 1
}

Database Tables

  • Table Course - contains course code, name, credit number, course max capacity , mandatory Course
  • Table incompatibeCourses - contains course code and the one of its incompatible course
  • Table users - contains user email, password, salt, name, study plan type
  • Table studyplan - contains user id , course code
  • ...

Main React Components

  • LoginPage (in Components\Auth\LoginPage.js): show login page
  • LogoutButton (in Components\Auth\LoginPage.js): show logout page
  • CourseTable (in Components\CourseList\CourseTable.js): shows the course table
  • CourseRow (in Components\CourseList\CourseRow.js): shows the course details and add button logic
  • DeletePlan (in Components\StudyPlan\DeletePlan.js): Delete the study plan
  • DeletePlan (in Components\StudyPlan\DeletePlan.js): Delete the study plan
  • StudyPlanRow (in Components\StudyPlan\StudyPlanRow.js): show the details of course in study plan
  • StudyPlanTable (in Components\StudyPlan\StudyPlanTable.js): the current study plan table

Screenshot

homeUnauthenticated expand course loginpage home login user edit mode Screenshot add change color

Users Credentials

{
    "username":"[email protected]",
    "password":"password"
}
{
    "username":"[email protected]",
    "password":"password"
}
{
    "username":"[email protected]",
    "password":"password"
}
{
    "username":"[email protected]",
    "password":"password"
}
{
    "username":"[email protected]",
    "password":"password"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published