StudentProgress is a Spring Boot application for managing and tracking student data, including grades and academic status.
It provides an API for registering, updating, and monitoring student records, calculating averages, and offering real-time insights into student performance.
This helps educational institutions streamline their processes efficiently.
- 📌 Full CRUD operations for student records in the database
- 🎯 Filter students by academic status
- 🧮 Automatically calculate grade averages
- 🔗 HATEOAS support for enhanced API navigation
- 📄 Pagination and pageable search for student lists
- 🛠️ Database version control with Flyway
-
Clone the repository:
git clone [email protected]:henriiqueaze/StudentProgress.git cd StudentProgress
-
Create the MySQL database: Before running the application, make sure you have a MySQL server running locally or accessible remotely, and create the database used by the app:
CREATE DATABASE student_progress;
-
Set up environment variables: Copy the example file and customize it:
cp .env.example .env
Make sure the SPRING_DATASOURCE_URL points to your MySQL server host and port, for example:
jdbc:mysql://localhost:3306/student_progress?useSSL=false
-
Build the application (.jar) with Maven: This step compiles the code and generates the .jar file inside the target/ folder:
./mvnw clean package
-
Run the application using Docker Compose:
docker-compose up --build
-
Access the API documentation (Swagger):
http://localhost:8080/swagger-ui.html
-
📄
GET /student/{id}
- Retrieve a specific student details -
📥
GET /student
- Retrieve all student details. Optional query parameters for pagination:- page: page number (default: 0)
- size: number of records per page (default: 12)
- direction: sorting direction, asc or desc (default: asc)
- Example:
GET /student?page=0&size=10&direction=desc
-
🆕
POST /student
- Register a new student -
✏️
PUT /student
- Update student information -
🖊️
PATCH /student/id
- Update a student a specific information -
❌
DELETE /student/id
- Remove a student record -
📊
GET /student/average/id
- Get the grade point average of a specific student -
🧮
GET /student/filter/{status}
— Filter students by academic status
This API supports CORS (Cross-Origin Resource Sharing) to enable integration with front-end applications hosted on different domains.
CORS is configured globally in the backend using the following setup:
- Allowed Origins: Defined via CORS_ALLOWED_ORIGINS
- Allowed Methods: All (GET, POST, PUT, PATCH, DELETE, etc.)
- Credentials: Enabled (allowCredentials=true) — supports cookies and authorization headers
In your .env file, define:
CORS_ALLOWED_ORIGINS=http://localhost:8080
To allow multiple domains, separate them with commas:
CORS_ALLOWED_ORIGINS=http://localhost:8080,https://your-frontend.com
- ☕ Java (Spring Boot)
- 🗄️ MySQL (Database)
- 🏗️ Hibernate (ORM)
- 🔗 HATEOAS (Hypermedia API support)
- 🧪 JUnit (Testing framework)
- 📂 Flyway (Database migrations)
- 🐳 Docker & Docker Compose
- 📑 Swagger (API documentation)
This project is licensed under the MIT License.
Feel free to use and modify it according to your needs.
For contributions or support, please contact me via email at [email protected]
or connect with me on LinkedIn.