A scalable e-commerce platform for direct perfume sales, focusing on backend system integration and user interface optimization. Implemented a dynamic cart system to enhance the shopping experience, ensuring smooth transactions and user interactions with an order confirmation email system. Now hosted on Vercel for seamless deployment.
- HTML
- CSS
- Bootstrap
- Python
- Flask
- MySQL
- werkzeug.security
- Flask-Mail (for email notifications)
- Object-Oriented Programming
- Data Structures & Algorithms (Stack, Sorting)
- Hosted on Vercel with environment variables configured for secure access.
Clone the repository to your local environment using:
git clone https://github.com/yourusername/perfect-perfume.gitCreate a .env file and add the following configurations:
APP_SECRET=your_secret_key
EMAIL=your_email
EMAIL_PWD=your_app_password
DB_HOST=your_db_hostname
DB_USERNAME=your_db_username
DB_PASSWORD=your_db_password
DB_DBNAME=your_db_name
MAILPORT=your_mail_portOpen MySQL Workbench and execute the following SQL commands:
CREATE DATABASE perfume_company;
USE perfume_company;
CREATE TABLE customerdetails (
user_id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50),
password VARCHAR(200),
email VARCHAR(50)
);
CREATE TABLE product (
product_id INT AUTO_INCREMENT PRIMARY KEY,
product_name VARCHAR(50),
target_gender VARCHAR(10),
item_form VARCHAR(10),
ingredients VARCHAR(50),
special_features VARCHAR(50),
item_volume INT,
country VARCHAR(20),
price INT
);
INSERT INTO product VALUES
(1, 'Floral Perfume', 'Unisex', 'Spray', 'Jasmine', 'Natural Ingredients', 60, 'India', 599),
(2, 'Woody Perfume', 'Unisex', 'Spray', 'Cedarwood', 'Long-lasting', 60, 'India', 699),
(3, 'Citrus Perfume', 'Unisex', 'Spray', 'Essential Oils', 'Fresh Fragrance', 60, 'India', 799);
(4,'Oriental Perfume','unisex','bar','honey','Natural_ingredients',60,'India',599),
(5,'Fresh Aquatic Perfume','unisex','bar','honey','Natural_ingredients',60,'India',599),
(6,'Gourmand Perfume','unisex','bar','honey','Natural_ingredients',60,'India',599);
CREATE TABLE address (
address_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
plot_no INT NOT NULL,
street_address VARCHAR(50) NOT NULL,
area VARCHAR(50) NOT NULL,
state VARCHAR(50) NOT NULL,
pincode INT NOT NULL,
country VARCHAR(20) NOT NULL,
FOREIGN KEY (user_id) REFERENCES customerdetails(user_id)
);
CREATE TABLE orders (
order_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
product_id INT,
order_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
quantity INT,
address VARCHAR(100),
FOREIGN KEY (user_id) REFERENCES customerdetails(user_id),
FOREIGN KEY (product_id) REFERENCES product(product_id)
);
CREATE TABLE cart (
cart_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
product_id INT,
quantity INT DEFAULT 1,
added_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES customerdetails(user_id),
FOREIGN KEY (product_id) REFERENCES product(product_id)
);Navigate to the project directory and install the required dependencies:
pip install -r requirements.txtStart the Flask application using:
python app.py