I built this project without prior frontend knowledge, purely driven by the desire to learn and contribute.
- Java 21
- Spring Boot 3.5
- Spring Data JPA
- MySQL (Dockerized)
- Docker + Docker Compose
- Create Courses with validation for prerequisites
- Get All Courses with their prerequisites
- Delete Courses with dependency checks
- Add/Remove/View Course Instances by year & semester
- Proper HTTP status codes and informative error messages
Use department codes followed by numeric codes. Examples:
CS101 → Computer Science
MECH202 → Mechanical Engineering
MATH203 → Mathematics
Comma-separated list of valid course IDs.
Example: CS101, MATH203
##🎓 Course Instance Format json { "year": 2024, "semester": 1, "courses": { "courseId": "CS101" } }
http://localhost:8080
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/courses |
Add a new course (validates prerequisites) |
| GET | /api/courses |
Fetch all courses with prerequisites |
| GET | /api/courses/{id} |
Fetch course by ID with prerequisites |
| DELETE | /api/courses/{id} |
Delete course if not a prerequisite |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/instances |
Add course delivery (year, semester) |
| GET | /api/instances/{year}/{sem} |
Get instances for year & sem |
| GET | /api/instances/{year}/{sem}/{courseId} |
Get instance details |
| DELETE | /api/instances/{year}/{sem}/{courseId} |
Delete a specific instance |
Make sure docker-compose.yml is in the root of this project.
docker-compose up
##📁 Project Structure
Internship-Backend/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── example/
│ │ │ └── Internship_Backend/
│ │ │ ├── Controller/
│ │ │ │ └── CoursesInfo.java
│ │ │ ├── Entity/
│ │ │ │ ├── Courses.java
│ │ │ │ └── CourseDelivery.java
│ │ │ ├── Repository/
│ │ │ │ ├── CourseRepository.java
│ │ │ │ └── CourseDeliveryRepository.java
│ │ │ ├── Service/
│ │ │ │ └── CoursesInfoService.java
│ │ │ └── InternshipBackendApplication.java
│ └── resources/
│ └── application.properties
├── src/test/
│ └── java/com/example/Internship_Backend/
│ └── InternshipBackendApplicationTests.java
├── Dockerfile
├── docker-compose.yml
├── pom.xml
├── mvnw / mvnw.cmd
└── README.md