Skip to content

iamdeveloperrayhan/django-ecommerce-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Django E-Commerce Website

Modern β€’ Responsive β€’ Secure β€’ Full Stack Django Project


πŸ›οΈ Project Overview

Welcome to my Django E-Commerce Website.

This project is a complete Full Stack E-Commerce Web Application built using the Django Framework with a modern, responsive, and user-friendly interface.

The application allows customers to browse products, add items to their shopping cart, place secure orders, complete online payments through Stripe, and manage their accounts with ease.

The project follows a modular Django architecture by separating functionalities into multiple reusable apps, making the code clean, scalable, and easy to maintain.

Every sensitive configuration such as API Keys, Database Credentials, and Django Secret Keys are securely managed using a .env file.


✨ Project Highlights

  • πŸ›’ Complete E-Commerce Solution
  • πŸ‘€ User Authentication System
  • πŸ’³ Stripe Payment Gateway
  • 🐘 PostgreSQL Database
  • πŸ“± Responsive Design (Optimized up to 1200px)
  • ⭐ Product Review System
  • πŸ›οΈ Shopping Cart
  • πŸ“¦ Order Management
  • πŸ” Secure Environment Variables (.env)
  • 🌱 Database Seeder (seed.py)
  • πŸ–ΌοΈ Product Image Upload
  • 🎨 Modern UI/UX Design
  • ⚑ Fast and Clean Django Architecture

πŸš€ Features

πŸ‘€ Authentication

  • User Registration
  • Secure Login
  • Logout
  • User Profile
  • Password Protection

πŸ›οΈ Product System

  • Product Listing
  • Product Details
  • Product Images
  • Product Categories
  • Product Reviews
  • Related Products

πŸ›’ Shopping Cart

  • Add to Cart
  • Remove Cart Items
  • Update Quantity
  • Dynamic Cart Total

πŸ’³ Payment

  • Stripe Payment Integration
  • Secure Checkout
  • Order Confirmation

⭐ Reviews

  • Product Ratings
  • Customer Reviews

πŸ“¦ Orders

  • Order Placement
  • Order Summary
  • Checkout Process

🎨 User Experience

  • Modern Design
  • Responsive Layout
  • Beautiful Animations
  • Clean Interface
  • Easy Navigation

πŸ› οΈ Built With

Backend

  • Python
  • Django Framework

Frontend

  • HTML5
  • CSS3
  • Bootstrap 5
  • JavaScript
  • jQuery

Database

  • PostgreSQL

Payment Gateway

  • Stripe

Icons

  • Font Awesome
  • Line Icons

Fonts

  • Google Fonts

Image Processing

  • Pillow

Environment Variables

  • Python-dotenv (.env)

πŸ“š Django Applications

This project follows a modular Django architecture.

App Description
πŸ‘€ Accounts User Authentication & Profiles
πŸ›οΈ Products Product Management
πŸ›’ Carts Shopping Cart
πŸ“¦ Orders Order Processing
πŸ’³ Payments Stripe Payment Integration
⭐ Reviews Customer Reviews
πŸ”„ Shared Shared Utilities & Common Components

🌟 Project Goals

The primary objective of this project is to build a modern E-Commerce platform that demonstrates real-world Django development practices.

The project focuses on:

βœ… Clean Code Structure

βœ… Scalable Django Architecture

βœ… Secure Authentication

βœ… Responsive UI

βœ… Beautiful User Experience

βœ… Database Design

βœ… Payment Integration

βœ… Production Ready Development


πŸ“– Table of Contents

  • Project Overview
  • Features
  • Tech Stack
  • Django Applications
  • Installation Guide
  • Requirements
  • Environment Variables
  • PostgreSQL Configuration
  • Stripe Configuration
  • Project Structure
  • Folder Structure
  • Media Files
  • Static Files
  • Responsive Design
  • Available Pages
  • Database Seeder
  • Screenshots
  • Future Improvements
  • License
  • Author

πŸ“Œ Note: This project is built for educational purposes and portfolio demonstration. It follows modern Django development practices and showcases a complete full-stack e-commerce workflow with authentication, cart management, order processing, payment integration, and responsive UI/UX design.


πŸš€ Installation Guide

Follow the steps below to run this project on your local machine.


πŸ“Œ Prerequisites

Before running this project, make sure the following software is installed on your computer.

Software Version
Python 3.11+ Recommended
Git Latest
PostgreSQL Latest
VS Code Recommended
pip Latest

