Skip to content

Notes Management REST API is a Spring Boot–based backend service for creating, reading, updating, and deleting notes. It follows a layered architecture with JPA and MySQL, and supports pagination, sorting, search, and consistent DTO-based REST responses.

Notifications You must be signed in to change notification settings

Suryaguptaa/Notes-Api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes Management REST API

A backend-focused Notes Management application built using Spring Boot to practice clean REST API design, proper backend architecture, and database integration using JPA and MySQL.

This project is intentionally kept backend-only to focus on how real backend services are designed, structured, and consumed.


Overview

The application exposes RESTful APIs to manage notes with full CRUD functionality.
It follows a layered architecture (Controller → Service → Repository) and demonstrates how scalable APIs handle data using pagination, sorting, and search.

The goal of this project is not just functionality, but clarity, correctness, and clean design.


Features

  • Create, read, update, and delete notes
  • RESTful API design using standard HTTP methods
  • Proper HTTP status codes (200, 201, 204, 404)
  • Clear separation of concerns (Controller, Service, Repository)
  • Database persistence using JPA/Hibernate
  • Server-side pagination and sorting
  • Search notes by title (case-insensitive)
  • DTO-based responses to keep APIs clean and frontend-friendly
  • APIs tested using Postman

Tech Stack

  • Java
  • Spring Boot
  • Spring Data JPA (Hibernate)
  • MySQL
  • Maven

Project Structure

src/main/java/com/notesapplication/notesapi
│
├── controller → Handles HTTP requests and responses
├── service → Contains business logic
├── repository → Database access using JPA
├── model → JPA entity classes
├── dto → API response models

API Endpoints

  • Create a note
POST /notes
  • Get all notes (paginated)
GET /notes?page=0&size=5
  • Get note by ID
GET /notes/{id}
  • Update a note
PUT /notes/{id}
  • Delete a note
DELETE /notes/{id}
  • Search notes by title
GET /notes/search?title=spring&page=0&size=5

Key Learnings From This Project

  • How REST APIs are designed and structured in Spring Boot

  • Why controllers should only handle HTTP concerns

  • How business logic is separated into service layers

  • How JPA abstracts database operations using repositories

  • Why server-side pagination is essential for scalability

  • How to design clean API responses using DTOs

  • Debugging real Spring Boot and JPA issues instead of following tutorials blindly


Setup Instructions

  1. Clone the repository
  2. Configure your MySQL database credentials in application.properties
  3. Run the application using your IDE or with:
    mvn spring-boot:run
    

Notes

  • Frontend is intentionally excluded to keep the project backend-focused

  • This project is meant for learning and demonstrating backend fundamentals

  • All features included can be clearly explained in interviews

About

Notes Management REST API is a Spring Boot–based backend service for creating, reading, updating, and deleting notes. It follows a layered architecture with JPA and MySQL, and supports pagination, sorting, search, and consistent DTO-based REST responses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages