A feature-rich desktop e-commerce platform developed using Java Swing. This application provides a complete shopping experience, from user authentication to product management and order processing, all within a standalone desktop environment.
This project demonstrates the implementation of a full-stack desktop application architecture without the need for a heavy SQL backend. It utilizes JSON and structured text files for data persistence, showcasing efficient file I/O operations and local data management.
- 🔐 User Authentication System: Secure login and registration modules with persistent user data.
- 📦 Interactive Product Catalog: A visual storefront where users can browse items with real-time price and detail updates.
- ❤️ Favorites Management: A personalized "Wishlist" system allowing users to mark products with a heart icon for later viewing.
- 🛒 Shopping Cart Logic: Dynamic cart management where users can add/remove items and calculate total costs.
- 💳 Secure Checkout Simulation: A dedicated credit card processing module to validate and finalize purchases.
- 📜 Order History: Persistent storage and retrieval of past transactions, allowing users to review their "Last Orders."
- 🖼️ Rich GUI: A customized Swing interface featuring image-based buttons (cart, favorites) and responsive layouts.
- GUI Framework: Developed with Java Swing (AWT), utilizing custom
JFrameandJPaneldesigns for a modern user experience. - Data Persistence (NoSQL Approach): * JSON Data Handling: Uses
JSONUserData.jsonto store complex user profiles and credentials.- Flat-File Storage: Implements
userData.txt,favoriteProductsData.txt, andlastOrderData.txtfor lightweight and fast data retrieval.
- Flat-File Storage: Implements
- Object-Oriented Design: * Model-View Architecture: Clear separation between logic (
Product,User,Order) and UI (LoginScreen,ProductScreen).- Encapsulation: Robust class structures to ensure data integrity across the application.
- Resource Management: Dynamic loading of local assets (PNG icons for the cart, heart, and product images) from the
src/img/directory.
- Local Persistence Engine: Optimized file reading and writing mechanisms to ensure no data loss during application restarts.
- State Management: Efficiently handles user states (logged in vs. guest) and maintains the shopping cart session across different screens.
- Error Handling: Robust validation for login credentials and credit card inputs to provide a smooth user journey.
- JDK 8 or higher (Recommended: JDK 17+).
- IDE: NetBeans (Recommended) or IntelliJ IDEA.
- Clone the repository:
git clone [https://github.com/yourusername/e-commerceApplication.git](https://github.com/yourusername/e-commerceApplication.git) cd e-commerceApplication