🐍 Step 1 β€” Install Python

Download and install the latest version of Python from the official website.

πŸ”— https://www.python.org/downloads/

Important: During installation, make sure to check the box:

βœ… Add Python to PATH

After installation, verify it:

python --version

or

python3 --version

πŸ“₯ Step 2 β€” Install Git

Download Git from:

πŸ”— https://git-scm.com/downloads

Verify installation:

git --version

πŸ’» Step 3 β€” Install Visual Studio Code

Download VS Code:

πŸ”— https://code.visualstudio.com/

Recommended Extensions:

  • Python
  • Django
  • Pylance
  • GitLens
  • Bootstrap IntelliSense
  • HTML CSS Support

πŸ“‚ Step 4 β€” Clone the Repository

git clone https://github.com/iamdeveloperrayhan/Shopwise---eCommerce.git

Go inside the project folder.

cd Shopwise---eCommerce

πŸ“¦ Step 5 β€” Create Virtual Environment

Windows

python -m venv venv

Mac/Linux

python3 -m venv venv

▢️ Step 6 β€” Activate Virtual Environment

Windows

venv\Scripts\activate

macOS / Linux

source venv/bin/activate

After activation your terminal should look like:

(venv) C:\Project>

πŸ“₯ Step 7 β€” Install Required Packages

pip install -r requirements.txt

Verify installed packages

pip list

🐘 Step 8 β€” Install PostgreSQL

Download PostgreSQL:

πŸ”— https://www.postgresql.org/download/

During installation remember your:

  • Database Name
  • Username
  • Password
  • Port

Example

Database : ecommerce_db

Username : postgres

Password : ********

Port : 5432

πŸ” Step 9 β€” Configure Environment Variables

Create a file named

.env

Example:

SECRET_KEY=your_secret_key

DEBUG=True

DB_NAME=ecommerce_db

DB_USER=postgres

DB_PASSWORD=your_password

DB_HOST=localhost

DB_PORT=5432

STRIPE_PUBLIC_KEY=pk_test_xxxxxxxxxxxxxxxxxx

STRIPE_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxxx

Never upload your .env file to GitHub.


πŸ—„οΈ Step 10 β€” Apply Database Migrations

python manage.py makemigrations

Then

python manage.py migrate

πŸ‘€ Step 11 β€” Create Superuser

python manage.py createsuperuser

Enter

  • Username
  • Email
  • Password

🌱 Step 12 β€” Seed the Database

This project includes a seed.py file for generating sample data.

Run the seed file according to your project configuration.

Example:

python seed.py

▢️ Step 13 β€” Run Development Server

python manage.py runserver

Open your browser

http://127.0.0.1:8000/

πŸ’³ Stripe Configuration

This project uses Stripe as the payment gateway.

Create a free Stripe account.

πŸ”— https://dashboard.stripe.com/

Copy your:

  • Publishable Key

  • Secret Key

and place them inside the .env file.

Example

STRIPE_PUBLIC_KEY=pk_test_xxxxxxxxxxxxxxxxx

STRIPE_SECRET_KEY=sk_test_xxxxxxxxxxxxxxxxx

πŸ“ Media Files

Uploaded images are stored inside

media/

The project uses Pillow to process image uploads.


πŸ“‚ Static Files

All static resources are organized inside the static/ directory.

Including:

  • CSS
  • JavaScript
  • Bootstrap
  • Icons
  • Fonts
  • Images

⚠️ Important Notes

  • Keep your virtual environment activated while working.
  • Never push your .env file to GitHub.
  • Always install packages from requirements.txt.
  • PostgreSQL must be running before starting the Django server.
  • Stripe API keys should always remain private.
  • Product images require the Pillow package.
  • Make sure all migrations are applied before running the project.

βœ… Successfully Installed!

If everything is configured correctly, your project should now be running at:

http://127.0.0.1:8000/

πŸŽ‰ Congratulations! Your Django E-Commerce project is now ready for development.

πŸ“¦ Python Requirements

Install all required packages using the following command:

pip install -r requirements.txt

requirements.txt

Django>=4.2

Pillow

psycopg2-binary

python-dotenv

stripe

django-crispy-forms

crispy-bootstrap5

gunicorn

whitenoise

πŸ—οΈ Project Structure

