Skip to content

Latest commit

 

History

History
86 lines (70 loc) · 3.02 KB

File metadata and controls

86 lines (70 loc) · 3.02 KB

Library Management System

Project Overview

This Library Management System is a Spring Boot-based application designed to manage books, authors, members, and loans in a library. It allows users to:

  • Manage authors, books, members, and loans.
  • Perform CRUD (Create, Read, Update, Delete) operations.
  • Track book loans and manage book inventories.

Features

  • Author Management: Add, update, view, and delete authors.
  • Book Management: Add, update, view, and delete books. Filter books by genre.
  • Member Management: Add, update, view, and delete library members.
  • Loan Management: Add, update, view, and delete loan records.

Technologies Used

  • Backend: Spring Boot
  • Database: H2 Database (In-memory)
  • Dependency Management: Maven
  • Build Tool: Spring Boot Maven Plugin

Project Structure

  • Controller Layer: Manages HTTP requests and interacts with services.
  • Service Layer: Contains business logic and interacts with DAO.
  • DAO Layer: Data access objects for handling database operations.
  • DTO Layer: Response structure for consistent API responses.

Setup Instructions

1. Clone the repository

git clone https://github.com/your-username/library-management-system.git

2. Setup and Installation

  • Make sure you have Java 8 or later installed.
  • Install Maven if not already installed.

3. Build and Run the Application

  • Navigate to the project directory.
  • Run the application with Maven:
mvn spring-boot:run

4. API Endpoints

Author Endpoints

  • POST /author: Create a new author.
  • GET /author: Get all authors.
  • GET /author/{id}: Get an author by ID.
  • PUT /author: Update an existing author.
  • DELETE /author/{id}: Delete an author by ID.

Book Endpoints

  • POST /book: Create a new book.
  • GET /book: Get all books.
  • GET /book/{id}: Get a book by ID.
  • GET /book/genre/{genre}: Get books by genre.
  • PUT /book: Update an existing book.
  • DELETE /book/{id}: Delete a book by ID.

Member Endpoints

  • POST /member: Create a new member.
  • GET /member: Get all members.
  • GET /member/{id}: Get a member by ID.
  • PUT /member: Update an existing member.
  • DELETE /member/{id}: Delete a member by ID.

Loan Endpoints

  • POST /loan: Create a new loan.
  • GET /loan: Get all loans.
  • GET /loan/{id}: Get a loan by ID.
  • PUT /loan: Update an existing loan.
  • DELETE /loan/{id}: Delete a loan by ID.

Database Configuration

  • The project uses an in-memory H2 database by default.
  • No additional configuration is required, but you can switch to a persistent database by modifying application.properties.

Future Improvements

  • Authentication: Implement user authentication and authorization.
  • Persistent Database: Integrate a persistent relational database like MySQL.
  • Front-End: Develop a user-friendly front-end using ReactJS or Angular.

License

This project is licensed under the MIT License.