A full-stack library management system designed to streamline book loans, reservations, and inventory management. Developed as a University Project for the Object-Oriented Technologies course at AGH University of Krakow.
-
Language: Java 25
-
Framework: Spring Boot
-
Build Tool: Gradle
-
Security: Spring Security + JWT (JSON Web Tokens)
-
Database: PostgreSQL
-
Library: React
-
Networking: Axios
- Containerization: Docker, Docker Compose
-
Multi-role Authorization (RBAC): Tailored interfaces and permissions for Readers, Librarians, and Administrators.
-
Comprehensive CRUD: Full management of book collections, categories, and individual copies.
-
Advanced Loan System: Handles the complete lifecycle of a loan, including due dates and return statuses.
-
Smart Reservations: Queuing system for currently unavailable books with automatic status updates.
-
Fine-grained Categorization: Support for many-to-many relationships between books and categories.
The system is built with maintainability and security in mind, following industry-standard patterns:
-
Domain-Driven Design (DDD): Logic is organized into cohesive modules: User, Book, Loan, and Reservation.
-
Layered Architecture: Strict separation of concerns between Controllers (API), Services (Business Logic), and Repositories (Data Access).
-
DTO Pattern: Data Transfer Objects are used to decouple the database schema from the API, preventing circular dependencies and enhancing security.
-
Business Logic Integrity: Complex validations (ISBN checksums, copy availability, overdue checks) are centralized in the Service layer.
-
Authentication: Secure login flow with Spring Security.
-
Authorization: JWT-based stateless sessions. Tokens are required in the Authorization: Bearer header for protected resources.
-
Role-Based Access Control (RBAC): Access to administrative functions (e.g., adding books, managing users) is strictly enforced based on user roles (ADMIN, LIBRARIAN, READER).
The system utilizes a relational PostgreSQL schema optimized for library workflows:
-
User: Management of credentials and role assignments.
-
Book & Category: Complex relationships for efficient searching and filtering.
-
BookCopy: Tracking individual physical items and their status (AVAILABLE, LOANED, DAMAGED, etc.).
-
Loan & Reservation: Historical tracking of rentals and active waitlists.
The easiest way to get the system up and running is using Docker. This ensures a consistent environment for the database and application.
Prerequisites
- Docker and Docker Compose installed.
- Clone the repository:
git clone https://github.com/your-username/mole-ksiazkowe.git
cd mole-ksiazkowe- Launch with Docker Compose:
docker-compose up -d- Access the Application:
-
Backend API: http://localhost:8080
-
Database: http://localhost:5432
- Adam Głowacki - github profile
- Maciej Trznadel - github profile
- Kajetan Frątczak - github profile
- Bartłomiej Kaczyński - github profile