Skip to content

omidiDeveloper/crudSpringBoot

Repository files navigation

🎓 Student Manager Backend

A powerful Spring Boot MVC application for managing student records — built using Kotlin, Spring Boot, and JPA (Hibernate). This backend service provides RESTful APIs to create, read, update, and delete (CRUD) student data efficiently. It is designed to integrate easily with Android, web, or desktop frontends.

📱 Android Application

You can also check out the Android Application that connects to this backend!
👉 View Android App Repository


🧩 Table of Contents


⚙️ Features

✅ Built with Spring Boot and Kotlin
✅ Follows MVC Architecture
✅ CRUD operations for students
✅ Uses Spring Data JPA for database management
✅ Supports MySQL integration
✅ Well-structured RESTful API design
✅ Ready for Android or Web integration


🏗️ Architecture

The application is based on MVC (Model-View-Controller) pattern:

Model       → org.example.student_spring.model.Student
View        → (Handled via API responses, suitable for web or Android)
Controller  → org.example.student_spring.controller.StudentController
Repository  → org.example.student_spring.repositories.StudentRepository

🧠 Technologies Used

Layer Technology
Language Kotlin
Framework Spring Boot
Database MySQL
ORM Spring Data JPA
Build Tool Gradle
Architecture MVC

📁 Project Structure

student_spring/
│
├── src/
│   ├── main/
│   │   ├── kotlin/
│   │   │   └── org/example/student_spring/
│   │   │       ├── controller/StudentController.kt
│   │   │       ├── model/Student.kt
│   │   │       └── repositories/StudentRepository.kt
│   │   └── resources/
│   │       ├── application.properties
│   │       └── templates/
│   └── test/
│
├── build.gradle.kts
└── README.md


🚀 API Endpoints

👩‍🎓 Get All Students

GET /students Response:

[
  {
    "id": 1,
    "name": "Mohammad Omidi",
    "course": "Android",
    "score": 20
  }
]

➕ Add a Student

POST /students Request Body:

{
  "name": "Mohammad Omidi",
  "course": "Android",
  "score": 17
}

Response:

Student inserted successfully

✏️ Update a Student

PUT /students/updating/{id} Request Body:

{
  "name": "Mohammad Omidi",
  "course": "Math",
  "score": 20
}

Response:

Student updated successfully

❌ Delete a Student

DELETE /students/deleting{id} Response:

{id}

💾 Database Configuration

Add your MySQL configuration inside src/main/resources/application.properties:

spring.datasource.url=jdbc:mysql://localhost:3306/student_db
spring.datasource.username=root
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true

▶️ Running the Project

  1. Clone this repository

    git clone https://github.com/omidiDeveloper/student_spring.git
  2. Navigate to the project directory

    cd student_spring
  3. Build the project

    ./gradlew build
  4. Run the Spring Boot application

    ./gradlew bootRun

📸 Screenshots

image image image image


📜 License

This project is open source and available under the MIT License. Feel free to use and modify it for educational or commercial purposes.


👨‍💻 Author

Mohammad Omidi

📍 Android Developer | Kotlin & Spring Boot Enthusiast

-📧 OmidiKotlin@gmail.com
-💻 GitHub: @omidiDeveloper
-🔗 LinkedIn: Mohammad Omidi Zadeh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published