A comprehensive Java-based Inventory and Sales Management System built with a Swing Graphical User Interface (GUI). This application provides a robust platform for managing gadgets (Laptops, Smartphones, Tablets, Accessories), tracking inventory levels, processing sales, and handling different user roles (Managers and Sales Representatives).
- Secure Login System: Users must authenticate using their credentials.
- Role-based Views: The system dynamically adjusts its interface based on whether the logged-in user is a Manager or a Sales Representative.
- Manager: Has full access to product management, inventory tracking, sales history, and potentially user administration.
- Sales Representative: Has restricted access intended primarily for processing sales and viewing available products.
- Add New Products: Managers can add new devices to the inventory by specifying details like ID, name, brand, capacity, price, and initial stock quantity.
- Categorized Gadgets: Supports handling different types of electronics:
- 💻 Laptops
- 📱 Smartphones
- 📱 Tablets
- 🎧 Accessories
- View Inventory: All users can view a comprehensive list of all current products in the system along with their current stock levels.
- Update & Delete Products: Managers can modify existing product details or entirely remove discontinued products from the system.
- Stock Tracking: Stock quantities are dynamically managed and updated upon new entries and successful sales.
- Process Sales: Sales representatives and Managers can execute customer sales.
- Automated Stock Deduction: Processing a sale automatically validates if sufficient stock exists, calculates the total price, and reduces the available product stock in the inventory.
- Out of Stock Prevention: The system prevents the completion of sales for items that lack sufficient stock quantities.
- Track Transactions: Every processed sale is permanently recorded.
- View Sales Records: Managers can view the entire sales history containing details of the product sold, quantity, total transaction amount, and the user who processed the sale.
- CSV File Storage: All system data is persistently saved to local CSV files.
products.csv: Stores all product catalog and stock information.sales.csv: Maintains an enduring record of all processed transactions.users.csv: Stores user credentials and role definitions.
- Automatic Load/Save: Data is automatically parsed when the application boots up and saved seamlessly without requiring a database connection.
- Language: Java
- UI Framework: Java Swing (GUI)
- Architecture: Object-Oriented Programming (OOP) including Encapsulation, Inheritance, and Polymorphism.
- Data Storage: Flat-file database using CSV arrays (File I/O).
- Prerequisites: Ensure you have the Java Development Kit (JDK 8 or higher) installed on your system.
- Clone the Repository:
git clone https://github.com/kavishkat2002/Gadget-Galaxy-Inventory-Management-System.git
- Compile and Run:
Open the application in an IDE that supports building Java projects (like Apache NetBeans, IntelliJ IDEA, or Eclipse), or compile it via terminal:
# Navigate to the source directory cd Gadget-Galaxy-Inventory-Management-System/src # Compile all java files javac ./Main.java (or relevant main entry class) # Run the application java Main
- Login: Use the predefined credentials from
users.csvto enter the system as either a Manager or a Sales Representative.
├── src/
│ ├── gui/ # Swing UI Components (LoginFrame, MainFrame, Panels)
│ ├── product/ # Product Object Models (Laptop, Smartphone, Tablet, Accessory)
│ ├── sales/ # Sales logic and records
│ ├── user/ # User roles and management (Manager, SalesRep)
│ ├── inventory/ # Main inventory tracking controller
│ └── file/ # FileManager for handling CSV reading/writing
├── products.csv # Persistent product data
├── sales.csv # Persistent sales records
└── users.csv # Persistent user accounts