Tests License Java 17 Ant Tomcat 10.1 MSSQL
A Library Management System (LMS) built with Java Servlets, JSP, and Microsoft SQL Server, following the MVC pattern. This project demonstrates concepts like dependency injection, MVC architecture, singleton , simple factory patterns , lazy and eager initialization, SOLID principles such as SRP DIP , RBAC authentication with session and autholization with filter , including integration testing as well as CI automation testing via GitHub Actions
β¨ Features
π€ User Features
π Authentication & Account Management
- Secure user registration and login with BCrypt password hashing
- Password change
- Forgot password with email recovery
π Book Discovery & Management
- Search books by title
- Filter books by category (Action, English, Romance, Skill, Technology)
- View detailed book information
π Borrowing System
- Borrow available books
- Extend borrowing period
- Return books
- View borrowing and return history
β€οΈ Favorites
- Add books to personal favorites list
- Quick access to favorite books
π€ Profile Management
- Update personal information (name, email, avatar)
- View personal dashboard with statistics
- Track total borrowed and returned books
π‘οΈ Admin Features
π Dashboard & Analytics
- Online user count
- Total books statistics
- Borrowed books by category
- Latest activity logs (login, profile updates, borrowing, returns)
π Book Management (CRUD)
- Add new books
- Edit book details
- Delete books
- Search books
- View all books
π₯ User Management
- View all registered users
- Monitor user status (active/inactive)
- View user borrowing records
- Delete user accounts
- Force logout individual users
- Logout all users
π Access Control
- RBAC (admin/user)
- Enhance Security Page JSP
| Layer | Technology / Library | Version / Notes |
|---|---|---|
| Frontend | HTML5, CSS3, JSP | JSP 3.0 (Jakarta EE 10) |
| Backend | Java Servlet (Jakarta Servlet API) | 6.0 (EE 10) |
| Database | Microsoft SQL Server : (mssql-jdbc-13.2.0.jre11.jar) | JDBC driver |
| Version Control | Git + GitHub | QuαΊ£n lΓ½ mΓ£ nguα»n |
| CI/CD | GitHub Actions (Continuous Integration) | Tα»± Δα»ng hΓ³a build vΓ test Java project |
| Mail Service | Jakarta Mail (jakarta.mail-2.0.1.jar), Jakarta Activation (jakarta.activation-api-2.1.3.jar) |
Gα»i email qua SMTP |
| Security | BCrypt (jbcrypt-0.4.jar) |
MΓ£ hΓ³a mαΊt khαΊ©u ngΖ°α»i dΓΉng |
| Logging | SLF4J (slf4j-api-2.0.17.jar), Logback (logback-core-1.5.19.jar, logback-classic-1.5.19.jar) |
Ghi log hα» thα»ng |
| Testing | JUnit (junit-4.13.2.jar), Hamcrest (hamcrest-core-1.3.jar) |
Integration testing |
| In-Memory DB (Testing) | H2 Database (h2-1.3.176.jar) |
Database cho testing |
| JSP Tag Library | JSTL (jakarta.servlet.jsp.jstl-3.0.1.jar) |
ThΖ° viα»n thαΊ» JSP chuαΊ©n |
- β Java JDK 17 or higher
- ποΈ Microsoft SQL Server
- π± Apache Tomcat 10.1.44
- π§ Apache NetBeans 17 (recommended)
LibraryManagement/
β
βββ π Web Pages/
β βββ π META-INF/
β βββ π WEB-INF/
β β βββ π lib/
β β βββ π views/
β β βββ π admin/
β β βββ π book/
β β βββ π borrowing/
β β βββ π components/
β β βββ π favorite/
β β βββ π user/
β β βββ π homepage.jsp
β β
β βββ π resources/
β βββ π css/
β βββ π images/
β
βββ π Source Packages/
β βββ π com/
β βββ π library/
β βββ π controller/
β β βββ π admin/
β β βββ π book/
β β βββ π borrowing/
β β βββ π favorite/
β β βββ π filter/
β β βββ π user/
β β
β βββ π dao/
β βββ π enums/
β βββ π exception/
β βββ π factory/
β βββ π model/
β β βββ π dto/
β β βββ π entity/
β βββ π service/
β βββ π util/
β
βββ π Test Packages/
βββ π com/
βββ π library/
βββ π dao/
βββ π util/
βββ π Library_Management_v7.sql
This project uses GitHub Actions for automated testing:
- β Automated unit tests on every push
- π Code quality checks
- π¦ Build verification
The project implements several design patterns to ensure clean, maintainable, and scalable code:
- π Factory Pattern - Centralized object creation (DaoFactory, ServiceFactory)
- π― MVC Pattern - Separation of Model, View, and Controller
- π¦ DTO Pattern - Data transfer between layers
- π DAO Pattern - Abstract database operations
- π‘οΈ Singleton Pattern - Single instance management (DBConnection, SessionTracker)
- π Service Layer Pattern - Business logic separation
- π Exception Hierarchy Pattern - Structured error handling
This project is licensed under the terms specified in the LICENSE file.