📚 Bookstore Management System A complete, production-ready desktop application for managing bookstore operations with an intuitive Java Swing interface and MySQL database backend.
https://img.shields.io/badge/version-1.0.0-blue.svg https://img.shields.io/badge/Java-11%252B-orange.svg https://img.shields.io/badge/MySQL-8.0-green.svg https://img.shields.io/badge/license-MIT-green https://img.shields.io/badge/PRs-welcome-brightgreen.svg
📋 Table of Contents Features
Technology Stack
System Requirements
Installation Guide
Database Setup
Running the Application
Usage Guide
Screenshots
Project Structure
Contributing
License
Contact
✨ Features 🔐 User Authentication System Secure login/logout with password hashing
Role-based access control (Admin, Manager, Staff)
Session management
User profile management
📚 Inventory Management Complete CRUD operations for books
Real-time stock tracking
Low stock alerts
Barcode/ISBN scanning
Advanced search and filtering
💰 Point of Sale (POS) Intuitive sales interface
Barcode scanner integration
Shopping cart management
Discount application
Tax calculation
Multiple payment methods (Cash, Card, Online)
Digital receipt generation (PDF)
📊 Reports & Analytics Inventory valuation reports
Sales reports (daily, weekly, monthly, custom)
Best-selling books analysis
Low stock reports
Payment method analysis
Export to Excel and PDF
💾 Backup & Restore One-click database backup
Automated backup scheduling
Backup compression (ZIP)
Restore from any backup point
Backup rotation (keeps last 10 backups)
🎨 Modern UI/UX Clean, professional interface
Responsive design
Keyboard shortcuts
Status indicators
Real-time updates
🛠️ Technology Stack Frontend Java Swing (GUI Framework)
FlatLaf (Modern Look and Feel)
Custom UI Components
Backend Java 11+
JDBC (Database Connectivity)
MySQL 8.0
Libraries & Dependencies Library Version Purpose MySQL Connector 8.0.33 Database connectivity iText 7 7.2.5 PDF generation (receipts, reports) Apache POI 5.2.3 Excel export functionality ZXing 3.5.2 Barcode & QR code generation/scanning SLF4J 2.0.9 Logging framework Development Tools Eclipse IDE / VS Code
Gradle 7.0+ / Build path configuration
Git for version control
MySQL Workbench / phpMyAdmin
💻 System Requirements Minimum Requirements OS: Windows 7/8/10/11, macOS 10.15+, Linux (Ubuntu 18.04+)
Processor: Intel Core i3 or equivalent
RAM: 2 GB
Storage: 100 MB free space
Java: JDK 11 or higher
MySQL: MySQL 8.0 or higher
Screen Resolution: 1366x768 or higher
Recommended Requirements OS: Windows 11, macOS 12+, Ubuntu 20.04+
Processor: Intel Core i5 or equivalent
RAM: 4 GB or more
Storage: 500 MB free space
Java: JDK 17 LTS
MySQL: MySQL 8.0.33+
Screen Resolution: 1920x1080 or higher
📥 Installation Guide Option 1: Quick Start (Recommended) Windows
- Download the latest release: BookstoreApp-v1.0.0.zip
- Extract the zip file
- Double-click run.bat
- Login with default credentials (admin/admin123) Linux / macOS
- Download the latest release: BookstoreApp-v1.0.0.tar.gz
- tar -xzf BookstoreApp-v1.0.0.tar.gz
- cd BookstoreApp-v1.0.0
- chmod +x run.sh
- ./run.sh Option 2: Build from Source Prerequisites JDK 11+ MySQL 8.0+ Git Eclipse IDE or VS Code Step 1: Clone the Repository git clone https://github.com/yourusername/bookstore-management-system.git cd bookstore-management-system Step 2: Database Setup
mysql -u root -p
source database/bookstore_schema.sql
SHOW TABLES FROM bookstre; Step 3: Configure Database Connection Edit src/main/resources/application.properties: db.url=jdbc:mysql://localhost:3306/bookstre?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.username=root db.password=your_password_here Step 4: Build with Gradle
./gradlew clean build
gradlew.bat clean build Step 5: Run the Application
./gradlew run
java -jar build/libs/bookstore-app-1.0.0.jar Option 3: Eclipse IDE Setup Import Project
File → Import → Gradle → Existing Gradle Project
Select project root directory
Click Finish
Add MySQL Connector (if not using Gradle)
Download MySQL Connector JAR
Right-click project → Build Path → Add External Archives
Configure Run Configuration
Run → Run Configurations → Java Application
Main class: com.bookstore.Main
Apply → Run
Option 4: VS Code Setup Install Extensions
Extension Pack for Java
Gradle for Java
MySQL (optional)
Open Project
File → Open Folder → Select project
VS Code will automatically detect Gradle project
Run
Press F5 or click Run button
🗄️ Database Setup Automated Setup Script Windows (setup.bat) @echo off echo Setting up Bookstore Database... mysql -u root -p < database/bookstore_schema.sql echo Database setup complete! pause Linux/macOS (setup.sh) #!/bin/bash echo "Setting up Bookstore Database..." mysql -u root -p < database/bookstore_schema.sql echo "Database setup complete!" Manual Setup Execute the SQL script in MySQL Workbench or phpMyAdmin: -- File: database/bookstore_schema.sql -- This will create: -- - Database: bookstre -- - Tables: users, books, sales, sale_items, inventory_logs -- - Default admin user (admin/admin123) Default Users Username Password Role admin admin123 ADMIN manager manager123 MANAGER staff staff123 STAFF 🚀 Running the Application Method 1: Executable JAR java -jar bookstore-app-1.0.0.jar Method 2: Gradle Wrapper
./gradlew run
gradlew.bat run
Method 3: Direct Class Execution
java -cp "lib/*:src/main/java" com.bookstore.Main
Method 4: Create Native Executable (using jpackage)
jpackage --input build/libs/
--name BookstoreApp
--main-jar bookstore-app-1.0.0.jar
--main-class com.bookstore.Main
--type exe/msi/dmg/pkg
--icon src/main/resources/icon.ico
📖 Usage Guide
- Login Launch the application
Enter your credentials
Default: admin / admin123
- Dashboard View quick statistics
Monitor low stock alerts
Check today's sales
- Inventory Management Add Book: Fill the form and click "Add Book"
Edit Book: Select book from table, edit details, click "Update"
Delete Book: Select book, click "Delete"
Search: Enter title/author/ISBN in search box
- Point of Sale Scan Barcode: Enter ISBN in scanner field
Add to Cart: Double-click book or enter quantity
Remove Items: Select item and click "Remove"
Apply Discount: Enter discount percentage
Checkout: Select payment method, click "Complete Sale"
Print Receipt: Automatically generated as PDF
- Reports Inventory Report: View current stock levels
Sales Report: Filter by date range
Best Sellers: Top selling books
Export: Click Excel or PDF button
- Backup & Restore Backup: Click "Create Backup"
Restore: Select backup file, click "Restore"
Auto-Backup: Configurable in settings
📁 Project Structure bookstore-management-system/ │ ├── 📁 .github/ # GitHub configuration │ └── workflows/ # CI/CD pipelines │ ├── build.yml # Build workflow │ └── release.yml # Release workflow │ ├── 📁 src/ │ ├── 📁 main/ │ │ ├── 📁 java/ │ │ │ └── 📁 com/ │ │ │ └── 📁 bookstore/ │ │ │ ├── Main.java │ │ │ ├── 📁 auth/ │ │ │ ├── 📁 db/ │ │ │ ├── 📁 model/ │ │ │ ├── 📁 dao/ │ │ │ ├── 📁 gui/ │ │ │ └── 📁 utils/ │ │ └── 📁 resources/ │ │ ├── application.properties │ │ └── 📁 icons/ │ └── 📁 test/ │ └── 📁 java/ │ ├── 📁 database/ │ └── bookstore_schema.sql # Database schema │ ├── 📁 screenshots/ # Documentation images │ ├── 📁 lib/ # External JARs (optional) │ ├── 📁 config/ # Configuration files │ ├── 📁 scripts/ # Utility scripts │ ├── setup.bat │ ├── setup.sh │ ├── run.bat │ └── run.sh │ ├── 📄 build.gradle # Gradle build file ├── 📄 settings.gradle # Gradle settings ├── 📄 .gitignore # Git ignore rules ├── 📄 LICENSE # MIT License ├── 📄 README.md # This file ├── 📄 CHANGELOG.md # Version history └── 📄 CONTRIBUTING.md # Contribution guidelines 🤝 Contributing We welcome contributions! Please see our Contributing Guidelines.
Development Workflow Fork the repository Create a feature branch git checkout -b feature/amazing-feature