An open API service indexing awesome lists of open source software.

https://github.com/henriiqueaze/studentprogress

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, helping educational institutions streamline their processes.
https://github.com/henriiqueaze/studentprogress

docker java spring-boot sql

Last synced: about 2 months ago
JSON representation

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, helping educational institutions streamline their processes.

Awesome Lists containing this project

README

          

#

๐ŸŽ“ StudentProgress API ๐Ÿ“Š



StudentProgress Logo

**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.

---

## โœจ Features
- ๐Ÿ“Œ 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

---

## ๐Ÿš€ How to Use

1. **Clone the repository:**
```bash
git clone git@github.com:henriiqueaze/StudentProgress.git
cd StudentProgress
```

2. **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:
```bash
CREATE DATABASE student_progress;
```

3. **Set up environment variables:**
Copy the example file and customize it:
```bash
cp .env.example .env
```
Make sure the SPRING_DATASOURCE_URL points to your MySQL server host and port, for example:
```bash
jdbc:mysql://localhost:3306/student_progress?useSSL=false
```

4. **Build the application (.jar) with Maven:**
This step compiles the code and generates the .jar file inside the target/ folder:
```bash
./mvnw clean package
```

5. **Run the application using Docker Compose:**
```bash
docker-compose up --build
```

6. **Access the API documentation (Swagger):**
```bash
http://localhost:8080/swagger-ui.html
```

---

## ๐Ÿ”— API Endpoints
- ๐Ÿ“„ `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:

```bash
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

---

## ๐ŸŒ CORS Configuration

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:
```bash
CORS_ALLOWED_ORIGINS=http://localhost:8080
```

To allow multiple domains, separate them with commas:
```bash
CORS_ALLOWED_ORIGINS=http://localhost:8080,https://your-frontend.com
```

---

## ๐Ÿ› ๏ธ Technologies Used
- โ˜• Java (Spring Boot)
- ๐Ÿ—„๏ธ MySQL (Database)
- ๐Ÿ—๏ธ Hibernate (ORM)
- ๐Ÿ”— HATEOAS (Hypermedia API support)
- ๐Ÿงช JUnit (Testing framework)
- ๐Ÿ“‚ Flyway (Database migrations)
- ๐Ÿณ Docker & Docker Compose
- ๐Ÿ“‘ Swagger (API documentation)

---

## ๐Ÿ“œ License
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 [henriqueeaze.dev@gmail.com](mailto:henriqueeaze.dev@gmail.com)
or connect with me on [LinkedIn](https://www.linkedin.com/in/henrique-azevedo-b2195b2b0/).