Django-Ecommerce/
β”‚
β”œβ”€β”€ accounts/
β”‚
β”œβ”€β”€ carts/
β”‚
β”œβ”€β”€ products/
β”‚
β”œβ”€β”€ orders/
β”‚
β”œβ”€β”€ payments/
β”‚
β”œβ”€β”€ reviews/
β”‚
β”œβ”€β”€ shared/
β”‚
β”œβ”€β”€ media/
β”‚
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ javascript/
β”‚   β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ bootstrap/
β”‚   └── fonts/
β”‚
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ accounts/
β”‚   β”œβ”€β”€ carts/
β”‚   β”œβ”€β”€ products/
β”‚   β”œβ”€β”€ orders/
β”‚   β”œβ”€β”€ payments/
β”‚   β”œβ”€β”€ reviews/
β”‚   β”œβ”€β”€ shared/
β”‚   └── errors/
β”‚
β”œβ”€β”€ ecommerce/
β”‚
β”œβ”€β”€ .env
β”œβ”€β”€ .gitignore
β”œβ”€β”€ manage.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ seed.py
└── README.md

πŸ“‚ Django Applications

The project is divided into multiple reusable Django applications.

πŸ‘€ Accounts

Responsible for:

  • User Registration
  • Login
  • Logout
  • Profile
  • Authentication
  • User Information

πŸ›οΈ Products

Responsible for:

  • Product Listing
  • Product Details
  • Categories
  • Product Images
  • Product Information

πŸ›’ Carts

Responsible for:

  • Shopping Cart
  • Quantity Update
  • Remove Items
  • Total Calculation

πŸ“¦ Orders

Responsible for:

  • Checkout
  • Order Creation
  • Order History
  • Order Summary

πŸ’³ Payments

Responsible for:

  • Stripe Payment
  • Payment Verification
  • Secure Checkout

⭐ Reviews

Responsible for:

  • Product Ratings
  • Customer Reviews
  • Feedback System

πŸ”„ Shared

Contains common resources used throughout the project.

Examples:

  • Shared Views
  • Utilities
  • Common Context
  • Reusable Components

πŸ“± Responsive Design

This project has been carefully designed to provide an excellent user experience across different screen sizes.

Optimized for

βœ… Desktop

βœ… Laptop

βœ… Tablet

βœ… Large Mobile Devices

The UI is fully responsive and optimized up to:

1200px Screen Width

Bootstrap Grid System has been used extensively to create a flexible and responsive layout.


🎨 UI / UX

Special attention has been given to the user experience.

Highlights include:

  • Modern Layout
  • Clean Typography
  • Beautiful Color Combination
  • Smooth User Navigation
  • Consistent Design Language
  • Well Structured Components
  • Easy-to-use Interface
  • Interactive Buttons
  • Responsive Cards
  • Product Hover Effects
  • Attractive Hero Sections
  • Professional Footer Design

πŸ–ΌοΈ Image Management

Product images are handled using the Pillow package.

Uploaded images are stored inside the:

media/

directory.


🎯 Google Fonts

This project uses Google Fonts to improve typography and readability.

Fonts are loaded directly from Google's CDN.


🎨 Icons

The project uses:

  • Font Awesome
  • Line Icons

to provide a modern interface.


πŸ“„ Available Pages

This project currently contains 15+ pages, including:

  • 🏠 Home Page
  • πŸ›οΈ Product Page
  • πŸ“„ Product Details Page
  • πŸ” Search Page
  • πŸ›’ Shopping Cart
  • πŸ’³ Checkout Page
  • πŸ“¦ Order Page
  • πŸ‘€ User Profile
  • πŸ” Login Page
  • πŸ“ Registration Page
  • ⭐ Review Section
  • ❌ Custom 404 Error Page
  • πŸ“¬ Contact Section
  • πŸ“ƒ Terms & Policies
  • πŸ“± Responsive Navigation

…and several reusable shared templates.


πŸ” Security

Security has been considered throughout the project.

Features include:

  • Environment Variables (.env)
  • Hidden Secret Keys
  • Secure Stripe Keys
  • Django CSRF Protection
  • Secure Authentication
  • Protected User Sessions

Sensitive information is never hardcoded into the source code.


🌱 Database Seeder

A custom:

seed.py

file is included to quickly populate the database with sample data.

This helps developers test the application without manually creating products and records.


πŸ—„οΈ Database

The project uses:

PostgreSQL

Benefits:

  • Fast
  • Reliable
  • Production Ready
  • Highly Scalable
  • Secure
  • ACID Compliant

