isa beatriz — Home
All projects

Student Grades Microservice

Academic · 2026 · Completed

REST API in Java 17 and Spring Boot 3 that calculates a student's average grade, reports pass or fail and exposes the server date and time, with a plain JavaScript web interface.

Goal

A REST microservice that receives a student’s name and two grades, calculates the average and returns a pass or fail message. It also reports the server date and time and includes a web interface with light and dark themes and a live clock.

Endpoints

Method Route Description
POST /api/media Receives a name and two grades; returns the average and the result message
GET /api/datetime Returns the current server date and time
GET / Web interface
curl -X POST http://localhost:8080/api/media \
  -H "Content-Type: application/json" \
  -d '{"nome": "Maria", "nota1": 7, "nota2": 8}'

Business rules

  • The default passing grade is 5 and can be changed in application.properties (aluno.nota-de-corte) without recompiling.
  • An average above the passing grade passes; an average equal to or below it fails, with a different message for each case.
  • Grades are required and must be between 0 and 10. Invalid values return HTTP 400 with the error message.

Architecture

The code is organized in layers: controller (HTTP), service (rules) and DTO (data transfer), with a central handler for validation errors. The web interface uses plain HTML, CSS and JavaScript, with no frameworks.

Let's talk

For job openings or freelance projects, send me a message.

Email

talk soon! :)