Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales Inventory Management System

A desktop application for managing sales and inventory, built with JavaFX and MySQL. This system helps businesses track products, process customer orders, generate receipts, and monitor sales performance through an intuitive graphical interface.


Features

Dashboard Overview

  • View total orders, today's income, and available products at a glance
  • Interactive Area Chart and Bar Chart for visualizing income and order trends

Product Management

  • Add, Update, Delete products with full CRUD operations
  • Supports multiple product categories (Cars, Engine Oil, Tires, Batteries, Brakes, and 20+ more)
  • Product status tracking: Available, Out of Stock, Broken, Damage
  • Import product images via file picker
  • Real-time search and filtering across all product fields

Order Processing

  • Add products to cart with cascading selection (Type → Brand → Product Name)
  • Quantity spinner with configurable min/max values
  • Automatic total calculation and balance/change display
  • Generate and view receipts for completed transactions

Receipt Generation

  • Create printable receipts for customer transactions
  • Tracks customer ID, total, amount paid, and balance

Prerequisites

  • Java 23 or higher
  • Maven 3.8+
  • MySQL Server 8.0+
  • A MySQL database named Inventory

Database Setup

Create a MySQL database named Inventory with the following tables:

CREATE DATABASE IF NOT EXISTS Inventory;
USE Inventory;

CREATE TABLE product (
    product_id INT PRIMARY KEY,
    Type VARCHAR(100),
    brand VARCHAR(100),
    productName VARCHAR(100),
    price DOUBLE,
    status VARCHAR(50),
    image VARCHAR(500),
    date DATE
);

CREATE TABLE customer (
    customer_id INT,
    type VARCHAR(100),
    brand VARCHAR(100),
    productName VARCHAR(100),
    quantity INT,
    price DOUBLE,
    date DATE
);

CREATE TABLE customer_receipts (
    customer_id INT,
    total DOUBLE,
    amount DOUBLE,
    balance DOUBLE,
    date DATE
);

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/Sales-Inventroy.git
    cd Sales-Inventroy
  2. Configure database credentials: Edit src/main/java/com/example/salesinventroy/database.java and update the connection string if your MySQL credentials differ:

    Connection connection = DriverManager.getConnection(
        "jdbc:mysql://localhost:3306/Inventory",
        "root",
        ""); // Update username and password as needed
  3. Build and run:

    mvn clean install
    mvn javafx:run

Project Structure

Sales-Inventroy/
├── src/main/java/com/example/salesinventroy/
│   ├── HelloApplication.java       # Application entry point
│   ├── HelloController.java        # Login view controller
│   ├── DashboardController.java    # Main dashboard controller (Products, Orders, Home)
│   ├── ReceiptController.java      # Receipt view controller
│   ├── ProductData.java            # Data model for products
│   ├── customerData.java           # Data model for customer orders
│   ├── database.java               # MySQL database connection utility
│   ├── getData.java                # Shared data/utility class
│   └── initializable.java          # Custom initialization interface
├── src/main/resources/com/example/salesinventroy/
│   ├── hello-view.fxml             # Login screen layout
│   ├── dashboard.fxml              # Main dashboard layout
│   └── receipt_view.fxml           # Receipt view layout
└── pom.xml                         # Maven project configuration

Technologies Used

Technology Version Purpose
Java 23 Core language
JavaFX 23 GUI framework
FXML - UI layout
MySQL 8.0.33 Database
MySQL Connector/J 8.0.33 JDBC driver
FontAwesomeFX 4.7.0-9.1.2 UI icons
Maven - Build tool

License

This project is for educational purposes.

About

A desktop Sales & Inventory Management System built with JavaFX and MySQL. Manage products, process customer orders, track sales with charts, and generate receipts. Features full CRUD operations, real-time search, and an intuitive dashboard.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages