Skip to content

Latest commit

 

History

History
250 lines (158 loc) · 4.93 KB

File metadata and controls

250 lines (158 loc) · 4.93 KB

Library Management System

Java Spring Boot React MySQL

A full-stack Library Management System designed to manage books, members, and lending workflows through a scalable Spring Boot REST API and React frontend.

This application demonstrates real-world backend architecture, API design, and frontend integration using modern technologies.


🚀 Overview

The Library Management System enables librarians and administrators to efficiently manage:

  • Book inventory
  • Library members
  • Book lending and return workflows

The system follows a layered backend architecture and exposes RESTful APIs consumed by a React-based user interface.

This project highlights how modern applications integrate:

  • Client-side UI (React)
  • Backend REST APIs (Spring Boot REST API)
  • Persistent relational databases (MySQL)

📌 Project Status

This project was created to practice full-stack development using React and Spring Boot.

It currently supports CRUD operations for:

  • 📚 Books
  • 👤 Members
  • 🔖 Loans

The backend exposes REST endpoints which are consumed by the React frontend.

Interactive API documentation is also available through Swagger/OpenAPI.


📘 Key Learning Areas

• Building REST APIs using Spring Boot • Implementing CRUD operations with Spring Data JPA • Structuring a layered backend architecture (Controller → Service → Repository) • Using DTOs to decouple API contracts from JPA entities • Connecting a React frontend to backend APIs • Building controlled forms with dynamic dropdowns in React • Managing relational data using MySQL • Documenting APIs using Swagger/OpenAPI


🛠️ Tech Stack

Frontend

  • React

Backend

  • Java
  • Spring Boot
  • Spring Data JPA
  • REST APIs
  • Swagger / OpenAPI

Database

  • MySQL

✨ Features

📚 Book Management

The system provides complete CRUD functionality for managing books.

Users can:

• Add new books to the library catalog
• View all books
• Update book information
• Delete books from the system


👤 Member Management

Library members can also be managed through the API.

Users can:

• Register new members • View all members • Update member information • Delete members


🔖 Loan Management

Books can be checked out to members and tracked through the system.

Users can:

• Create a loan by selecting a book and a member • View all active and past loans • Update loan details including return date • Delete a loan record


📡 API Documentation

The backend includes Swagger/OpenAPI documentation.

After starting the backend server, open:


[http://localhost:8080/swagger-ui.html](http://localhost:8080/swagger-ui.html)

or


[http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html)

Swagger allows you to:

  • View all API endpoints
  • Test requests directly from the browser
  • Inspect request and response models

🏗️ Project Architecture

The application is organized into three modules:

libraryms-app-data

Contains JPA entities and persistence logic.

libraryms-app-rest

Spring Boot REST API exposing endpoints for books and members.

libraryms-app-web

React frontend that communicates with the backend API.


⚙️ How to Run the Project

1️⃣ Clone the repository

git clone https://github.com/kayanr/LibraryManagementSystemApp.git

2️⃣ Setup MySQL

Create the database:

CREATE DATABASE libraryms_db;

Update database credentials in:

libraryms-app-rest/src/main/resources/application.properties

3️⃣ Start the Backend

cd libraryms-app-rest
mvn spring-boot:run

Backend runs at:

http://localhost:8080

4️⃣ Start the Frontend

cd libraryms-app-web
npm install
npm start

Frontend runs at:

http://localhost:3000

📷 Screenshots


📚 Future Improvements

Planned enhancements include:

• Upgrade to react-scripts v5 and React 18 (removes Node 17+ OpenSSL workaround) • Replace welcome page with a live stats dashboard • Group navigation into entity dropdowns (Books / Members / Loans) • Highlight overdue loans in the loan list • Add global error handling via @ControllerAdvice • Add member authentication and user roles • Implement search and pagination • Upgrade to react-router-dom v6 and react-bootstrap v2 • Containerize the application using Docker • Deploy the system to cloud infrastructure