StackShop is a Java-based e-commerce platform built with JavaFX, offering an interactive user interface for three distinct user roles:
🔹 Customers – Browse products, manage carts, place orders, and track order history.
🔹 Suppliers – Add and manage product listings efficiently.
🔹 Administrators – Oversee users, suppliers, orders, and handle supplier registration requests.
The project utilizes FXML for UI layouts, CSS for styling, and an in-memory database for data storage. Session management is implemented via UserSession (customers/admins) and SuppSession (suppliers). The application consists of 55 files across four key folders: main, controllers, models, and view.
✅ User Authentication – Secure login & sign-up with validation (LoginController, SignUpController).
✅ Session Management – Tracks active users (UserSession, SuppSession).
✅ Data Storage – Temporary in-memory storage (Database class) for users, suppliers, orders, and more.
🛒 Product Browsing – View & search products by category (ECommerceController).
🛒 Cart Management – Modify items, adjust quantities (CartController).
🛒 Checkout – Apply promo codes (SAVE10, SAVE20), choose payment methods (CheckoutController).
🛒 Order History – View past orders with details (viewOrderController).
🛒 Profile Management – Edit account details (myProfile).
🛒 Personalized Interests – Select preferred categories for recommendations (CustomerInterestsController).
📦 Product Management – Add, edit, and remove products (addProduct, ProductEditController).
📦 Supplier Dashboard – Manage listings & logout (suppfxmlController).
📦 Supplier Requests – Submit account requests (SignUpRequestController).
📊 Admin Dashboard – Manage users, orders, suppliers (admindashController).
📊 User Oversight – View & manage admins (AdminViewCtr), customers (AdminViewCust).
📊 Supplier Oversight – Approve or reject registration requests (SupplierRequestController).
📊 Order Tracking – Monitor all orders (viewOrderController).
📊 Profile Management – Update admin details (myProfileAdmin).
📂 main –
App.java: Entry point, initializes sample data and loadswelcomePage.fxml.
📂 controllers –
- JavaFX controllers linking UI to logic (e.g.,
LoginController,CartController).
📂 models –
Database: Manages in-memory storage.Customer,Supplier,Admin: User models.Order,Cart: Order management with payment logic.PromoCode: Handles discounts.
📂 view –
- FXML files: UI layouts (e.g.,
welcomePage.fxml,custfxml.fxml). - CSS Styling: Enhances UI with
style.css.
✅ Java Development Kit (JDK): Version 8+
✅ JavaFX SDK: Version 11+
✅ IDE: IntelliJ IDEA, Eclipse, or any JavaFX-supported environment
1️⃣ Clone the Repository:
git clone <(https://github.com/basemw0/Ecommerce-App.git)>2️⃣ Configure JavaFX:
- Download JavaFX SDK from openjfx.io.
- Add JavaFX to your IDE module path.
--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml3️⃣ Run the Application:
- Open project in your IDE.
- Ensure all resource paths (FXML, CSS) are correctly referenced.
- Set
main.Appas the main class and launch.
🔹 Launch – Run App.java to open welcomePage.fxml.
🔹 Customers – Sign up/login, browse products, add to cart, checkout.
🔹 Suppliers – Request approval, log in, manage products.
🔹 Admins – Log in, manage users, suppliers, orders.
👤 Customer: Amir – Username: AmirtheGoat, Balance: $1000
🏭 Suppliers:
- NADA (Approved, sells: Protein shake, Greek yogurt)
- Almara3y (Pending approval)
🔑 Admin: CEO Beso –Username: beso,Working Hours: 9 AM - 12 PM
📦 Orders: Amir’s cart pre-filled with two products.
✅ Persistent Database Integration – Use SQLite/MySQL for better data storage.
✅ Enhanced Admin Features – Save changes in admin profiles.
✅ Optimized Category Mapping – Ensure accurate product categorization.
✅ Refined UI & UX – Improve validation messages and design responsiveness.