A full-stack Student Management System built with Spring Boot, PostgreSQL, and React. The application provides a focused single-page interface for managing student records with search, filtering, sorting, pagination, and complete CRUD operations.
This project includes:
- A Spring Boot REST API for student management
- A PostgreSQL database for persistence
- A React + Vite frontend with a modern dark UI
- Server-side filtering, sorting, and pagination
- Validation and structured error handling for form submissions
- Java 21
- Spring Boot
- Spring Web MVC
- Spring Data JPA
- Jakarta Validation
- PostgreSQL
- React
- Vite
- JavaScript
- Tailwind CSS
- Axios
- lucide-react
- View all students
- Search students by name
- Filter students by department
- Filter students by minimum and maximum CGPA
- Sort by name or CGPA
- Server-side pagination
- Add a student
- Edit an existing student
- Delete a student with confirmation
- Summary cards for total students, average CGPA, and departments
- Validation error display and duplicate email handling
student-management-spring/
|-- src/
| |-- main/
| | |-- java/com/sriragul/studentmanagement/
| | | |-- config/
| | | |-- controller/
| | | |-- dto/
| | | |-- entity/
| | | |-- exception/
| | | |-- repository/
| | | |-- service/
| | | |-- specification/
| | |-- resources/
|-- frontend/
| |-- src/
| | |-- api/
| | |-- components/
| | |-- pages/
|-- pom.xml
|-- README.md
Base URL:
http://localhost:8081/api/students
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/students |
Fetch all students |
GET |
/api/students/{id} |
Fetch a student by id |
POST |
/api/students |
Create a student |
PUT |
/api/students/{id} |
Update a student |
DELETE |
/api/students/{id} |
Delete a student |
GET |
/api/students/search |
Search, filter, sort, and paginate students |
The /api/students/search endpoint supports:
namedepartmentminCgpamaxCgpapagesizesort
Example:
GET /api/students/search?name=an&department=CSE&minCgpa=7.5&maxCgpa=9.5&page=0&size=8&sort=name,asc{
"name": "Ananya Sharma",
"email": "ananya@example.com",
"department": "CSE",
"cgpa": 8.76
}Field-level validation errors:
{
"name": "Name is required",
"email": "Enter a valid email address"
}General errors such as duplicate email:
{
"message": "Email already exists: ananya@example.com"
}The frontend does not perform local filtering on the table data. Instead:
- It collects search, department, CGPA, sort, and pagination inputs
- It sends those values to
/api/students/search - The backend performs filtering, sorting, and pagination
- The frontend renders the Spring
Pageresponse
This keeps the UI aligned with the actual backend dataset and makes combined filters work correctly.
- Java 21
- Maven
- Node.js
- npm
- PostgreSQL
git clone <your-repository-url>
cd student-management-springUpdate application.properties with your local PostgreSQL settings.
Current properties include:
- Database name:
student_db - Port:
5432 - Backend port:
8081
Recommended: replace hardcoded local credentials with values appropriate for your machine before sharing or deploying the project.
From the project root:
./mvnw spring-boot:runOn Windows:
mvnw.cmd spring-boot:runThe backend will start on:
http://localhost:8081
Open a second terminal:
cd frontend
npm install
npm run devThe frontend will start on:
http://localhost:5173
Inside the frontend directory:
npm run dev
npm run build
npm run preview
npm run lintFrontend production build:
cd frontend
npm run buildFrontend lint:
cd frontend
npm run lintBackend tests:
./mvnw test- CRUD operations are handled through the Spring REST API
- Filtering and pagination are server-side
- Validation is handled by Jakarta Validation on the backend
- Duplicate email errors are returned through a global exception handler
- The frontend uses a shared modal for add and edit flows
- Delete uses a custom confirmation dialog instead of browser alerts
- Move database credentials to environment variables
- Add Docker support
- Add authentication and role-based access control
- Add API documentation with Swagger/OpenAPI
- Add unit and integration tests for frontend components
- Add deployment configuration
Developed as a full-stack Student Management System project using Spring Boot and React.