_____ _ _ _ _
| __ \(_) | | (_) ( )
| |__) |_ _ __ ___ ___ ___ ___| |__ _ ___ |/ ___
| ___/| | '_ \ / _ \ / __/ __| __| '_ \| |/ _ \ / __|
| | | | | | | (_) | (_| (__| |_| | | | | (_) | \__ \
|_| |_|_| |_|\___/ \___\___|\__|_| |_|_|\___/ |___/
PIZZA & SUBS
Pinocchio's Pizza is a full-stack e-commerce platform built with Django. It was developed as part of CS50’s Web Programming with Python and JavaScript.
The system solves the challenge of digitizing a complex restaurant menu (handling multiple size variations and topping combinations) and managing the complete order flow, from ingredient selection to transactional email confirmations.
The project is deployed in the cloud (Koyeb) using a production-grade PostgreSQL database and SMTP (Brevo) for email services.
This project goes beyond a simple CRUD application. Here are the main features:
- Dynamic Opening Hours: The store hours displayed on the Homepage are 100% managed via Django Admin. The administrator can update business hours without touching the code or redeploying.
- Size & Price Variation: Logic to handle items with multiple prices based on size (Small vs. Large) efficiently.
- Topping Logic: The system validates the exact number of allowed toppings.
- Example: A "2-Topping Pizza" strictly requires the user to select exactly 2 ingredients before adding to the cart.
- Full Account Flow: Secure Registration and Login.
- Password Recovery: Real-world implementation of "Forgot Password". The system sends a unique, secure link via email (SMTP) allowing users to reset their credentials.
- Email Validation: Ensures only users with valid email addresses can operate on the platform.
- Data Persistence: The shopping cart is saved in the database (
Cart Model), allowing users to close the browser and resume their order later (unlike session-only carts). - Real-time Calculation: Subtotal and Total update automatically as items are added.
- Checkout Flow: The system records the order in the database and clears the cart, simulating a real purchase flow.
- Transactional Notifications: Integrated with Brevo (formerly Sendinblue) API via SMTP.
- Email Templates: Automatic sending of order receipts to the client and password reset links.
- Total Management: User-friendly interface to add new pizzas, toppings, change prices, or update store hours.
- Order Workflow: Administrators can view incoming orders in real-time.
- Backend: Python 3.11 + Django 4.2
- Frontend: HTML5, CSS3, JavaScript (Vanilla), Bootstrap 5 (Responsive)
- Database: PostgreSQL 16 (Cloud Hosted)
- Infrastructure:
- Deploy: Koyeb (PaaS)
- Web Server: Gunicorn
- Static Files: WhiteNoise
- Email Service: Brevo SMTP Relay
| Dynamic Menu | Topping Selection |
|---|---|
![]() |
![]() |
| Shopping Cart | Email Received |
|---|---|
![]() |
![]() |
-
Clone the repository:
git clone [https://github.com/your-username/project3.git](https://github.com/your-username/project3.git) cd project3 -
Install dependencies:
pip install -r requirements.txt
-
Configure Environment Variables (.env): Create a
.envfile or export these variables:DB_NAME=your_db_name DB_USER=your_db_user DB_PASSWORD=your_db_password DB_HOST=your_db_host EMAIL_HOST_USER=your_brevo_login EMAIL_HOST_PASSWORD=your_smtp_key DEFAULT_FROM_EMAIL=your_verified_email
-
Run Migrations and Start Server:
python manage.py migrate python manage.py runserver
Access: http://127.0.0.1:8000
This project was developed for educational purposes (CS50 Web @ Harvard).



