A desktop library management system built with Java Swing that automates core library operations including document management, reader management, borrowing/returning processes, search functionality, and reporting capabilities.
library-management-system/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/library/
│ │ │ ├── dao/ # Data Access Objects
│ │ │ ├── service/ # Business Logic Layer
│ │ │ ├── model/ # Entity Classes
│ │ │ ├── gui/ # Swing GUI Components
│ │ │ ├── util/ # Utility Classes
│ │ │ ├── exception/ # Custom Exceptions
│ │ │ └── LibraryManagementApplication.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── database.properties
│ │ └── logback.xml
│ └── test/
│ ├── java/
│ └── resources/
├── logs/ # Application logs
├── pom.xml # Maven configuration
└── README.md
- Java 11 - Programming language
- Maven - Build and dependency management
- Swing - GUI framework
- Oracle Database - Database (JDBC connectivity)
- SLF4J + Logback - Logging framework
- JUnit 5 - Unit testing
- Mockito - Mocking framework for tests
- Java 11 or higher
- Maven 3.6 or higher
- Oracle Database XE 21c or higher (for database connectivity)
- Clone the repository
- Navigate to the project directory
- Run Maven commands:
# Compile the project
mvn clean compile
# Run tests
mvn test
# Package the application
mvn clean package
# Run the application
mvn exec:java -Dexec.mainClass="com.library.LibraryManagementApplication"
Edit src/main/resources/database.properties
:
db.url=jdbc:oracle:thin:@localhost:1521:XE
db.username=your_username
db.password=your_password
db.driver=oracle.jdbc.OracleDriver
- Install Oracle Database XE 21c (or higher)
- Create Database User:
-- Connect as SYSTEM or SYS CREATE USER library_user IDENTIFIED BY library_password; GRANT CONNECT, RESOURCE, CREATE VIEW TO library_user; GRANT UNLIMITED TABLESPACE TO library_user;
- Initialize Database:
The application will automatically create tables and insert sample data on first run if
db.auto.create.tables=true
is set in the configuration.
Edit src/main/resources/application.properties
to customize:
- Application settings
- Business rules (borrowing limits, fine amounts)
- UI preferences
The application uses SLF4J with Logback for logging. Log files are created in the logs/
directory:
library-management.log
- General application logsdatabase.log
- Database operation logserrors.log
- Error-level logs only
This project is currently in the initial setup phase. The following components have been implemented:
✅ Task 1: Project Structure and Core Configuration
- Maven project structure
- Database connection configuration
- Logging configuration (SLF4J + Logback)
- Main application entry point
- Basic window framework
- Configuration management system
The following tasks are planned for implementation:
- Core data models and entities
- Database schema and connection management
- Data Access Layer (DAO pattern)
- Business Logic Layer (Service classes)
- Presentation Layer (Swing GUI)
- Error handling and validation
- Comprehensive test suite
- Configuration and deployment
This project is developed for educational purposes.