This project is the culmination of the Java Server Programming Course, focusing on developing a streamlined student and course management system using Java Spring.
- Creation of REST API for user authentication and management of students and courses.
- Access control: Only authorized users can edit and add student/course data; others can view data and perform searches by ID.
- User interface development using ReactJS.
- REST API integration to list students enrolled in a course.
- User registration with username and password.
- Secure password storage using Hash format.
- Access for all users to view course and student data.
- Limited access for authorized users to update, add, modify, or delete data.

- GET /students: Get all students.
- AUTH POST /students: Add a new student (JSON in the request body).
- GET /students/{id}: Get a student by ID.
- AUTH PUT /students/{id}: Update a student by ID.
- AUTH DELETE /students/{id}: Delete a student by ID.
- GET /courses: Get all courses.
- AUTH POST /courses: Add a new course (JSON in the request body).
- GET /courses/{id}: Get a course by ID (bonus: return a list of enrolled students).
- AUTH PUT /courses/{id}: Update a course by ID.
- AUTH DELETE /courses/{id}: Delete a course by ID.
- POST /register: Register a new user with username and password (JSON in the request).
- POST /login: Check username and password; if correct, return a JWT token.
| Gateway | Endpoint | Purpose | Authentication Required |
|---|---|---|---|
| Users API | /api/users |
Manage user information | Yes |
| Students API | /api/students |
CRUD operations on students | No (Read operations), Yes (Create, Update, Delete) |
| Courses API | /api/courses |
CRUD operations on courses | Yes |
| Authentication | /login or /users/login |
User login and authentication | No |
-
Users API:
- Requires authentication for all operations.
- Uses JWT for authentication.
-
Students API:
- Requires authentication for Create, Update, and Delete operations.
- No authentication required for Read operations.
- Uses JWT for authentication.
-
Courses API:
- Requires authentication for all CRUD operations.
- Uses JWT for authentication.
-
Authentication:
- Handles user login and provides JWT tokens.
- No authentication required for the authentication endpoint.
-
Users API:
- Endpoint:
/users - Methods: GET, POST, PUT, DELETE
- Endpoint:
-
Students API:
- Endpoint:
/students - Methods: GET (No authentication), POST, PUT, DELETE (Requires authentication)
- Endpoint:
-
Courses API:
- Endpoint:
/courses - Methods: GET, POST, PUT, DELETE
- Endpoint:
-
Authentication:
- Endpoint:
/login - Method: POST
- Provide username and password in the request body to obtain a JWT token.
- Endpoint:




