├── .gitattributes ├── .github └── workflows │ └── python-package.yml ├── README.md └── myapp ├── .python-version ├── main.py ├── pyproject.toml └── uv.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/workflows/python-package.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | python-version: ["3.9", "3.10", "3.11"] 20 | 21 | steps: 22 | - uses: actions/checkout@v4 23 | - name: Set up Python ${{ matrix.python-version }} 24 | uses: actions/setup-python@v3 25 | with: 26 | python-version: ${{ matrix.python-version }} 27 | - name: Install dependencies 28 | run: | 29 | python -m pip install --upgrade pip 30 | python -m pip install flake8 pytest 31 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 32 | - name: Lint with flake8 33 | run: | 34 | # stop the build if there are Python syntax errors or undefined names 35 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 36 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 37 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 38 | - name: Test with pytest 39 | run: | 40 | pytest 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🍔 Command-Line Food Ordering App 2 | A Python-based command-line application that simulates a food ordering system. Forked and enhanced from vikram-singh9/Order_Management_App_Python, this project has been upgraded with better user experience, extended functionalities, and cleaner code structure. 3 | 4 | 🚀 Features 5 | 📋 Menu Display – Browse through a categorized food menu (e.g., Main Course, Drinks, Desserts). 6 | 7 | 🛒 Order Management – Add, remove, and view items in your cart before placing an order. 8 | 9 | 💸 Billing System – Get an itemized bill with totals and taxes at checkout. 10 | 11 | 🔁 Repeat Ordering – Loop back to main menu after completing an order to continue or exit. 12 | 13 | 🧼 Code Improvements – Modular structure, better input handling, and user prompts. 14 | 15 | 🛠 Modifications by Lincoln Madaraka 16 | ✅ Improved input validation (handles edge cases and invalid entries more gracefully). 17 | 18 | ✅ Added category-based filtering for menu items. 19 | 20 | ✅ Enhanced order summary formatting for better readability. 21 | 22 | ✅ Modularized code into multiple functions for clarity and maintainability. 23 | 24 | ✅ Customizable tax and discount features added for experimentation. 25 | 26 | ✅ Added session timestamps and order IDs for better tracking (optional). 27 | 28 | 📂 Project Structure 29 | bash 30 | Copy 31 | Edit 32 | Order_Management_App/ 33 | ├── main.py # Entry point for the CLI app 34 | ├── menu.py # Contains the menu data and helper functions 35 | ├── order.py # Functions related to order/cart management 36 | ├── billing.py # Billing and invoice generation logic 37 | ├── utils.py # Utility functions (e.g., input validation) 38 | └── README.md # Project documentation 39 | Note: Some of these files may vary depending on your structure; feel free to adjust. 40 | 41 | ▶️ Getting Started 42 | 🔧 Prerequisites 43 | Python 3.7+ 44 | 45 | No external packages required (fully standard library) 46 | 47 | 📦 Installation 48 | Clone the repository: 49 | 50 | bash 51 | Copy 52 | Edit 53 | git clone https://github.com/Lincoln-Madaraka/Order_Management_App_Python.git 54 | cd Order_Management_App_Python 55 | Run the application: 56 | 57 | bash 58 | Copy 59 | Edit 60 | python main.py 61 | 🧪 Example Usage 62 | bash 63 | Copy 64 | Edit 65 | Welcome to the Food Ordering App! 66 | 67 | Please choose an option: 68 | 1. View Menu 69 | 2. Place Order 70 | 3. View Cart 71 | 4. Checkout 72 | 5. Exit 73 | 74 | ----- MENU ----- 75 | 1. Chicken - $5.99 76 | 2. Spring - $2.99 77 | 3. Soda - $1.99 78 | ... 79 | At checkout: 80 | 81 | pgsql 82 | Copy 83 | Edit 84 | ----- ORDER SUMMARY ----- 85 | 1 x Rolls $5.99 86 | 2 x Fries $5.98 87 | ------------------------- 88 | Subtotal: $11.97 89 | Tax (10%): $1.20 90 | Total: $13.17 91 | 92 | Thank you for your order! 93 | 🔍 Future Improvements 94 | Add JSON or SQLite-based order history persistence. 95 | 96 | Support for user profiles and saved preferences. 97 | 98 | Add CLI color formatting for enhanced visuals using colorama. 99 | 100 | Enable export of bill to text or PDF. 101 | -------------------------------------------------------------------------------- /myapp/.python-version: -------------------------------------------------------------------------------- 1 | 3.12 2 | -------------------------------------------------------------------------------- /myapp/main.py: -------------------------------------------------------------------------------- 1 | # Restaurant Menu Dictionary 2 | menu = { 3 | "Paneer Tikka": 180, 4 | "Chicken Wings": 220, 5 | "Spring Rolls": 160, 6 | "French Fries": 120, 7 | "Butter Chicken": 320, 8 | "Paneer Butter Masala": 280, 9 | "Veg Biryani": 200, 10 | "Chicken Biryani": 250, 11 | "Tandoori Roti": 20, 12 | "Butter Naan": 30, 13 | } 14 | 15 | print("🍽️ Welcome to Vikram's Restaurant!") 16 | print("Here's our menu") 17 | for i, meal in enumerate(menu.keys(), start=1): 18 | print(f"{i}. {meal}") 19 | # Show menu to user 20 | print("🍽️ Welcome to Vikram's Restaurant!") 21 | print("Here's our individual menu food prices\n") 22 | for item, price in menu.items(): 23 | print(f"{item} - ₹{price}") 24 | 25 | print("\n📝 Let's take your order (type 'done' to finish):\n") 26 | 27 | # Take order from user 28 | order = {} 29 | while True: 30 | item = input("Enter item name(If entered all type \"done\"): ").strip() 31 | if item.lower() == 'done': 32 | break 33 | elif item in menu: 34 | try: 35 | quantity = int(input(f"Enter quantity for {item}: ")) 36 | if item in order: 37 | order[item] += quantity 38 | else: 39 | order[item] = quantity 40 | except ValueError: 41 | print("❌ Please enter a valid number.") 42 | else: 43 | print("❌ Item not found in menu.") 44 | 45 | # Calculate total bill 46 | print("\n🧾 Your Bill Summary:\n") 47 | total = 0 48 | for item, quantity in order.items(): 49 | price = menu[item] 50 | cost = price * quantity 51 | total += cost 52 | print(f"{item} x {quantity} = ₹{cost}") 53 | 54 | print(f"\n💰 Total Amount to Pay: ₹{total}") 55 | print("\n🙏 Thank you for dining with us, you're welcome again!") 56 | 57 | -------------------------------------------------------------------------------- /myapp/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "myapp" 3 | version = "0.1.0" 4 | description = "Add your description here" 5 | readme = "README.md" 6 | requires-python = ">=3.12" 7 | dependencies = [] 8 | -------------------------------------------------------------------------------- /myapp/uv.lock: -------------------------------------------------------------------------------- 1 | version = 1 2 | revision = 1 3 | requires-python = ">=3.12" 4 | 5 | [[package]] 6 | name = "myapp" 7 | version = "0.1.0" 8 | source = { virtual = "." } 9 | --------------------------------------------------------------------------------