A Full-Stack Web Application for Library Management with Role-Based Access Control
Live Demo β’ API Docs β’ Tech Stack β’ Setup Guide
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.
- β 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
- β 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
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| 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 | - |
POST /api/books- Add new bookGET /api/books- Get all books with filteringGET /api/books/{id}- Get book by IDPUT /api/books/{id}- Update book detailsDELETE /api/books/{id}- Delete book
POST /api/auth/signup- User registrationPOST /api/auth/login- User loginPUT /api/users/{id}- Update user profileGET /api/users- Get all users (admin only)
POST /api/checkOut/issue/{userId}/{bookId}/{quantity}- Issue book to userGET /api/checkOut/getAllIssuedBook- Get all issued booksGET /api/checkOut/issuedBooks/user/{userId}- Get user's issued booksPUT /api/checkOut/returnBook/{userId}/{bookId}- Return book
GET /api/fines/user/{userId}- Get user finesPOST /api/fines- Calculate and create fines
GET /api/reports/books-issued- Issued books reportGET /api/reports/overdue-books- Overdue books reportGET /api/reports/user-activity- User activity analytics
- Java 17 (JDK)
- MySQL 8.0+
- Node.js 16+ & npm
- Maven 3.8+
# 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# 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-- 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- β 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
- 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
- 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
# 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- 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
This project is open source and available under the MIT License.
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
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