Skip to content

abhishekprajapatt/selfwise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š SelfWise - Library Management System

A Full-Stack Web Application for Library Management with Role-Based Access Control

Live Demo β€’ API Docs β€’ Tech Stack β€’ Setup Guide


πŸ“‹ Overview

SelfWise is a modern, enterprise-grade Library Management System built with a full-stack Java and Angular architecture. It provides a complete solution for managing library operations including book catalog management, user checkout tracking, fine management, and comprehensive reporting.

The system implements robust role-based access control (RBAC) with separate workflows for Administrators and Users, ensuring secure and efficient library operations with RESTful API design patterns and scalable database architecture.


✨ Key Features

πŸ” Admin Features

  • βœ… Add/Update/Delete Books: Full CRUD operations on book catalog with validation
  • βœ… Manage Book Quantity: Real-time inventory management with automatic stock tracking
  • βœ… Manage Checkouts: Complete oversight of all book issuances and returns
  • βœ… User Management: Create, update, and manage user accounts and roles
  • βœ… Fine Management: Track and manage user fines for overdue books
  • βœ… Advanced Reporting: Generate insights on book usage, user activity, and overdue reports
  • βœ… Catalog Dashboard: Comprehensive view of inventory status and analytics

πŸ‘€ User Features

  • βœ… Browse Library: View all available books with advanced filtering and search
  • βœ… Search Books: Search by title, author, genre, publication year, and year range
  • βœ… Issue Books: Request and checkout books with automated quantity management
  • βœ… View Issued Books: Track personal checkout history and due dates
  • βœ… Return Books: Return books with automatic fine calculation for overdue items
  • βœ… Profile Management: Update personal information and view account details
  • βœ… Genre Grouping: Browse books organized by genre categories

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Frontend (Angular)                        β”‚
β”‚  - Responsive UI with role-based dashboards                 β”‚
β”‚  - Real-time data binding and validation                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ HTTP/REST
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               API Gateway (Spring Boot)                      β”‚
β”‚  - RESTful endpoints with OpenAPI documentation             β”‚
β”‚  - JWT Authentication & Authorization                       β”‚
β”‚  - CORS enabled for cross-origin requests                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ ORM (JPA)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Database Layer (MySQL 8.0)                          β”‚
β”‚  - Normalized schema with proper indexing                   β”‚
β”‚  - Foreign key relationships & constraints                  β”‚
β”‚  - Transaction support for data integrity                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Technologies & Stack

Component Technology Version
Backend Framework Spring Boot 3.4.2
Language Java 17 (LTS)
Database MySQL 8.0+
ORM JPA/Hibernate Latest
Frontend Angular Latest
Build Tool Maven 3.8+
Authentication JWT + Spring Security -
API Documentation Swagger/OpenAPI 3.0
Validation Jakarta Validation -
Logging SLF4J + Logback -

πŸ“Š API Documentation

Core Endpoints

Book Management

  • POST /api/books - Add new book
  • GET /api/books - Get all books with filtering
  • GET /api/books/{id} - Get book by ID
  • PUT /api/books/{id} - Update book details
  • DELETE /api/books/{id} - Delete book

User Management

  • POST /api/auth/signup - User registration
  • POST /api/auth/login - User login
  • PUT /api/users/{id} - Update user profile
  • GET /api/users - Get all users (admin only)

Book Checkout

  • POST /api/checkOut/issue/{userId}/{bookId}/{quantity} - Issue book to user
  • GET /api/checkOut/getAllIssuedBook - Get all issued books
  • GET /api/checkOut/issuedBooks/user/{userId} - Get user's issued books
  • PUT /api/checkOut/returnBook/{userId}/{bookId} - Return book

Fine Management

  • GET /api/fines/user/{userId} - Get user fines
  • POST /api/fines - Calculate and create fines

Reports

  • GET /api/reports/books-issued - Issued books report
  • GET /api/reports/overdue-books - Overdue books report
  • GET /api/reports/user-activity - User activity analytics

πŸ“Š API Documentation Screenshots

