GithubHelp home page GithubHelp logo

ncherfaoui / student-management Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23 KB

A simple Spring Boot REST application with MongoDB for managing student data. The application provides basic CRUD operations on student entities.

License: MIT License

Java 100.00%
java junit5 mongodb rest-api spring-boot testing

student-management's Introduction

Student Management System

This project is a simple Student Management System built with Spring Boot and MongoDB. It provides basic CRUD operations for managing student records.

Technologies Used

  • Java 21
  • Spring Boot 3.3.1
  • MongoDB
  • Docker
  • Maven
  • JUnit 5
  • Mockito

Prerequisites

Before you begin, ensure you have met the following requirements:

  • JDK 21 installed
  • Maven installed
  • Docker and Docker Compose installed
  • Git installed

Getting Started

To get this project up and running on your local machine, follow these steps:

  1. Clone the repository:
git clone https://github.com/NCherfaoui/student-management.git
cd student-management
  1. Start MongoDB using Docker Compose:
docker-compose up -d
  1. Build the project:
mvn clean install
  1. Run the application:
mvn spring-boot:run

The application will start and be available at http://localhost:8080.

API Endpoints

  • GET /api/students: Retrieve all students
  • GET /api/students/{id}: Retrieve a specific student by ID
  • POST /api/students: Create a new student
  • PUT /api/students/{id}: Update an existing student
  • DELETE /api/students/{id}: Delete a student

Sample Request

To create a new student:

POST http://localhost:8080/api/students
Content-Type: application/json

{
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]",
"age": 20
}

Running Tests

To run the unit tests, execute the following command:

mvn test

Project Structure

  • src/main/java/com/nc/studentmanagement: Contains the main application code
    • controller: REST controllers
    • model: Data models
    • repository: Database repositories
    • service: Business logic
    • config: Configuration classes
  • src/test/java/com/nc/studentmanagement: Contains the test classes

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source and available under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.