A service for managing departments and lectors in the university
- Clone the project with
git clone https://github.com/katerina20/uni-manage.git
- Go to the cloned project and build it with
./mvnw clean package
- Build docker compose
docker-compose build .
- Up the app with
docker-compose up -d
docker-compose down
stops the services.
- Be sure you have mongo database run
- Install React dependencies
npm install
- Run client app
npm start
- Copy .jar file to current repo
cp ./target/uni-manage-0.0.1-SNAPSHOT.jar ./server.jar
- Run server app
java -jar server.jar
Client is available by http://localhost:3000
Server is available by http://localhost:8080
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"
}
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.
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
]
Displays Departments and list of lectors. The lector's name can be modified.