A simple console-based store simulation written in Python, designed to practice OOP, modular coding, and CLI interaction.
This project includes product management for a store manager and shopping features for customers.
- Add new products with name, price, and stock
- View all products in the store
- Prevent adding invalid data
- Secure login system (
admin / 1234by default)
- View all available products
- Add items to shopping cart
- Prevent adding more items than available stock
- Remove items from cart
- View cart contents at any time
- Checkout with final invoice
- Automatic stock updates after adding to cart
- Input validation for all user choices
- Clear and readable console UI
- Fully modular code following clean architecture principles
Represents each product in the store.
name: strprice: floatstock: int
Manages all products.
products: list[Product]add_product(name, price, stock)list_products()find_product(name)
Represents a single item in the shopping cart.
product: Productquantity: int
Handles cart operations.
items: list[CartItem]add_to_cart(product, quantity)remove_from_cart(product_name)view_cart()total_price()
================================= 🛍️ MINI STORE MANAGEMENT SYSTEM
👋 Welcome! Please select your role:
Store Manager
Customer
Exit Program
Enter choice: 1
🔐 Store Manager Login
Username: admin
Password: 1234
✅ Login successful! Welcome, Manager.
📦 Add Products
Enter product name (or ‘done’ to finish): Laptop
Enter product price: 1200
Enter product stock quantity: 5
✅ Product added: Laptop - $1200.00 (Stock: 5)
(Full output available in your program.)
- Make sure you have Python 3.8+ installed.
- Clone this project:
git clone https://github.com/<your-username>/<repo-name>.git3.Run the main file:
python main.py- Object-Oriented Programming (OOP)
- Class design and interaction
- CLI-based user interface
- Input validation
- Clean and modular code organization
- Docstrings & Type Annotations
- Product categories✔️
- User authentication system for multiple customers✔️
- Saving/loading store data using JSON✔️
- Logging purchase history per customer✔️
- Colorful CLI output with colorama❌
This project is designed as a practice assignment to simulate a real store environment using only Python console programming and clean OOP structure.