Fashion_Mart

πŸ›οΈ Fashion Mart

A full-stack web application for managing a modern fashion retail store, built with Flask (Python) and MySQL.

πŸ“‹ Overview

Fashion Mart Management System is a comprehensive digital platform that automates core retail operations including:

✨ Implemented Features

1. Product View Feature βœ…

2. Order Management Feature βœ…

3. Payment Status Tracking βœ…

4. Delivery Management βœ…

5. Delivery Charge System βœ…

πŸ› οΈ Technologies Used

πŸ“ Project Structure

Fashion mart/
β”œβ”€β”€ app.py                      # Main Flask application
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ .env.example               # Environment variables template
β”œβ”€β”€ .gitignore                 # Git ignore rules
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ schema.sql             # Database schema and sample data
β”‚   └── db_config.py           # Database configuration
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css          # Main stylesheet
β”‚   └── js/
β”‚       └── main.js            # JavaScript utilities
└── templates/
    β”œβ”€β”€ base.html              # Base template
    β”œβ”€β”€ index.html             # Homepage
    β”œβ”€β”€ login.html             # Login page
    β”œβ”€β”€ register.html          # Registration page
    β”œβ”€β”€ products.html          # Product catalog
    β”œβ”€β”€ product_detail.html    # Product details
    β”œβ”€β”€ cart.html              # Shopping cart
    β”œβ”€β”€ checkout.html          # Checkout page
    β”œβ”€β”€ orders.html            # Order history
    └── order_detail.html      # Order details

πŸš€ Installation & Setup

Prerequisites

Step 1: Clone or Navigate to Project

cd "/home/tahmid/Documents/Fashion mart"

Step 2: Create Virtual Environment

python3 -m venv venv
source venv/bin/activate  # On Linux/Mac
# OR
venv\Scripts\activate  # On Windows

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Configure Environment Variables

cp .env.example .env

Edit .env file with your MySQL credentials:

MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=your_mysql_password
MYSQL_DB=fashion_mart
MYSQL_PORT=3306

SECRET_KEY=your-secret-key-here
FLASK_ENV=development

Step 5: Setup Database

Option A: Using MySQL Command Line

mysql -u root -p < database/schema.sql

Option B: Using MySQL Workbench or phpMyAdmin

  1. Open MySQL Workbench/phpMyAdmin
  2. Import the database/schema.sql file
  3. Execute all queries

Option C: Using Python Script

Update the password in database/db_config.py and run:

python database/db_config.py

Step 6: Update Database Credentials in app.py

Edit app.py and update the DB_CONFIG dictionary with your MySQL password:

DB_CONFIG = {
    'host': 'localhost',
    'user': 'root',
    'passwd': 'your_mysql_password',  # Update this
    'db': 'fashion_mart',
    'charset': 'utf8mb4'
}

Step 7: Run the Application

python app.py

The application will be available at: http://localhost:5000

πŸ“Š Database Schema

Core Tables

Customer

Product

Order

OrderItem

Delivery

DeliveryMan

Admin

Review

Payment (Structure ready for future implementation)

Dealer (Structure ready for future implementation)

Ranking (Structure ready for future implementation)

🎯 Usage Guide

For Customers

  1. Registration
    • Click β€œRegister” in navigation
    • Fill in username, password, name, email
    • Optionally add address details
    • Submit to create account
  2. Login
    • Click β€œLogin” in navigation
    • Enter username and password
    • Access personalized features
  3. Browse Products
    • Visit β€œProducts” page
    • Use search bar to find specific items
    • Filter by category using dropdown
    • Click on product cards for details
  4. Add to Cart
    • Click β€œAdd to Cart” on product cards
    • Or select quantity on product detail page
    • View cart icon for item count
  5. Place Order
    • Go to Shopping Cart
    • Review items and quantities
    • Proceed to Checkout
    • Confirm order placement
  6. Track Orders
    • Visit β€œMy Orders” page
    • View order history and payment status
    • Click order for detailed tracking

For Delivery Personnel

  1. Login
    • Visit /delivery/login
    • Use delivery man credentials
  2. Manage Deliveries
    • View assigned orders
    • Mark orders as delivered
    • Confirm cash received (for COD orders)

For Administrators

  1. Login
    • Visit /admin/login
    • Use admin credentials
  2. View Dashboard
    • Monitor orders and customers
    • View sales statistics
    • Manage system operations

Default Test Accounts

Sample Customers (Password: password123 for all):

Admin Account:

Delivery Man Account:

πŸ”œ Future Enhancements (Not Yet Implemented)

The following features are planned for future development:

  1. Advanced Payment Features
    • Payment gateway integration (bKash, Nagad, Cards)
    • Digital payment receipts
    • Payment history tracking
  2. Enhanced Admin Dashboard
    • Product management (add, edit, delete with UI)
    • Advanced analytics and reports
    • Customer management tools
    • Inventory alerts and notifications
  3. Advanced Features
    • Product review submission (currently view-only)
    • Reward points redemption system
    • Email/SMS notifications
    • Product recommendations based on purchase history
    • Advanced search with multiple filters
    • Wishlist functionality
    • Order cancellation and returns
  4. Security Enhancements
    • Password hashing (bcrypt/scrypt)
    • CSRF protection
    • Enhanced input validation
    • Rate limiting for API endpoints
    • Two-factor authentication
  5. UI/UX Improvements
    • Image upload for products
    • Product image gallery
    • Enhanced mobile responsiveness
    • Dark mode
    • Real-time notifications
    • Progressive Web App (PWA) support

πŸ› Troubleshooting

Database Connection Error

Import Errors

Port Already in Use

MySQLdb Import Error

πŸ“ API Endpoints

Products

Cart

Orders

Delivery

Admin

Authentication

πŸ‘¨β€πŸ’» Development

Running in Development Mode

export FLASK_ENV=development  # Linux/Mac
set FLASK_ENV=development     # Windows
python app.py

Database Reset

To reset database with fresh sample data:

mysql -u root -p < database/schema.sql

πŸ“„ License

This project is developed for educational purposes.

🀝 Contributing

This is a learning project. Future features will be implemented based on requirements.

πŸ“§ Support

For issues or questions, please refer to the troubleshooting section above.


Built with ❀️ for Fashion Mart

Last Updated: November 10, 2025

πŸ“š Additional Documentation

For detailed technical documentation, see: