Perfect Perfume is an elegant e-commerce web application built using Flask, featuring secure user authentication (manual + Google OAuth), OTP-based registration, shopping cart management, order tracking, and email notifications β all designed for a seamless perfume shopping experience.
π Website: https://perfect-perfume-three.vercel.app π» Repository: https://github.com/HariVignesh18/Perfect-Perfume
| Component | Technology |
|---|---|
| Frontend | HTML, CSS (Bootstrap 5), Jinja2 Templates |
| Backend | Flask (Python) |
| Database | MySQL |
| Authentication | Google OAuth (Flask-Dance), Manual login with password hashing |
| Email Service | Flask-Mail (SMTP via Gmail) |
| OTP Verification | PyOTP |
| Hosting | Vercel |
| Environment Management | python-dotenv |
- Secure registration with OTP verification via email
- Passwords stored using
werkzeug.securityhashing - Google OAuth login via Flask-Dance
- Session-based authentication
- View and delete profile functionality
- Add products to cart
- Modify or delete cart items
- βBuy Nowβ and βBuy from Cartβ options
- Address management (auto-update on next orders)
- Automatic email confirmation on order placement
- OTP email during registration
- Welcome email after account creation
- Order confirmation emails
- Encrypted passwords (SHA256 via Werkzeug)
- Environment variables for secrets & credentials
- Transaction-safe account deletion (with rollback on error)
Perfect-Perfume/
β
βββ app.py # Main Flask application
βββ templates/ # HTML templates (Jinja2)
β βββ index.html
β βββ Registration.html
β βββ login.html
β βββ cart.html
β βββ myprofile.html
β βββ confirmation.html
β βββ ...
βββ static/ # CSS, JS, images
βββ .env # Environment variables
βββ requirements.txt # Python dependencies
βββ README.md # Documentation
git clone https://github.com/HariVignesh18/Perfect-Perfume.git
cd Perfect-Perfumepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory and add:
DB_HOST=localhost
DB_USERNAME=your_mysql_user
DB_PASSWORD=your_mysql_password
DB_DBNAME=perfect_perfume
EMAIL=youremail@gmail.com
EMAIL_PWD=your_app_password
MAILPORT=465
APP_SECRET=your_flask_secret_key
GOOGLE_OAUTH_CLIENT_ID=your_google_client_id
GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret
OIT=1python app.pyVisit http://127.0.0.1:5000 in your browser.
Tables used:
- customerdetails (user_id, username, email, password)
- product (product_id, product_name, price, category, etc.)
- cart (user_id, product_id, quantity, added_time)
- address (user_id, plot_no, street_address, area, country, state, pincode)
- orders (order_id, user_id, product_id, quantity, address)
| Feature | Description |
|---|---|
| OTP Authentication | Time-based OTP valid for 5 minutes |
| Session Tracking | User info cached with user_id, email, and status |
| Account Deletion | Cascading delete (cart β orders β address β user) |
| Email Integration | Uses Flask-Mail for SMTP Gmail delivery |
| Google OAuth | Automatically links or creates user accounts |
This project is for educational and demonstration purposes. Β© 2025 Hari Vignesh B. All Rights Reserved.