A simple Java-based console application for managing grocery inventory, billing, and cart operations. This project is designed for small retail stores or individuals who want to keep track of their grocery stock, update inventory, and generate receipts for purchases.
- Admin Login: Secure access to inventory management features via username and password authentication.
- Inventory Management:
- Add new grocery items with stock and price.
- View all available items and their details.
- Update stock and price for existing items.
- Persistent storage of inventory using JSON files.
- Billing & Cart System:
- Add items to a shopping cart with quantity checks against available stock.
- Remove items from the cart.
- Automatic stock reduction upon billing.
- Generate and print a detailed receipt for each transaction.
- Save receipts as text files for record-keeping.
- User-Friendly Console Interface: Simple menu-driven navigation for all operations.
MainApp.java- Entry point and main menu logic.LoginManager.java- Handles admin authentication.InventoryManager.java- Manages inventory CRUD operations and persistence.GroceryItem.java- Represents a grocery item.CartManager.java- Handles cart operations and receipt generation.
-
Clone or Download this repository.
-
Compile all Java files:
-
Run the application:
===== GROCERY SYSTEM MENU =====
1. Add Item to Inventory
2. View Stock
3. Update Item
4. Start Billing (Cart)
5. Remove Item from Cart
6. Exit
Choose an option:
This project is for educational purposes.
Code by: @nkit