πŸš€ Why This Project?

This project was developed to demonstrate real-world Django development practices.

It showcases how to build a complete E-Commerce platform using a clean architecture and modern web technologies.

The project emphasizes:

βœ… Clean Code

βœ… Modular Architecture

βœ… Reusable Components

βœ… Responsive Design

βœ… Secure Development

βœ… Database Design

βœ… Payment Gateway Integration

βœ… User Experience

βœ… Scalable Project Structure


πŸ’‘ Development Philosophy

This project follows best practices for Django development:

  • Separation of Concerns
  • Reusable Django Apps
  • Organized Templates
  • Static & Media Management
  • Environment Variable Security
  • Clean Project Structure
  • Easy Maintenance
  • Future Scalability

❀️ This project is continuously being improved with new features, performance optimizations, and UI/UX enhancements.


πŸ“Έ Project Screenshots

Note: Add screenshots of your project here to showcase the user interface.

🏠 Home Page


πŸ›οΈ Product Page


πŸ“„ Product Details


πŸ›’ Shopping Cart


πŸ’³ Checkout


πŸ‘€ User Profile


🌍 Deployment

This project can be deployed on various cloud platforms, including:

  • Render
  • Railway
  • PythonAnywhere
  • DigitalOcean
  • VPS
  • AWS EC2

πŸš€ Future Improvements

The project is actively growing. Planned features include:

  • ❀️ Wishlist System
  • 🎟️ Coupon & Discount Management
  • πŸ“¦ Order Tracking
  • πŸ“§ Email Verification
  • πŸ”” Email Notifications
  • πŸ“± Progressive Web App (PWA)
  • 🌐 REST API
  • πŸ“Š Admin Dashboard Analytics
  • πŸ’¬ Live Chat Support
  • ❀️ Favorite Products
  • πŸ” Advanced Product Filters
  • 🌍 Multi-language Support
  • πŸ’± Multi-Currency Support
  • πŸ“± Mobile Application Integration

🎯 Key Features

Feature Status
User Authentication βœ…
Product Management βœ…
Shopping Cart βœ…
Stripe Payment βœ…
PostgreSQL βœ…
Product Reviews βœ…
Responsive Design βœ…
Modern UI/UX βœ…
Environment Variables (.env) βœ…
Media Upload βœ…
Bootstrap 5 βœ…
jQuery βœ…
Google Fonts βœ…
Font Awesome βœ…
Line Icons βœ…
Database Seeder βœ…

πŸ“ˆ Project Statistics

Information Details
Framework Django
Language Python
Database PostgreSQL
Payment Gateway Stripe
Responsive Yes (1200px Optimized)
Pages 15+
Django Apps 7
Authentication Django Authentication
Environment Variables .env
Image Processing Pillow

🀝 Contributing

Contributions are always welcome!

If you'd like to improve this project:

  1. Fork the repository
  2. Create your feature branch
git checkout -b feature/NewFeature
  1. Commit your changes
git commit -m "Add new feature"
  1. Push your branch
git push origin feature/NewFeature
  1. Open a Pull Request

πŸ› Report Issues

If you find any bugs or have suggestions, please create an Issue on GitHub.

Your feedback is greatly appreciated.


⭐ Support This Project

If you found this project useful, please consider giving it a ⭐ on GitHub.

It really helps and motivates future development.

⭐⭐⭐⭐⭐

Don't forget to Star this Repository!


πŸ“œ License

This project is released under the MIT License.

You are free to use, modify, and distribute this project for educational and personal purposes.


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

Developer Rayhan

Full Stack Django Developer

Passionate about building modern, responsive, and scalable web applications using Python and Django.


πŸ“¬ Contact

πŸ“§ Email

iamdeveloperrayhan@gmail.com

πŸ’Ό LinkedIn

https://linkedin.com/in/iamdeveloperrayhan

πŸ™ GitHub

https://github.com/iamdeveloperrayhan

πŸ™ Acknowledgements

Special thanks to the amazing open-source community and the creators of:

  • Python
  • Django
  • PostgreSQL
  • Bootstrap
  • Stripe
  • Font Awesome
  • Line Icons
  • Google Fonts

for providing incredible tools that made this project possible.


❀️ Thank You for Visiting!

If you enjoyed this project, don't forget to ⭐ Star the repository!



πŸš€ Happy Coding!

Releases

Packages

Contributors

Languages