Skip to content

This repository contains the backend service for a university course management system, responsible for managing courses and their delivery instances. It was developed independently as part of a self-driven learning project with a focus on building robust, scalable backend systems. The application exposes RESTful APIs to handle core domain logic,

License

Notifications You must be signed in to change notification settings

Daksh021/Backend

Repository files navigation

📘 Courses API

I built this project without prior frontend knowledge, purely driven by the desire to learn and contribute.


🔧 Tech Stack

  • Java 21
  • Spring Boot 3.5
  • Spring Data JPA
  • MySQL (Dockerized)
  • Docker + Docker Compose

🚀 Features

  • 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

📘 Course ID Naming Convention

Use department codes followed by numeric codes. Examples:

CS101 → Computer Science

MECH202 → Mechanical Engineering

MATH203 → Mathematics

📗 Prerequisites Format

Comma-separated list of valid course IDs.

Example: CS101, MATH203

##🎓 Course Instance Format json { "year": 2024, "semester": 1, "courses": { "courseId": "CS101" } }

🌍 API Base URL (Docker Compose)

http://localhost:8080


📌 REST API Endpoints

📚 Course APIs

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

🎓 Course Instance APIs

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

🐳 Docker Setup (Preferred)

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

About

This repository contains the backend service for a university course management system, responsible for managing courses and their delivery instances. It was developed independently as part of a self-driven learning project with a focus on building robust, scalable backend systems. The application exposes RESTful APIs to handle core domain logic,

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published