Swagger/OpenAPI Documentation

API Documentation 1 API Documentation 2 API Documentation 3 API Documentation 4 API Documentation 5

πŸš€ Installation & Setup

Prerequisites

  • Java 17 (JDK)
  • MySQL 8.0+
  • Node.js 16+ & npm
  • Maven 3.8+

Backend Setup

# 1. Navigate to server directory
cd selfwise/server

# 2. Configure database in application.properties
# Update spring.datasource.url, username, password

# 3. Build project
mvn clean install

# 4. Run application
java -jar target/SelfWise-LibraryManagementSystem-1.0.0.jar

# Server runs on http://localhost:8080

Frontend Setup

# 1. Navigate to client directory
cd selfwise/client

# 2. Install dependencies
npm install

# 3. Start development server
ng serve

# Frontend runs on http://localhost:4200

Database Setup

-- Create database
CREATE DATABASE library_management;
USE library_management;

-- Tables will be auto-created by Hibernate (Spring Boot)
-- Set spring.jpa.hibernate.ddl-auto=update in application.properties

πŸ”’ Security Features

  • βœ… JWT-based Authentication: Secure token-based user sessions
  • βœ… Role-Based Authorization: ADMIN and USER roles with proper access controls
  • βœ… Password Hashing: BCrypt encoding for secure password storage
  • βœ… CORS Configuration: Configured cross-origin resource sharing
  • βœ… Input Validation: DTO validation with Jakarta Validation annotations
  • βœ… Exception Handling: Centralized exception handling with meaningful error messages

πŸ“ˆ Performance Optimizations

  • Database indexing on frequently queried fields
  • JPA query optimization with proper fetching strategies
  • Pagination support for large datasets
  • Caching mechanisms for catalog data
  • Connection pooling with HikariCP

🎨 UI Preview

Home Page

screencapture-localhost-4200-home-2026-03-06-02_15_38

Users Management

screencapture-localhost-4200-users-2026-03-06-02_23_38

Books Catalog

screencapture-localhost-4200-catalog-2026-03-06-02_25_05

Book Inventory

screencapture-localhost-4200-books-2026-03-06-02_24_07

Checkout Management

screencapture-localhost-4200-checkout-2026-03-06-02_26_35

Reports & Analytics

screencapture-localhost-4200-reports-2026-03-06-02_27_14

Fine Management

screencapture-localhost-4200-fines-2026-03-06-02_27_44

πŸ“ Database Schema

Key Tables

  • users: User accounts with roles
  • books: Book catalog with metadata
  • catalogs: Inventory tracking
  • checkout: Book issuance records
  • fines: Fine tracking and calculations
  • reports: User activity and analytics

🐳 Docker Support

# Build Docker image
docker build -t selfwise-library .

# Run container
docker run -p 8080:8080 \
  -e SPRING_DATASOURCE_URL=jdbc:mysql://host:3306/library \
  -e SPRING_DATASOURCE_USERNAME=root \
  -e SPRING_DATASOURCE_PASSWORD=password \
  selfwise-library

🎯 Future Enhancements

  • Email notifications for overdue books
  • SMS alerts for users
  • Advanced analytics with charts
  • Mobile app (React Native/Flutter)
  • Barcode scanning for book management
  • Payment integration for fines
  • Cloud deployment (AWS/Azure)
  • Microservices architecture refactoring

πŸ“„ License

This project is open source and available under the MIT License.


πŸ‘¨β€πŸ’» Developer

Built as a full-stack application demonstrating enterprise-level architecture, best practices, and production-ready code.

Skills Demonstrated:

  • Full-stack development (Java + Angular)
  • RESTful API design
  • Database design & optimization
  • Authentication & Authorization
  • Error handling & validation
  • Code organization & best practices
  • Security implementations

πŸ“ž Support

For questions or issues, please create an issue in the repository or contact the development team.


Last Updated: March 6, 2026 | Version: 1.0.0

About

πŸ“š Selfwise - Library Management System A Professional, Enterprise-Grade Library Management Platform

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Contributors

Languages