Skip to main content

JC Java Training - Library Management API

A comprehensive Spring Boot REST API for library management with JWT authentication, OpenLibrary integration, and complete book and user management capabilities.

Overview

This library management system is built with Spring Boot and demonstrates professional Java development practices. It provides a complete REST API for managing books and users, with robust authentication, external API integration, and comprehensive testing.

Quick Start

Get up and running in minutes with our step-by-step guide

API Reference

Explore the complete API documentation

Architecture

Learn about the layered architecture and design patterns

Authentication

Understand JWT-based security implementation

Key Features

Secure authentication system using JSON Web Tokens with Spring Security. Implements stateless session management and role-based access control.
Full Create, Read, Update, and Delete operations for both books and users, with advanced filtering, sorting, and pagination support.
Seamless integration with the OpenLibrary API to search for books by ISBN and automatically populate book details.
Clean separation of concerns with distinct presentation, service, and persistence layers following industry best practices.
Comprehensive error handling with custom exceptions and consistent error responses across all endpoints.
Built-in Swagger/OpenAPI documentation for interactive API exploration and testing.

Technology Stack

  • Framework: Spring Boot 3.5.3
  • Language: Java 21
  • Database: PostgreSQL with JPA/Hibernate
  • Security: Spring Security with JWT
  • API Documentation: Swagger/OpenAPI
  • Object Mapping: MapStruct
  • Build Tool: Maven
  • Testing: JUnit, Spring Test

What You’ll Learn

This project serves as a comprehensive Java training resource, covering:
  • Building REST APIs with Spring Boot
  • Implementing JWT authentication and authorization
  • Working with JPA and PostgreSQL databases
  • Integrating external APIs
  • Applying layered architecture patterns
  • Writing unit and integration tests
  • Using MapStruct for DTO mapping
  • Implementing global exception handling

Getting Started

1

Prerequisites

Ensure you have Java 21, Maven, PostgreSQL, and Git installed on your system.
2

Clone & Configure

Clone the repository and configure your database connection in application.properties.
3

Run & Test

Start the application and explore the API using Swagger UI at http://localhost:8081/swagger-ui/index.html.
Ready to dive in? Head over to the Quick Start Guide to get your development environment set up.

Need Help?

Installation Guide

Detailed setup instructions and configuration

Project Structure

Understand the codebase organization

Build docs developers (and LLMs) love