Skip to content

About

Library management system with a Java 17 backend (Javalin + SQLite) and SPA frontend. Manages physical and digital books, loans, fines, phonetic search, barcodes/QR codes, and auditing through a Swagger-documented REST API.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Library Management System

A complete library management system featuring a Java 17 object-oriented backend and a modern web-based Single-Page Application (SPA) frontend. It manages physical and digital book inventories, members, loans, fines, auditing, and advanced search through a REST API documented with Swagger.

Java Javalin SQLite Vite Alpine.js


Key Features

  • Catalog management — physical and digital books with secure download URLs, authors, ISBNs, and stock tracking.
  • Member management — registration, tracking, and business rule enforcement.
  • Transactional loan management — automatic status calculation (Active, Overdue, Returned) and dynamic fee and fine calculations.
  • Multi-criteria search engine — phonetic normalization and accent-insensitive character matching.
  • Barcodes (Code 128) and QR codes — optical identification with mathematical ISBN validation.
  • Dynamic pagination across all listings.
  • OWASP security hardening — XSS sanitization, restricted CORS, and prepared statements to prevent SQL injection.
  • Immutable audit trail — traceability logs for every operation.
  • Integrated Swagger UI / OpenAPI 3.0 — interactive API documentation available at runtime.
image image

Architecture

┌─────────────────────────────────────────┐
│   Frontend SPA (Browser)                │
│   HTML5 · Alpine.js · Tailwind · Vite   │
└─────────────────┬───────────────────────┘
                  │ HTTP / JSON (REST :3001)
┌─────────────────▼───────────────────────┐
│   Javalin 6 Server (Embedded Jetty)     │
│   CORS · Jackson JSON · Swagger UI      │
└─────────────────┬───────────────────────┘
                  │
┌─────────────────▼───────────────────────┐
│   Business Logic (OOP Design)           │
│   LibroService · UsuarioService ·       │
│   PrestamoService · BusquedaService ·   │
│   BarcodeService · AuditoriaService     │
└─────────────────┬───────────────────────┘
                  │
┌─────────────────▼───────────────────────┐
│   SQLite 3 (WAL + Foreign Keys)         │
└─────────────────────────────────────────┘

The core is built around object-oriented programming, featuring inheritance (LibroFisico / LibroDigital ← Libro), generic interfaces (Obligaciones<T>), a domain model in com.biblioteca.models, and decoupled services in com.biblioteca.services.


Getting Started (Windows)

The following scripts are included in the project root:

INSTALAR_DEPENDENCIAS.bat   :: Installs Maven, Node.js, and frontend dependencies
COMPILAR.bat                :: Builds the fat JAR (sistema-biblioteca/app/biblioteca.jar)
INICIAR_SISTEMA.bat         :: Starts the backend (:3001) and frontend (:5173)
DETENER_SISTEMA.bat         :: Stops both services

Requirements: Java 17+, Maven, and Node.js.

Once the system is running:


Technology Stack

Layer Technology
Backend Java 17 LTS, Javalin 6.1.3 (Jetty 11)
Database SQLite 3 (sqlite-jdbc, WAL mode, foreign keys enabled)
Frontend SPA: HTML5, Vanilla JavaScript ES6+, Alpine.js, Tailwind CSS, Vite 8
API REST + JSON, OpenAPI 3.0 + Swagger UI
Packaging Self-contained fat JAR (Maven Shade Plugin)

Repository Structure

java-library-management-system/
├── sistema-biblioteca/
│   ├── java-core/        # Java source code (Maven)
│   ├── frontend/         # SPA (Vite + Alpine.js + Tailwind)
│   ├── app/              # Compiled biblioteca.jar
│   ├── database/         # biblioteca.db (SQLite)
│   └── runtime/          # Runtime binaries
├── maven/                # Local Maven distribution
├── documentacion/        # UML diagrams and technical documentation
└── *.bat                 # Automation scripts

About

Library management system with a Java 17 backend (Javalin + SQLite) and SPA frontend. Manages physical and digital books, loans, fines, phonetic search, barcodes/QR codes, and auditing through a Swagger-documented REST API.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages