Skip to content

pushpak90/LEARNING_NAVIGATOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

📘 Learning Navigator – Spring Boot REST API

A Spring Boot RESTful backend application for managing Students, Subjects, Exams, and enrollments, with a special Easter Egg feature. This project demonstrates clean REST API design, layered architecture, and controller-level unit testing.


🚀 Features

  • Create and manage Students
  • Create and manage Subjects
  • Create Exams under Subjects
  • Enroll students in Subjects and Exams
  • Fetch individual and all entities
  • Hidden Easter Egg API for fun number facts
  • Full Controller-level unit test coverage

🧱 Tech Stack

  • Java 17
  • Spring Boot 3.4.x
  • Spring Data JPA
  • Hibernate
  • MySQL
  • Gradle
  • JUnit 5
  • Mockito
  • Lombok
  • ModelMapper

🗂️ Project Structure

src
├── main
│   ├── java/com/crio/learning_navigator
│   │   ├── Controller
│   │   ├── Service
│   │   ├── Service/Impl
│   │   ├── Model
│   │   ├── DTOs
│   │   └── Config
│   └── resources
│       └── application.properties
│
└── test
    └── java/com/crio/learning_navigator
        └── Controller

🔗 API Endpoints

👤 Student APIs

Method Endpoint Description
POST /students Create a student
POST /students/{studentId}/subjects/{subjectId} Enroll subject
POST /students/{studentId}/exams/{examId} Enroll exam
GET /students/{studentId} Get student by ID
GET /students Get all students

📚 Subject APIs

Method Endpoint Description
POST /subjects Create subject
GET /subjects/{subjectId} Get subject by ID
GET /subjects Get all subjects

📝 Exam APIs

Method Endpoint Description
POST /exams/subjects/{subjectId} Create exam
GET /exams/{examId} Get exam by ID
GET /exams Get all exams

🥚 Easter Egg API

Method Endpoint Description
GET /easter-egg/hidden-feature/{number} Get a fun number fact

🧪 Testing Strategy

  • Controller-level unit tests using @WebMvcTest
  • MockMvc for API testing
  • Service layer mocked using Mockito
  • No database access during tests

✔ Tested Controllers

  • StudentController
  • SubjectController
  • ExamController
  • EasterEggController

▶️ Run Tests

./gradlew test

⚙️ CI Configuration

Gradle daemon disabled for CI compatibility.

org.gradle.daemon=false

🏃 Run Application

./gradlew bootRun

App runs on:

http://localhost:8081

About

Learning Navigator is a Spring Boot REST API for managing students, subjects, and exams, featuring clean layered architecture, RESTful endpoints, and comprehensive controller-level unit testing using JUnit and Mockito.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors