A modern Java-based Library Management System built using Object-Oriented Programming (OOP) principles. The system provides both a native JavaFX graphical interface and a console-based interface for managing books, members, borrowing, returning, and library records.
The project is designed as an academic and portfolio project with a clean service-based architecture, real file persistence, validation, reusable JavaFX UI components, an animated login experience, Light/Dark theme support, and ready-to-install native desktop installers for macOS and Windows.
You don't need Java, Maven, or any developer tools to use this app — just download the installer for your operating system.
- Go to the Actions tab of this repository.
- Click the most recent run with a green checkmark ✅.
- Scroll down to the Artifacts section and download:
mac-dmg→ for macOSwindows-msi→ for Windows
- Unzip the download, then run the installer inside (
.dmgon macOS,.msion Windows).
First-run warning is normal: since this app isn't signed with a paid Apple/Microsoft developer certificate, your OS will warn about an "unidentified developer" (macOS) or show a SmartScreen prompt (Windows) the first time you open it.
- macOS: right-click the app → Open → confirm Open.
- Windows: click More info → Run anyway.
This only needs to be done once per machine.
On first launch you'll land on the login screen. Use:
Username: admin (or admin@smartlibrary.edu)
Password: admin123
Each user's library data (books, members, borrow records) is stored locally on their own machine and is private to them — nothing is shared between installs.
- Animated login screen with a friendly robot mascot
- Three mascot states, each with its own animation:
- Idle — subtle looping bounce while waiting for input
- Success — arms-up celebration with confetti and a "Welcome back!" message on correct credentials
- Error — a shake and frown with an "Oops, that's not right!" message on incorrect credentials
- Real credential validation (incorrect credentials are rejected, not just cosmetically)
- "Remember me" option
- Logout from the avatar menu (top-right header), with a confirmation dialog
- Logging out returns to the login screen without touching any saved library data
- Total Books overview
- Total Members overview
- Currently Borrowed books
- Overdue books
- Recent borrowing activity
- Borrowing activity visualization
- Overdue record overview
- Real-time statistics from persisted data
- Add books
- Update books
- Delete books
- Search books
- View book information
- Track total copies
- Track available copies
- Automatic availability updates
- Book status indicators
- Validation for book information
- Protection against deleting books with active loans
- Add members
- Update members
- Delete members
- Search members
- View member information
- Track member borrowing activity
- Member status management
- Protection against deleting members with active loans
- Borrow books
- Return books
- Track borrow date
- Track due date
- Track return date
- Prevent duplicate active borrowing
- Automatic book quantity updates
- Automatic availability restoration after return
- Overdue detection
- Validation for invalid borrowing/return operations
- Responsive layout — side-by-side panels on wide windows, stacked with scrolling on narrower ones
- View all borrowing records
- Search records
- Filter by status
- Track:
- Record ID
- Member
- Book
- Borrow Date
- Due Date
- Return Date
- Status
- Status support:
- Borrowed
- Returned
- Overdue
- Professional desktop interface
- Figma-inspired visual design (see
design/folder for reference screenshots) - Persistent sidebar navigation
- Dashboard layout
- Modern cards and tables
- Reusable UI components
- Modal dialogs for forms
- Search and filtering controls
- Status badges
- Success/error feedback
- Responsive layout behavior
- Clean typography and spacing
- Light theme
- Dark theme
- Theme switching
- Theme-aware:
- Text
- Buttons
- Forms
- Tables
- Dialogs
- Status badges
- Navigation
- Login screen
- Improved contrast and readability in both themes
Every service (BookService, MemberService, BorrowService) loads its data from disk on startup and saves after every add, update, delete, borrow, and return — not just on exit.
Persistent data includes:
- Books
- Members
- Borrow Records
Data remains available after fully closing and relaunching the application, and survives app updates since it's stored outside the application's own install folder (see Data Storage below).
The project also maintains a console-based interface for library operations.
The console application uses the same service layer and business logic as the JavaFX application.
- Packaged with
jlink+jpackage(via thejpackage-maven-plugin) — bundles a private Java runtime, so end users don't need Java installed. - Built automatically for both macOS (
.dmg) and Windows (.msi) on every push tomain, via GitHub Actions (.github/workflows/build-installers.yml).
Smart-Library-Management-System/
│
├── .github/
│ └── workflows/
│ └── build-installers.yml # CI: builds macOS + Windows installers
│
├── design/
│ └── *.jpeg # Figma design reference screenshots
│
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── model/
│ │ │ │ ├── Book.java
│ │ │ │ ├── Member.java
│ │ │ │ └── BorrowRecord.java
│ │ │ │
│ │ │ ├── service/
│ │ │ │ ├── BookService.java
│ │ │ │ ├── MemberService.java
│ │ │ │ └── BorrowService.java
│ │ │ │
│ │ │ ├── utils/
│ │ │ │ ├── FileManager.java
│ │ │ │ ├── CsvFormat.java
│ │ │ │ └── InputValidator.java
│ │ │ │
│ │ │ ├── ui/
│ │ │ │ ├── MainLayout.java
│ │ │ │ ├── LoginView.java
│ │ │ │ ├── DashboardView.java
│ │ │ │ ├── BorrowView.java
│ │ │ │ ├── BorrowRecordView.java
│ │ │ │ └── ...
│ │ │ │
│ │ │ ├── Main.java
│ │ │ └── ConsoleMain.java
│ │ │
│ │ └── resources/
│ │ └── css/
│ │ ├── style.css
│ │ └── login.css
│ │
│ └── test/
│ └── java/
│ └── LibraryServiceTest.java
│
├── pom.xml
├── .gitignore
├── LICENSE
└── README.md
Contains the core domain objects:
BookMemberBorrowRecord
These classes represent the main entities of the library system.
Contains the application's business logic:
BookServiceMemberServiceBorrowService
The service layer is responsible for:
- CRUD operations
- Borrowing rules
- Return processing
- Validation
- Quantity management
- Overdue calculation
- Business rule enforcement
- Loading data from disk on startup and saving after every mutation
The JavaFX UI does not duplicate this business logic.
Provides shared functionality:
FileManagerCsvFormatInputValidator
Responsibilities include:
- Resolving the per-user data directory and file reading/writing
- Serializing/deserializing records to and from the on-disk format
- Input validation
- Safe handling of stored data
The JavaFX interface is organized into reusable views and layouts.
Major UI components include:
LoginView— animated authentication screen, entry point of the appMainLayoutDashboardView- Books View
- Members View
- Borrow & Return View
- Borrow Records View
- Settings View
The UI communicates with the service layer to display and update real application data.
App Launch
│
▼
LoginView (Idle animation)
│
├── Correct credentials → Success animation → MainLayout (Dashboard)
└── Incorrect credentials → Error animation → stays on LoginView
Avatar Menu → Log out
│
▼
Confirmation Dialog
│
├── Cancel → stays in app
└── Yes, log out → returns to LoginView (library data untouched)
User
│
▼
JavaFX / Console Interface
│
▼
Service Layer
│
├── Validate Request
├── Check Member
├── Check Book
├── Check Availability
└── Create Borrow Record
│
▼
File Persistence
Return Request
│
▼
BorrowService
│
├── Validate Record
├── Update Return Date
├── Update Record Status
└── Restore Book Availability
│
▼
File Persistence
Each book maintains:
Total Copies
Available Copies
The system ensures that available copies do not exceed total copies.
A book cannot be borrowed when:
Available Copies <= 0
A member cannot create an invalid duplicate active borrowing record for the same book.
When a book is returned:
Available Copies += 1
The corresponding borrow record is updated with:
Return Date
Status
Books or members with active borrowing relationships cannot be deleted.
This prevents invalid references in the library records.
A borrowing record can be identified as overdue based on its due date and return status.
The dashboard and borrow records use this information to display overdue records.
The JavaFX interface follows a modern desktop application design inspired by the project's Figma reference (see design/ for the source screenshots).
Login (animated, entry point)
│
▼
Dashboard
Books
Members
Borrow & Return
Borrow Records
Settings
- Animated login screen with mascot feedback
- Persistent sidebar
- Page headers
- Cards
- Tables
- Search fields
- Filters
- Modal forms
- Confirmation dialogs
- Status badges
- Notification feedback
- Light/Dark themes
The application supports two main visual themes.
Designed with:
- White cards
- Light application background
- Dark readable text
- Subtle borders
- Purple primary accent
Designed with:
- Dark application background
- Dark cards
- Light readable text
- High-contrast inputs
- Consistent accent colors
The UI components, including the login screen, are styled through JavaFX CSS.
| Technology | Purpose |
|---|---|
| Java 26 | Programming Language |
| JavaFX | Desktop GUI |
| Maven | Build & Dependency Management |
| JUnit | Testing |
| JavaFX CSS | UI Styling |
| Local Text Files | Data Persistence |
| jlink / jpackage | Native installer packaging |
| GitHub Actions | CI — automated installer builds |
| IntelliJ IDEA | Development Environment |
| Git & GitHub | Version Control |
None — download the installer from the Download & Install section above. The installer bundles its own Java runtime.
- JDK 26
- Maven
- IntelliJ IDEA (recommended)
- JavaFX dependencies configured through Maven
Verify Java:
java -versionVerify Maven:
mvn -versiongit clone https://github.com/tawsiftalha2005/Smart-Library-Management-System.gitcd Smart-Library-Management-Systemmvn clean verifymvn javafx:runNote: always run the app via
mvn javafx:run(or the packaged installer), not IntelliJ's own Run button — the IDE's default Run configuration doesn't supply the JavaFX module-path VM options that the Maven plugin adds automatically, and will fail with "JavaFX runtime components are missing."
mvn clean package jpackage:jpackage "-Djpackage.type=DMG"Use MSI or EXE instead of DMG on Windows. The installer is produced under target/dist/. Note that you can only build a macOS installer on macOS, and a Windows installer on Windows — the GitHub Actions workflow builds both automatically in the cloud regardless of what OS you're on.
- Open the project in IntelliJ IDEA.
- Make sure JDK 26 is selected.
- Allow Maven to load the dependencies.
- Reload the Maven project.
- Run the JavaFX application via the Maven
javafx:rungoal (not the IDE's green Run button — see the note above).
The project uses the Maven standard directory structure:
src/main/java
src/main/resources
src/test/java
The project also includes a console-based entry point:
ConsoleMain.java
The console interface uses the same service layer and persistence system as the JavaFX application.
This allows the project to demonstrate both:
- Console-based OOP application design
- GUI-based desktop application design
Unit tests are included for the main library service workflows.
Run:
mvn clean testFor a complete Maven verification:
mvn clean verifyThe tests cover important scenarios such as:
- Book operations
- Member operations
- Borrowing
- Duplicate borrowing prevention
- Returning
- Quantity restoration
- Persistence/reloading
Data is not stored inside the project/installation folder — it's stored per-user, in a standard OS-specific app-data location, so the installed app works correctly for any user without needing write access to its own install directory:
| OS | Location |
|---|---|
| macOS | ~/Library/Application Support/SmartLibrary/ |
| Windows | %APPDATA%\SmartLibrary\ |
| Linux | ~/.smartlibrary/ |
Each location contains:
books.txt
members.txt
borrow_records.txt
This approach keeps the project lightweight, avoids requiring an external database, and gives every user their own private, isolated data.
Possible future improvements include:
- Database integration using MySQL/PostgreSQL
- Multi-user accounts and role management (currently a single demo admin account)
- Admin and librarian roles
- Advanced reporting
- PDF report generation
- Email notifications
- Fine calculation
- Book cover images
- Advanced filtering
- Pagination for large datasets
- Cloud-based data storage
- Automated backup and restore
- Improved analytics dashboard
- Code-signed/notarized installers to remove the first-run OS warnings
This project demonstrates practical application of:
- Object-Oriented Programming
- Encapsulation
- Abstraction
- Inheritance
- Polymorphism
- Composition
- Separation of concerns
- Service-layer architecture
- File handling
- Data validation
- Exception handling
- JavaFX GUI development
- JavaFX CSS styling and animation (Timeline/Transition-based mascot states)
- Maven project management
- Unit testing
- Git & GitHub workflow
- CI/CD with GitHub Actions
- Cross-platform native packaging
Md. Wahid Tawsif Talha
B.Sc. in Software Engineering
Green University of Bangladesh
GitHub:
https://github.com/tawsiftalha2005
This project is licensed under the MIT License.
See the LICENSE file for details.