A comprehensive JavaFX desktop application for managing your personal book collection with SQLite storage and optional Amazon API integration.
- Complete Book Management: Track title, subtitle, authors, ISBN, publisher, year, category, shelf location, and more
- Multi-Author Support: Books can have multiple authors
- Categories & Tags: Organize books with categories and custom tags
- Cover Images: Upload local cover images or retrieve from Amazon
- Read Status & Ratings: Track which books you've read and rate them (0-5 stars)
- Advanced Search: Search by title, author, or ISBN
- Filter Options: Filter by read status, category, and more
- Amazon API Integration: Lookup ISBN and fetch cover images (when configured)
- SQLite Database: Lightweight, file-based storage with no server required
- Java 17: Modern Java features
- JavaFX 21: Rich desktop UI
- SQLite: Embedded database
- Maven: Build and dependency management
- SLF4J + Logback: Comprehensive logging
- OkHttp: HTTP client for API calls
- GSON: JSON processing
HomeLibrary/
├── src/main/java/com/homelibrary/
│ ├── model/ # Data models (Book, Author, Category)
│ ├── dao/ # Database access layer
│ ├── service/ # Business logic layer
│ └── ui/ # JavaFX UI components
├── src/main/resources/ # Configuration files
├── covers/ # Cover image storage (created at runtime)
├── logs/ # Application logs (created at runtime)
├── pom.xml # Maven configuration
└── README.md # This file
- Java Development Kit (JDK) 17 or higher
- Maven 3.6+ (or use Maven wrapper)
- JavaFX 21 (automatically downloaded by Maven)
cd HomeLibrarymvn clean packageThis will:
- Download all dependencies
- Compile the code
- Run tests
- Create an executable JAR
Option A: Using Launcher Scripts (Recommended)
For Linux/Mac:
./run.shFor Windows:
run.batThe launcher scripts will:
- Check Java installation and version
- Automatically build if needed
- Configure JavaFX module path
- Launch the application
Option B: Using Maven (Development)
mvn javafx:runOption C: Using Java Directly
Linux/Mac:
java --module-path target/lib/javafx-controls-21.0.1.jar:target/lib/javafx-graphics-21.0.1.jar:target/lib/javafx-base-21.0.1.jar:target/lib/javafx-fxml-21.0.1.jar \
--add-modules javafx.controls,javafx.fxml \
-jar target/home-library-1.0.0.jarWindows:
java --module-path target\lib\javafx-controls-21.0.1.jar;target\lib\javafx-graphics-21.0.1.jar;target\lib\javafx-base-21.0.1.jar;target\lib\javafx-fxml-21.0.1.jar ^
--add-modules javafx.controls,javafx.fxml ^
-jar target\home-library-1.0.0.jarOn first run, the application will:
- Create
homelibrary.dbSQLite database file - Initialize the database schema
- Create
config.propertiesconfiguration file - Create
covers/directory for book cover images - Create
logs/directory for application logs
The config.properties file is created automatically with default values:
# Amazon API Configuration (optional)
amazon.api.access.key=
amazon.api.secret.key=
amazon.api.associate.tag=
amazon.api.region=us-east-1
# Application Settings
covers.directory=covers
database.file=homelibrary.dbTo enable Amazon API features:
- Sign up for Amazon Product Advertising API
- Get your Access Key, Secret Key, and Associate Tag
- Edit
config.propertiesand add your credentials - Restart the application
Note: The current Amazon API implementation provides a foundation but requires full AWS Signature Version 4 authentication for production use.
- Click "Add Book" button or use menu: Book → Add Book
- Fill in book details (only Title is required)
- Optionally upload a cover image
- Click "Save"
- Select a book in the table
- Double-click or click "Edit Book"
- Modify details
- Click "Save"
- Select a book in the table
- Click "Delete Book"
- Confirm deletion
- Use the search box at the top to search by title, author, or ISBN
- Results update as you type
- Clear the search box to show all books
- Use the filter dropdown to show:
- All Books
- Read Books
- Unread Books
Upload Local Image:
- In the book form, click "Upload Image"
- Select an image file (PNG, JPG, JPEG, GIF)
- Image is automatically copied to the covers directory
Search Amazon (when configured):
- Enter book title (and optionally author)
- Click "Search Amazon"
- Review results and import data
Categories:
- Select from existing categories or type a new one
- Categories are created automatically when you save
Tags:
- Enter comma-separated tags (e.g., "fiction, sci-fi, classic")
Shelf Location:
- Track physical location (e.g., "Living Room A3")
The SQLite database consists of four main tables:
Main book information including title, ISBN, publisher, year, format, language, notes, read status, rating, and cover image path.
Author information (ID and name).
Book categories (ID and name).
Many-to-many relationship between books and authors.
Model Layer (model/)
- Plain Java objects representing domain entities
Book.java: Complete book informationAuthor.java: Author detailsCategory.java: Category details
DAO Layer (dao/)
- Database access using JDBC
Database.java: Connection management and schema initializationBookDao.java: CRUD operations for booksAuthorDao.java: CRUD operations for authorsCategoryDao.java: CRUD operations for categories
Service Layer (service/)
- Business logic and orchestration
BookService.java: Book management operationsConfigService.java: Configuration managementAmazonApiService.java: Amazon API integration (foundation)
UI Layer (ui/)
- JavaFX components
MainApp.java: Application entry point and main windowBookListView.java: Book table and searchBookFormView.java: Add/edit book dialog
# Clean build
mvn clean
# Compile only
mvn compile
# Run tests
mvn test
# Package JAR
mvn package
# Skip tests during build
mvn package -DskipTestsIntelliJ IDEA:
- Open → Select
pom.xml - Enable auto-import for Maven
- Run configuration: Main class =
com.homelibrary.ui.MainApp - Add VM options:
--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml
Eclipse:
- File → Import → Maven → Existing Maven Projects
- Select project directory
- Run As → Java Application → MainApp
VS Code:
- Install Java Extension Pack
- Install Maven for Java extension
- Open folder
- Run from Run menu
Application logs are written to:
- Console: INFO level and above
- File:
logs/homelibrary.log(DEBUG level) - Rolling: Daily rotation, keeps 30 days
Log levels can be adjusted in src/main/resources/logback.xml.
When sharing the application with others who don't have Maven installed, provide:
- The entire
target/directory (contains JAR + dependencies) - The
run.sh(Linux/Mac) and/orrun.bat(Windows) launcher scripts - This README file
Users only need Java 17+ installed. They can run the application using the launcher scripts.
Easy Method - Automated Script:
./create-release.shThis creates:
release/home-library-v1.0.0.zip(for Windows users)release/home-library-v1.0.0.tar.gz(for Linux/Mac users)
Both archives contain:
- The runnable JAR
- All dependencies
- Launcher scripts (run.sh and run.bat)
- README and installation instructions
Manual Method:
# Build the application
mvn clean package
# Create a distribution archive
cd target
zip -r ../home-library-v1.0.0.zip home-library-1.0.0.jar lib/
cd ..
# Add launcher scripts to the archive
zip home-library-v1.0.0.zip run.sh run.bat README.mdUsers can then:
- Download and extract the archive
- Run
./run.sh(Linux/Mac) orrun.bat(Windows) - No Maven required - only Java 17+!
If you see "Error: JavaFX runtime components are missing":
# Use the launcher script
./run.sh # or run.bat on Windows
# Or use Maven to run
mvn javafx:runIf database is locked:
- Close all instances of the application
- Delete
homelibrary.db-journalif it exists - Restart application
- Check that
covers/directory exists - Verify file permissions
- Check logs for error messages
- Verify credentials in
config.properties - Check internet connection
- Note: Full PA-API 5.0 implementation requires AWS signing
Potential features for future versions:
- Barcode scanning via webcam
- Import from Goodreads/LibraryThing
- Reading progress tracking
- JSON/CSV export
- Cloud sync support
- Advanced reporting
- Book lending tracker
- Full Amazon PA-API 5.0 integration
This project is created for personal use. Feel free to modify and extend as needed.
For issues or questions:
- Check the logs in
logs/homelibrary.log - Review the code documentation
- Examine the specification in
home_library_spec.md
v1.0.0 - Initial Release
- Complete book management
- SQLite database
- JavaFX UI
- Cover image support
- Search and filter
- Amazon API foundation