Skip to content

43UniProjects/SaleSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ SaleSync - A Modern Sales Manager

This project was developed to fulfill the requirements of the Object Oriented Programming course module (IIC 1153) at the University of Sri Jayewardenepura, Faculty of Technology

Assignment Requirements β€’ Features β€’ Quick Start β€’ Project Structure β€’ User Interface

πŸ’β€β™‚οΈ Pronunciation

SaleSync β€” β€œsales sync”
Phonetic: /seΙͺlz sΙͺΕ‹k/

🎯 Overview

SaleSync is a Java application designed as a simple store manager system. It serves as a practical demonstration of Object-Oriented Programming (OOP) principles and related Java features as required by the IIC 1153 - Object Oriented Programming

The system addresses a practical business or operational problem faced by a local startup company by providing solutions for:

  • Employee Management
  • Product Inventory Management
  • Billing System

Key Demonstrations

  • πŸ—οΈ OOP Principles: Application of Encapsulation, Abstraction, Inheritance, and Polymorphism
  • πŸ“š Java Concepts: Use of Interfaces & Packages, Collections & Generics, File Handling, and Exception Handling
  • πŸ—„οΈ Data Persistence: Integration with MongoDB for data storage (implied file handling for data).
  • πŸ–₯️ User Interface: Implementation of a JavaFx GUI.
  • πŸ‘₯ Version Control: Effective use of Git/GitHub for collaborative development

πŸ“„ Assignment Requirements

This project addresses the core requirements of the IIC 1153 Group Assignment[cite: 7, 8]:

  • Problem Identification: Identify a current operational or management issue faced by a local startup company and propose a software solution
  • OOP Implementation: Design and implement the solution in Java, applying sound OOP design principles
    • Encapsulation
    • Abstraction
    • Inheritance
    • Polymorphism
    • Exception Handling
    • Collections & Generics
    • File Handling
    • Interfaces & Packages
  • Teamwork & VCS: Demonstrate effective teamwork and use of a Version Control System (Git/GitHub)
    • Commit and push regularly
    • Use descriptive commit messages
    • Demonstrate branch usage and merging.

πŸš€ Features

The SaleSync application supports the following key functionalities:

  • βœ… Role-Based Access: Distinguishes between Admin, Cashier, and Product Manager roles.
  • βœ… Employee Management: CRUD (Create, Read, Update, Delete) operations for employee records.
  • βœ… Product Inventory: Full CRUD operations to manage product stock and details.
  • βœ… Data Persistence: Uses a NoSQL database (MongoDB) to store all application data.
  • βœ… GUI Interface: Provides a user-friendly graphical interface using JavaFX.
  • βœ… Robustness: Utilizes exception handling techniques to build a robust, error-tolerant application[cite: 15].

πŸ“¦ Prerequisites

Before running the application, ensure you have the following installed:

Requirement Notes
β˜• Java JDK Version 17 or higher.
πŸ“¦ Maven Version 3.6+ for building and dependency management.
πŸ€– Mongock Version 5.5+ for managing database migration
πŸ—„οΈ MongoDB Running locally or accessible via a connection string.

Note: If your installed JDK version differs from the project's default, update the <source> and <target> values in the maven-compiler-plugin section of pom.xml.


⚑ Quick Start

Follow these steps to set up and run the SaleSync application:

1️⃣ Clone the Repository

