Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bike Parts Inventory & Sales Management System

A modular, role-based desktop application for managing bicycle parts inventory, warehouse operations, mobile sales van fleets, and sales invoicing — built with Java and JavaFX.


Overview

Managing inventory across a central warehouse and a fleet of mobile sales vans is operationally complex. This application automates the full lifecycle of bicycle parts distribution: from warehouse intake and inventory tracking to van-based field sales, invoice generation, and salesman commission calculation. A role-based access control system ensures that each user — whether a System Administrator, Office Manager, Warehouse Manager, or Salesman — sees only the tools and data relevant to their responsibilities.

Key Features

  • Role-Based Access Control — Four distinct user roles (System Admin, Office Manager, Warehouse Manager, Salesman) with password-protected login and scoped permissions.
  • Centralized Inventory Management — Add, update, and query bike parts in a persistent warehouse database with support for bulk file imports.
  • Mobile Sales Van Fleet — Dynamically create and manage sales vans, each with its own independent inventory and associated salesman.
  • Inventory Transfers — Move parts between the main warehouse and sales vans, or between vans, via structured transfer files.
  • Point-of-Sale Processing — Sell parts by name or number directly from a van's inventory with automatic quantity tracking.
  • Invoice Generation — Create and persist invoices per store/owner, with serialized storage for durability across sessions.
  • Salesman Commission Reporting — Calculate salesman pay (15% commission) over configurable date ranges based on recorded sales.
  • Low-Stock Alerts — Check inventory levels against a threshold to identify parts that need restocking.
  • File-Based Persistence — All data (inventory, accounts, invoices) is persisted to flat files and serialized objects, requiring no external database.
  • Interactive JavaFX GUI — A tabbed interface provides dedicated workspaces for each role, with intuitive input forms and real-time output areas.

Tech Stack

Layer Technology
Language Java
UI Framework JavaFX (FXML + Controllers)
Build System Apache Ant (NetBeans project)
Testing JUnit 4
Persistence File I/O, Java Serialization

System Architecture

┌──────────────────────────────────────────────────────────┐
│                    JavaFX GUI (FXML)                     │
│  ┌──────────┬──────────┬──────────┬───────────────────┐  │
│  │ Welcome  │ Office   │ Salesman │ WH Manager │ Admin│  │
│  │   Tab    │ Manager  │   Tab    │    Tab     │  Tab │  │
│  └────┬─────┴────┬─────┴────┬─────┴─────┬──────┴──┬──┘  │
│       │          │          │           │         │      │
│       ▼          ▼          ▼           ▼         ▼      │
│  ┌─────────────────────────────────────────────────────┐ │
│  │           FXMLDocumentController                    │ │
│  │           PasswordController                        │ │
│  └──────────────────────┬──────────────────────────────┘ │
└─────────────────────────┼────────────────────────────────┘
                          │
                          ▼
              ┌───────────────────────┐
              │   WareHouseManager    │
              │  (Business Logic Hub) │
              └───┬───────────┬───────┘
                  │           │
          ┌───────▼──┐   ┌───▼──────────────┐
          │  Main    │   │  MobileWareHouse  │
          │ WareHouse│   │  (Sales Vans)     │
          └───┬──────┘   └──┬───────────────┘
              │             │
              ▼             ▼
        ┌──────────┐  ┌──────────┐
        │ warehouse│  │ vanX.txt │
        │ DB.txt   │  │ vanX.obj │
        └──────────┘  └──────────┘

Data Flow:

  1. On startup, WareHouseManager loads the main warehouse database and recursively discovers existing sales van files.
  2. User accounts are read from Accounts.txt and matched to their assigned vans.
  3. Inventory operations (add, transfer, sell) update in-memory BikePart collections, which are flushed to disk on save/exit.
  4. Invoices are stored as serialized Java objects (.obj files) per van for cross-session persistence.

Setup & Installation

Prerequisites

  • Java JDK 8 or later (JavaFX is bundled with JDK 8; for JDK 11+, add the JavaFX SDK separately)
  • Apache Ant (included with NetBeans, or install standalone)

Running with NetBeans

  1. Clone the repository:
    git clone https://github.com/samie-mirghani/bike-parts-inventory-and-sales-software.git
  2. Open the project in NetBeans IDE (File > Open Project).
  3. Right-click the project and select Run. The JavaFX GUI will launch.

Running from the Command Line

  1. Clone the repository:
    git clone https://github.com/samie-mirghani/bike-parts-inventory-and-sales-software.git
    cd bike-parts-inventory-and-sales-software
  2. Build with Ant:
    ant clean jar
  3. Run the application:
    java -jar "dist/Project 3.jar"

Initial Setup

  • On first launch, click Start on the Welcome tab — the system will create warehouseDB.txt automatically.
  • Use the System Admin tab to create user accounts (Office Manager, Warehouse Manager, Salesman).
  • Each role-specific tab requires password authentication before access is granted.

Project Structure

├── src/project/pkg3/          # Core source (legacy GUI layer)
│   ├── Project3.java          # Application entry point
│   ├── FXMLDocument.fxml      # Main UI layout
│   ├── FXMLDocumentController.java  # Primary controller
│   ├── Password.fxml          # Login dialog layout
│   ├── PasswordController.java     # Authentication controller
│   ├── BikePart.java          # Bike part data model
│   └── WareHouse.java         # Warehouse base class
├── project/pkg3/              # Extended business logic
│   ├── WareHouseManager.java  # Central orchestrator
│   ├── MainWareHouse.java     # Main warehouse implementation
│   └── MobileWareHouse.java   # Sales van implementation
├── data/                      # Data models & tests
│   ├── Account.java           # User account model
│   ├── PartLocation.java      # Part location tracker
│   └── AccountTest.java       # JUnit tests
├── build.xml                  # Ant build configuration
└── nbproject/                 # NetBeans project metadata

Suggested Topics / Tags

java javafx inventory-management desktop-application point-of-sale warehouse-management role-based-access-control bike-parts


License

This project is provided as-is for educational and demonstration purposes.

About

A modular, role-based desktop application for managing bicycle parts inventory, warehouse operations, mobile sales van fleets, and sales invoicing — built with Java and JavaFX.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages