This project is an end-to-end restaurant order web application built with Flask. It starts from a simple web form to handle customer orders and progresses through several levels of complexity, including database integration, payment processing, and cloud deployment.
- Project Overview
- Features
- Installation
- Project Structure
- Levels of Complexity
- Usage
- Contributing
- License
This application allows restaurant customers to place orders online. It begins as a simple form where users can enter their order details and gradually evolves to include features like order history, payment integration, and cloud deployment.
- Simple web form to collect order details.
- Local database to store and retrieve orders.
- Input validation for order details.
- Payment processing with third-party API integration (Stripe).
- Cloud deployment with support for multiple users.
- Basic logging for tracking orders and errors.
-
Clone the repository:
git clone https://github.com/techbire/restaurant_order.git cd restaurant_order -
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python app.py
restaurant_order/
│
├── app.py # Main application file
├── templates/ # HTML templates
│ ├── base.html
│ ├── index.html
│ └── order.html
├── static/ # Static files like CSS
│ └── style.css
└── requirements.txt # Python dependencies
- Objective: Build a simple web form using Flask where users can input an order for a restaurant.
- Details: Collect basic order details such as customer name, phone number, and order items.
- Database: Use SQLite for local storage of order details.
- Objective: Enhance the form to allow users to view past orders.
- Details: Implement basic validation to ensure that order details are correctly entered before submission.
- Features: Display a list of past orders stored in the database.
- Objective: Integrate the application with a third-party API (like Stripe) for handling payments.
- Details: Ensure that order details are securely processed and payments are handled using the Stripe API.
- Objective: Deploy the application to a cloud service (like Render) ensuring it can handle multiple simultaneous users.
- Details: Add basic logging to track orders and application errors. Set up environment variables for sensitive information like API keys.
After installing and running the application, navigate to http://127.0.0.1:5000 in your browser to start placing orders.
