Skip to content

katerina20/uni-manage

Repository files navigation

University manager service

A service for managing departments and lectors in the university

Steps to run

  1. Clone the project with git clone https://github.com/katerina20/uni-manage.git
  2. Go to the cloned project and build it with ./mvnw clean package

Run with docker:

  1. Build docker compose docker-compose build .
  2. Up the app with docker-compose up -d
  3. docker-compose down stops the services.

Run separate:

  1. Be sure you have mongo database run
  2. Install React dependencies npm install
  3. Run client app npm start
  4. Copy .jar file to current repo cp ./target/uni-manage-0.0.1-SNAPSHOT.jar ./server.jar
  5. Run server app java -jar server.jar

Client is available by http://localhost:3000 Server is available by http://localhost:8080

Server Endpoints

Department

Get Departments

Endpoint: GET /department

Description: This endpoint retrieves a list of all departments.

Response:

[
  {
    "id": "string",
    "name": "string"
    "lectors": 
    [
       {
          "id": "string",
          "name": "string",
          "degree": "string"
       },
       // Additional lectors
    ]
  },
  // Additional departments
]
Get Department Statistics

Endpoint: GET /department/{department_id}/statistics

Description: This endpoint retrieves statistics for a specific department.

Path Parameters: department_id: The unique identifier of the department.

Response:

{
   "ASSOCIATE_PROFESSOR": "number",
   "PROFESSOR": "number",
   "ASSISTANT": "number"
}

Lector

Promote Lector

Endpoint: PUT /lector/{lector_id}/promote

Description: This endpoint promotes a lector to a higher position.

Path Parameters: lector_id: The unique identifier of the lector.

Response

Status Code: 200 OK or 400 Bad Request if the promotion fails.

Change Lector Name

Endpoint: PATCH /lector/{lector_id}/change-name?newName={newName}

Description: This endpoint changes the name of a lector.

Path Parameters: lector_id: The unique identifier of the lector.

Request Parameters: newName (QueryParam): The new name for the lector.

Response

Status Code: 200 OK or 400 Bad Request if the promotion fails.

Lector Search

Search Lectors

Endpoint: GET /search?query={query}

Description: This endpoint searches for lectors based on a query.

Query Parameters: query: The search query.

Response:

[
   "lector_name_1",
   "lector_name_2",
   // Other lector names
]

UI

Displays Departments and list of lectors. The lector's name can be modified.

App UI

About

University departments management tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published