The Gulf Coast HVAC Inventory Management System is a Java-based application built to streamline inventory management for Referral Only HVAC.
- Developed in Java using Eclipse IDE then refactored in IntelliJ IDEA
- Database built on MySQL 8.0 using MySQL Workbench
- Console-based, menu-driven interface with an optional Swing GUI
- Uses DAO (Data Access Object) and Singleton design patterns
- Includes role-based access control, audit logging, stock tracking, and invoice management features
- Version-controlled with GitHub
-
Authentication & Roles
- Register with unique username & strong password (validated with regex) (≥12 chars, uppercase, lowercase, number, special char).
- Role-based access control (
ADMIN,USER,VIEWER).
-
Product Management
- Add, update, search, and deactivate products (SKU-based).
- Paginated view of active products.
-
Stock Control
- Atomic stock adjustments with reason + responsible user.
- Full stock movement history retained.
-
Reports
- Low-stock report.
- Audit log of product changes.
-
Logging
- Tracks system events, warnings, and errors.
gulf-coast-hvac-inventory-management/
│── src/
│ └── com/
│ └── gulfcoasthvac/
│ └── inventory/
│ ├── Main.java # Console entry point and menu loop
│ ├── Auth.java # Registration and authentication
│ ├── User.java # Authenticated user session record
│ ├── Product.java # Product DAO for CRUD and stock actions
│ ├── Invoice.java # Invoice DAO and stock adjustment logic
│ ├── Reports.java # Low-stock and audit log reports
│ ├── DBConnection.java # Singleton database connection
│ ├── AppLogger.java # Logging utility
│ └── GUIExample.java # Optional Swing GUI
│
│── lib/
│ └── mysql-connector-j-x.x.x.jar # MySQL JDBC driver
│
│── sql/
│ └── schema.sql # Clean database schema
│
│── README.md
│── LICENSE
│── .gitignore
git clone https://github.com/mtyndall88/gulf-coast-hvac-inventory-management.git
cd gulf-coast-hvac-inventory-managementCREATE DATABASE gulf_coast_hvac_inventory;Then import schema:
mysql -u root -p gulf_coast_hvac_inventory < sql/schema.sqlEdit DBConnection.java:
private static final String URL = "jdbc:mysql://localhost:3306/gulf_coast_hvac_inventory?useSSL=false&serverTimezone=UTC";
private static final String USER = "root";
private static final String PASSWORD = "yourpassword";javac -cp "lib/mysql-connector-j-9.7.0.jar" -d out src/com/gulfcoasthvac/inventory/*.java
java -cp "out;lib/mysql-connector-j-9.7.0.jar" com.gulfcoasthvac.inventory.Main- Open the project folder in IntelliJ IDEA.
- Set the Project SDK to JDK 21.
- Add the MySQL Connector/J
.jarfile as a project library. - Confirm
srcis marked as the Sources folder. - Run
Main.java.
- On startup, (R)egister, (L)ogin, (Q)uit
- Menu Loop:
- g → Get all products (active list).
- s → Search by name/SKU (parameterized LIKE)
- a → Add product (SKU, name, desc, price, reorder; INSERT + generated key + audit)
- u → Update product (price/reorder; live UPDATE + audit)
- d → Deactivate product (live UPDATE + audit)
- j → Adjust stock (±qty with reason; transaction writes stock movement + audit)
- v → Add invoice with customer, product, qty, and total amount (creates invoice, line item, decrements stock, writes stock movement + audit)
- i → Lists the last 10 invoices
- r → Low-stock report (DB view)
- t → Audit log report for last 20 entries
- q → Quits the program and logs the exit
Role restrictions apply (e.g., VIEWER cannot edit products or stock).
- Week 1 - Proposal, DB setup, GitHub repo
- Week 2 - Product CRUD features
- Week 3 - Logging system
- Week 4 - Menu navigation & simulated reports
- Week 5 - Database integration
- Week 6 - Final testing & delivery
- OWASP Authentication Standard: https://github.com/OWASP/ASVS/blob/master/4.0/en/0x11-V2-Authentication.md
- MySQL 8.0 Reference Manual: https://dev.mysql.com/doc/refman/8.0/en/atomic-ddl.html
- Java SE JDBC Documentation: https://docs.oracle.com/javase/tutorial/jdbc/basics/index.html
- Pro Git (Apress): https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository
- Microservices Definition (Fowler & Lewis): https://martinfowler.com/articles/microservices.html
Mark Tyndall
This project is licensed under the MIT License.