git clone [https://github.com/banuka20431/SaleSync.git](https://github.com/banuka20431/SaleSync.git)

cd SaleSync

2️⃣ Build the Project

Use Maven to compile the code and package the application:

mvn clean package

3️⃣ Run the Application

You can run the application using the Maven exec plugin:

mvn exec: java -Dexec.mainClass="org.oop_project.Main"

4️⃣ Database Setup

Please make sure your MongoDB server is running. The application is configured by default to connect to mongodb://localhost:27017 with the database name SaleSync.

πŸ“ Project Structure

The project follows a standard package structure demonstrating the separation of concerns (MVC pattern elements) and the application of OOP principles:

SaleSync/
β”œβ”€β”€ πŸ“„ LICENSE
β”œβ”€β”€ πŸ“„ pom.xml                               # Maven build configuration
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ πŸ“ lib/
β”‚   └── πŸ“„ javafx.properties                 # JavaFX runtime configuration
└── πŸ“ src/
    └── πŸ“ main/
        β”œβ”€β”€ πŸ“ java/
        β”‚   └── πŸ“ org/
        β”‚       └── πŸ“ oop_project/
        β”‚           β”œβ”€β”€ 🎯 Main.java                    # Launches JavaFX application
        β”‚           β”œβ”€β”€ πŸ“ database_handler/            # Data access and business logic
        β”‚           β”‚   β”œβ”€β”€ DatabaseConnectionManager.java
        β”‚           β”‚   β”œβ”€β”€ πŸ“ enums/
        β”‚           β”‚   β”‚   β”œβ”€β”€ Role.java
        β”‚           β”‚   β”‚   └── UnitType.java
        β”‚           β”‚   β”œβ”€β”€ πŸ“ migrations/              # Database versioning
        β”‚           β”‚   β”‚   β”œβ”€β”€ DatabaseChangeUnit_001.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ DatabaseChangeUnit_002.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ DatabaseChangeUnit_003.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ DatabaseChangeUnit_004.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ DatabaseChangeUnit_006.java
        β”‚           β”‚   β”‚   └── DatabaseChangeUnit_007.java
        β”‚           β”‚   β”œβ”€β”€ πŸ“ models/                  # Domain models (inheritance)
        β”‚           β”‚   β”‚   β”œβ”€β”€ Admin.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ Cashier.java
        β”‚           β”‚   β”‚   β”œβ”€β”€ Employee.java           # Base class
        β”‚           β”‚   β”‚   β”œβ”€β”€ Product.java
        β”‚           β”‚   β”‚   └── ProductManager.java
        β”‚           β”‚   └── πŸ“ operations/              # Business operations
        β”‚           β”‚       β”œβ”€β”€ EmployeeOperations.java
        β”‚           β”‚       β”œβ”€β”€ Operations.java
        β”‚           β”‚       └── ProductOperations.java
        β”‚           β”œβ”€β”€ πŸ“ utils/                       # General utilities
        β”‚           β”‚   β”œβ”€β”€ Generate.java
        β”‚           β”‚   β”œβ”€β”€ JsonReader.java
        β”‚           β”‚   └── Text.java
        β”‚           └── πŸ“ view/                        # JavaFX presentation layer
        β”‚               β”œβ”€β”€ SaleSyncApp.java            # JavaFX Application subclass
        β”‚               β”œβ”€β”€ πŸ“ controllers/             # UI event handlers
        β”‚               β”‚   β”œβ”€β”€ AdminController.java
        β”‚               β”‚   β”œβ”€β”€ CashierController.java
        β”‚               β”‚   β”œβ”€β”€ CheckoutController.java
        β”‚               β”‚   β”œβ”€β”€ LoginController.java
        β”‚               β”‚   └── ProductController.java
        β”‚               β”œβ”€β”€ πŸ“ helpers/                 # UI helper classes
        β”‚               β”‚   β”œβ”€β”€ BillRow.java
        β”‚               β”‚   β”œβ”€β”€ EmployeeRow.java
        β”‚               β”‚   β”œβ”€β”€ Navigators.java
        β”‚               β”‚   β”œβ”€β”€ ProductRow.java
        β”‚               β”‚   └── Validator.java
        β”‚               └── πŸ“ view/                    # Nested resources accessors
        β”‚                   └── (see resources section)
        └── πŸ“ resources/
            └── πŸ“ org/
                └── πŸ“ oop_project/
                    └── πŸ“ view/
                        β”œβ”€β”€ πŸ“ css/
                        β”‚   └── style.css
                        β”œβ”€β”€ πŸ“ fxml/
                        β”‚   β”œβ”€β”€ admin-panel.fxml
                        β”‚   β”œβ”€β”€ cashier-portal.fxml
                        β”‚   β”œβ”€β”€ checkout.fxml
                        β”‚   β”œβ”€β”€ login.fxml
                        β”‚   └── product-dashboard.fxml
                        └── πŸ“ images/                  # Image assets (filenames omitted)

User Interface


Login Panel

login-panel

Admin Panel

admin-panel

Inventory Manager

inventory-manager

Cashier Portal

cashier-portal

πŸ’» Usage

The application will launch the JavaFX GUI upon execution. You will first be prompted to log in. A default Admin user is created on the first run for initial access.

Features Access

  • Admin: Full access to Employee and Product Management.
  • Product Manager: Access to Product Inventory Management.
  • Cashier: Access to the Billing System.

🀝 Contributing (VCS Demo)

As a collaborative group assignment, effective use of Git and GitHub is mandatory to demonstrate teamwork.

Follow these steps to ensure proper Version Control System (VCS) usage:

Work on a Feature Branch: Create a new branch for each task to isolate changes and allow for merging demonstrations.

git checkout -b feature/implement-login

Commit Regularly: Commit your changes frequently with descriptive commit messages.

git commit -m "FEAT: Added basic validation logic to LoginController"

Push to GitHub: Keep the collaborative project repository up to date.

git push origin feature/implement-login

Open and Merge a PR: Use Pull Requests (PRs) on GitHub to merge your branch back into main once the feature is complete and reviewed.

About

Java Based Store Manager Application with JavaFX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •