Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library Management System

Library Management System

Console-based Java app showcasing clean layered architecture, the repository pattern, and JSON persistence.

Java Maven Jackson Logback JUnit5


Project Preview

Project Preview

A layered Java console application built around clear separation of concerns: business logic lives entirely in the service layer, persistence is abstracted behind repository interfaces, data is stored as JSON with atomic, crash-safe writes, and every failure path raises a typed, predictable exception instead of a generic error.


Project Stats

Metric Details
Java Classes 33+
Architecture Layers 6
Custom Exceptions 7
Service Classes 4
Build System Maven
Persistence JSON (Jackson)

What This Project Demonstrates

  • Strict layered architecture — dependencies only ever flow downward
  • Repository pattern — swap JSON for a database with zero service-layer changes
  • Atomic, crash-safe JSON writes (temp file → rename, never partial writes)
  • Centralized validation + a typed, unchecked exception hierarchy
  • Real ISBN-10/13 checksum validation, not just format matching
  • Business rules (loan period, fine rate) externalized to a properties file

Quick Features

Features
  • Book Management — add, update, delete, search
  • Member Management — register, search, track status
  • Issue Book — eligibility checks + due-date calculation
  • Return Book — atomic return with automatic fine calculation
  • Statistics Dashboard — live active / overdue / most-borrowed metrics
  • Report Export — timestamped .txt snapshots

Architecture

Architecture Diagram

ConsoleUI → Services → Repositories → JSON Storage — one-directional, interface-bound dependencies. Model, Utility, and Exception layers cut across all three.


Core Workflows

Core Workflows

Add-Book Flow

Book Input → Validation → Repository → books.json

Issue-Book Flow

Member Validation → Transaction Creation → Inventory Update

Return-Book Flow

Transaction Update → Fine Calculation → Inventory Restore


Project Structure

Project Structure

Code is organized strictly by responsibility — model, exception, utility, repository, service, and UI each live in their own package. This separation of concerns keeps the layered architecture enforceable in practice, makes the codebase easy to navigate and maintain, and leaves a clear path to scale — such as swapping JSON for a database — without restructuring existing layers.


Screenshots

Main Menu Issue Book
Main Menu Issue Book
Return Book Statistics Dashboard
Return Book Statistics Dashboard

Installation

Prerequisites: Java 17+, Maven 3.8+

git clone https://github.com/PawanChoudhary0607/Library-management-system.git
cd library-management-system
mvn clean install
mvn exec:java

Seed data is included — runs immediately after cloning.


Recruiter Highlights

  • Clean Architecture — strict separation between presentation, business logic, and persistence
  • Repository Pattern — storage swappable without touching service or UI code
  • OOP Principles — encapsulated entities with controlled state transitions
  • SOLID Design — dependency inversion enforced at every repository boundary
  • JSON Persistence — Jackson-based, atomic, crash-safe writes
  • Exception Handling — typed, unchecked hierarchy with consistent error messages
  • Maven Project Structure — standard layout, ready for build, test, and packaging

Future Improvements

  • Database integration (PostgreSQL / SQLite)
  • Spring Boot migration
  • REST API development
  • Authentication & authorization
  • Web dashboard
  • Cloud deployment

Pawan Choudhary · B.Tech CSE (AI/ML) GitHub Linkedin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages