A CLI-based retail management system to handle products, customers, orders, payments, and reports. Built with Python and Supabase/PostgREST.
Features
Products: Add, list, filter by category.
Customers: Add, update, delete, list, search.
Orders: Create, view, cancel; auto-manage stock.
Payments: Track, process, refund; update order status.
Reports: Top-selling products, revenue, orders per customer, frequent customers.
Setup
Clone repo:
git clone (https://github.com/Tejaswimadastu/Retail_Inventory_Order_Management_System.git) cd Retail-Inventory-Order-Management-System
Install dependencies:
pip install -r requirements.txt
Configure Supabase (src/config.py) with URL and API Key.
Create tables in Supabase:
-- products, customers, orders, order_items, payments (as per schema)
Running CLI
Run commands from project root:
python src/cli/main.py [options]
Product Commands
python src/cli/main.py product add --name "Laptop" --sku "LP123" --price 50000 --stock 10 --category "Electronics"
python src/cli/main.py product list --limit 10 --category "Electronics"
Customer Commands
python src/cli/main.py customer add --name "John Doe" --email "john@example.com" --phone "9876543210" --city "Mumbai"
python src/cli/main.py customer update --id 1 --phone "9123456780" --city "Pune"
python src/cli/main.py customer delete --id 1
python src/cli/main.py customer list --limit 50
python src/cli/main.py customer search --email "john@example.com" --city "Mumbai"
Order Commands
python src/cli/main.py order create --customer 1 --item 1:2 2:1
python src/cli/main.py order show --order 1
python src/cli/main.py order cancel --order 1
Payment Commands
python src/cli/main.py payment process --order 1 --method Cash
python src/cli/main.py payment refund --order 1
Report Commands
python src/cli/main.py report top-products --limit 5
python src/cli/main.py report revenue
python src/cli/main.py report orders-per-customer
python src/cli/main.py report frequent-customers --min-orders 2
Notes
Payments are auto-created as PENDING with every order.
Only customers without orders can be deleted.
Cancelling an order restores product stock and refunds payment.
Reports are generated from live order and payment data.