Inventory Management System (JavaFX & GoF Design Patterns)
Enterprise desktop inventory and supplier management application built in Java 19 and JavaFX 17, demonstrating strict object-oriented architecture and Gang of Four (GoF) structural and creational design patterns.
graph TD
UI[JavaFX UI Controller] --> Proxy[Authentication & Access Proxy]
Proxy --> Service[Inventory Management Service]
Service --> Singleton[Inventory Catalog Singleton]
Service --> Factory[Product & Supplier Factory]
Service --> Adapter[Legacy Item Adapter]
Service --> Prototype[Product Prototype Cloner]
Singleton --> Storage[(Catalog State)]Architectural Overview
This system coordinates inventory tracking, product cataloging, supplier workflows, and stock auditing. Business logic is organized through modular packages implementing standard Gang of Four design patterns to enforce loose coupling and maintainability:
- Factory Pattern (
factory.products,factory.suppliers): Encapsulates entity instantiation logic, decoupling caller code from concrete product and vendor classes. - Proxy Pattern (
proxy.AuthenticationProxy): Intercepts privileged operations, validating user roles and auditing mutations before delegating to target services. - Singleton Pattern (
singleton.InventoryCatalog): Enforces single-instance integrity for global product registries and stock quantity indices. - Adapter Pattern (
adapter.LegacyItemAdapter): Translates legacy SKU data structures into standardized inventory representations. - Prototype Pattern (
prototype.ProductCloner): Enables rapid cloning of complex product records with pre-configured category specifications.
Technology Stack
- Runtime: Java 19 (LTS build target)
- GUI Framework: JavaFX 17 (
javafx-controls,javafx-graphics) - Build System: Apache Maven 3.8+
- Architecture: Model-View-Controller (MVC) with GoF Pattern Layering
Project Structure
inventory-management-system/
├── pom.xml # Maven configuration & JavaFX dependencies
├── src/
│ ├── main/
│ │ └── java/
│ │ ├── com/mycompany/inventorymanagementsystem/
│ │ │ └── InventoryManagementSystem.java # Core JavaFX application lifecycle
│ │ ├── adapter/ # GoF Adapter implementation
│ │ ├── factory/ # Creational factories (products, suppliers)
│ │ ├── prototype/ # Object cloning prototypes
│ │ ├── proxy/ # Access control and audit proxies
│ │ ├── singleton/ # Centralized catalog singletons
│ │ └── ui/ # JavaFX scene builders and controllers
│ └── test/ # Unit tests
Building and Running
Prerequisites
- Java Development Kit (JDK) 19 or higher
- Apache Maven 3.8+
Compilation & Launch
# Clean and compile
mvn clean compile
# Launch the JavaFX application
mvn exec:java