Spring Boot · Java 21 · Full Stack

Library Management System

Catalog · Borrow · Reserve · Track

A full-stack web application built with Java 21 and Spring Boot 4 for managing a library's resources. Features a Thymeleaf web interface, REST API with Swagger docs, Spring Security with role-based access, and CI/CD deployment to AWS Elastic Beanstalk.

View on GitHub Screenshots Features

The system enables librarians to manage books, authors, and categories while allowing members to borrow, return, and reserve books. It features a full Thymeleaf web interface with Bootstrap 5, pagination, sorting, and real-time validation.

Built with a layered architecture — controllers handle HTTP, services contain business logic, and repositories manage persistence. Spring Security enforces role-based access control across three user roles: Admin, Librarian, and Member.

The REST API is documented with OpenAPI/Swagger. The project includes comprehensive unit and integration tests with JaCoCo coverage, and is deployed to AWS Elastic Beanstalk via a GitHub Actions CI/CD pipeline.

🛡️ Admin
Full access to the system including user management, role assignment, and all CRUD operations.
📚 Librarian
Manages the book catalog — adding, editing, and deleting books, authors, and categories. Handles loans and reservations.
👤 Member
Browses available books, borrows and returns within their limit, and reserves books that are currently unavailable.
📖
Book Catalog Management

Full CRUD for books with ISBN validation, category assignment, multi-author support, and automatic stock tracking across borrows and returns.

🔄
Borrow & Return

Members borrow books with stock and limit validation. The system tracks borrowing date, due date, and return date — with overdue detection built in.

📋
Reservations

Reserve unavailable books, cancel, or convert reservations into active loans when copies become available. Status lifecycle: active → completed/cancelled.

🔒
Spring Security

Role-based access control (Admin/Librarian/Member) with BCrypt passwords, custom login page, remember-me, CSRF protection, and method-level security.

🌐
Thymeleaf UI + REST API

Full web interface with Bootstrap 5, pagination, sorting, and server-side validation. Plus a complete REST API documented with Swagger/OpenAPI.

☁️
AWS Deployment

Deployed to AWS Elastic Beanstalk with RDS PostgreSQL, automated via GitHub Actions CI/CD — tests, builds, and deploys on every push to main.

Java 21

Core language for all business logic, entities, services, and controller implementations.

Spring Boot 4

Application framework providing auto-configuration, dependency injection, security, and web layer.

Spring Data JPA

ORM persistence with Hibernate — entities, custom queries, and repository pattern for all 7 entities.

PostgreSQL + H2

PostgreSQL for production/dev, H2 in-memory for tests. Multi-profile configuration for seamless switching.

Spring Security

Authentication and authorization with BCrypt, role-based access, custom login, and CSRF protection.

Thymeleaf + Bootstrap 5

Server-side template engine for the web interface, styled with Bootstrap and enhanced with Bean Validation.

OpenAPI / Swagger

REST API documentation auto-generated with SpringDoc — interactive UI for testing all endpoints.

AWS Elastic Beanstalk

Cloud hosting with RDS PostgreSQL, load balancer, and automated deployment via GitHub Actions CI/CD.

JUnit 5 + JaCoCo

Unit tests with Mockito, integration (E2E) tests, and code coverage reporting with JaCoCo.

View Source on GitHub

Full source code, entity model, REST API, Thymeleaf views, tests, and CI/CD pipeline — all available on GitHub. Clone the repo, set up PostgreSQL, and run with Maven.

View on GitHub