Professional JavaFX-based shop application (sample project)
Shop is a small example Java application demonstrating a modular JavaFX UI, simple DAO-based data access, and a MySQL-backed data store. It is intended as a learning/sample project for desktop Java applications using modern Java (Java 21) and the OpenJFX toolchain.
- Modular Java project with
module-info.java - JavaFX UI built with FXML views
- Simple DAOs for
Clothes,Accessories, andShoes - MySQL connector for persistent storage
- Java 21
- JavaFX (OpenJFX)
- Maven (wrapper included)
- MySQL (connector provided)
- JDK 21 installed and JAVA_HOME configured
- MySQL server (if using the database features)
Using the included Maven wrapper from the project root.
On Windows (PowerShell or CMD):
.\mvnw.cmd clean javafx:run
On macOS / Linux:
./mvnw clean javafx:run
To build a distributable artifact:
.\mvnw.cmd clean package
# or on macOS / Linux: ./mvnw clean package
Run unit tests:
.\mvnw.cmd test
This project includes a MySQL connector. Before running database features, update the connection settings in src/main/java/com/shop/shop/database/DatabaseConnector.java to match your MySQL instance (host, port, user, password, schema).
src/main/java— application sourcescom.shop.shop— main package and application entry (Main.java)com.shop.shop.controller— JavaFX controllerscom.shop.shop.dao— data access objectscom.shop.shop.database— database connectorcom.shop.shop.shopclass— domain model classes
src/main/resources/com/shop/shop— FXML views and CSS
Contributions are welcome. Please follow these steps:
- Fork the repository and create a feature branch.
- Implement changes and add tests where appropriate.
- Open a pull request with a clear description of your changes.
- The project targets Java 21; use a matching JDK when building or running.
- The
javafx-maven-pluginis configured forjavafx:runin thepom.xml.
This repository is provided as-is for educational purposes. For questions or feedback, open an issue or contact the maintainer.