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.
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.
- 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.
| Layer | Technology |
|---|---|
| Language | Java |
| UI Framework | JavaFX (FXML + Controllers) |
| Build System | Apache Ant (NetBeans project) |
| Testing | JUnit 4 |
| Persistence | File I/O, Java Serialization |
┌──────────────────────────────────────────────────────────┐
│ 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:
- On startup,
WareHouseManagerloads the main warehouse database and recursively discovers existing sales van files. - User accounts are read from
Accounts.txtand matched to their assigned vans. - Inventory operations (add, transfer, sell) update in-memory
BikePartcollections, which are flushed to disk on save/exit. - Invoices are stored as serialized Java objects (
.objfiles) per van for cross-session persistence.
- 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)
- Clone the repository:
git clone https://github.com/samie-mirghani/bike-parts-inventory-and-sales-software.git
- Open the project in NetBeans IDE (File > Open Project).
- Right-click the project and select Run. The JavaFX GUI will launch.
- Clone the repository:
git clone https://github.com/samie-mirghani/bike-parts-inventory-and-sales-software.git cd bike-parts-inventory-and-sales-software - Build with Ant:
ant clean jar
- Run the application:
java -jar "dist/Project 3.jar"
- On first launch, click Start on the Welcome tab — the system will create
warehouseDB.txtautomatically. - 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.
├── 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
java javafx inventory-management desktop-application point-of-sale warehouse-management role-based-access-control bike-parts
This project is provided as-is for educational and demonstration purposes.