Skip to content

About

Built a scalable full-stack e-commerce application using Django with secure user authentication, Razorpay integration, product catalog, shopping cart, wishlist, and responsive design.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

66 Commits

Folders and files

Repository files navigation

RUNE — Full-Stack Fashion E-Commerce Platform

A full-stack Django e-commerce web application for a fashion/clothing brand — built with product catalog management, cart & wishlist, Razorpay-powered checkout, cloud-hosted media, and a serverless deployment on Vercel.

Python Django JavaScript PostgreSQL Vercel Cloudinary License Contributions

Live Demo


📑 Table of Contents


🎯 Problem Statement

Independent fashion sellers and small clothing brands need a complete, working online storefront — not just a static catalog, but real cart management, wishlists, secure payments, and order tracking — without relying on expensive third-party platforms. RUNE is a from-scratch implementation of that full purchase flow, built to demonstrate a production-style e-commerce stack end to end.

👥 Target Users

  • Online shoppers browsing and purchasing clothing (dresses, tops, menswear, womenswear, accessories)
  • Recruiters and technical reviewers evaluating full-stack development capability
  • Developers looking for a reference Django + Cloudinary + Vercel deployment example

ℹ️ Project Info

Project Type Full Stack Web App
Current Status Deployed (Vercel) — actively maintained
Author @slashthose

🛠️ Tech Stack

Frontend

  • HTML5, CSS3 (custom, hand-built — no CSS framework)
  • Vanilla JavaScript (fetch API for async cart/wishlist actions)
  • Google Fonts (Fraunces + Inter)

Backend

  • Python 3.12
  • Django 6.0.7

Database

  • PostgreSQL, hosted on NeonDB (serverless Postgres)

Media & Static Assets

  • Cloudinary — persistent storage for user/product-uploaded images (django-cloudinary-storage)

Key Libraries

  • django-import-export — bulk CSV/Excel product import via Django admin
  • dj-database-url — Postgres connection parsing
  • psycopg2-binary — Postgres driver
  • python-dotenv — local environment variable loading
  • razorpay — payment gateway SDK
  • gunicorn — WSGI application server

Authentication

  • Django's built-in auth system, wired through a custom accounts app (registration, login, logout)

APIs Used

  • Razorpay Payment Gateway API
  • Cloudinary Media API

Deployment

  • Vercel (@vercel/python runtime)

Other Tools

  • Git & GitHub
  • Django Admin (product/category/customer/wishlist management)

✨ Features

  • 🔐 User registration, login, and logout
  • 🗂️ Product catalog organized by category (Tops, Dresses, Men, Women, Accessories, Shirts)
  • 🔍 Product search
  • 🖼️ Product detail pages with image gallery, size selection, and quantity stepper
  • 🛒 Add to Cart (async, no page reload)
  • ❤️ Add to Wishlist (async, no page reload)
  • 📦 Cart management — update quantity, remove items
  • 💳 Checkout flow with Razorpay payment integration and payment verification
  • 📬 Order placement, order confirmation, and order history
  • 🗃️ Django admin panel for managing products, categories, customers, and wishlists
  • 📤 Bulk product import/export via CSV/Excel (django-import-export)
  • ☁️ Cloud-hosted product images (Cloudinary) — persistent across deployments
  • 📱 Responsive layout

📁 Folder Structure

Fullstack-Project/
├── ecommerce/                  # Project root (Django BASE_DIR)
│   ├── ecommerce/              # Django config package
│   │   ├── settings.py
│   │   ├── urls.py
│   │   └── wsgi.py
│   ├── core/                   # Main app — products, categories, cart, wishlist, orders
│   ├── accounts/               # Custom auth app — login / register / logout
│   ├── templates/
│   │   └── core/
│   │       ├── index.html
│   │       ├── category.html
│   │       ├── product_detail.html
│   │       ├── cart.html
│   │       ├── wishlist.html
│   │       ├── checkout.html
│   │       ├── search_results.html
│   │       ├── order_confirmation.html
│   │       └── order_history.html
│   ├── static/
│   │   └── images/             # Design assets (banners, category thumbnails)
│   ├── media/                  # Local-only fallback — production uses Cloudinary
│   └── manage.py
├── requirements.txt
├── vercel.json
└── README.md

Note: adjust this tree if your actual app locations differ slightly — this reflects the structure as last confirmed during development.


⚙️ Installation

Prerequisites

  • Python 3.12+
  • Git
  • A PostgreSQL database (e.g. a free NeonDB project)
  • A free Cloudinary account
  • A Razorpay account (test mode keys are fine for development)

1. Clone the repository

git clone https://github.com/slashthose/Fullstack-Project.git
cd Fullstack-Project/ecommerce

2. Create and activate a virtual environment

python -m venv venv

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Configure environment variables

Create a .env file inside the ecommerce/ project folder (see Environment Variables below).

5. Run database migrations

python manage.py migrate

6. Create an admin user

python manage.py createsuperuser

7. Run the development server

python manage.py runserver

Visit http://127.0.0.1:8000/ to view the site, and http://127.0.0.1:8000/admin/ for the admin panel.


🔑 Environment Variables

Create a .env file with the following keys:

# Django
DJANGO_SECRET_KEY=
DJANGO_DEBUG=False
ALLOWED_HOSTS=localhost,127.0.0.1,.vercel.app

# Database (NeonDB / Postgres connection string)
DATABASE_URL=

# Cloudinary
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

# Razorpay
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=

⚠️ Never commit your .env file. Confirm it's listed in .gitignore. When deploying, these same variables must be added separately in your hosting platform's environment variables settings — .env files are not deployed with your code.


📖 Usage

  1. Browse the homepage to explore featured categories and collections.
  2. Click into a category (e.g. Dresses, Men, Women) to view the filtered product grid.
  3. Click a product to open its detail page — view images, select a size, choose a quantity.
  4. Add the item to your cart or wishlist.
  5. Register or log in to proceed to checkout.
  6. Review your cart, proceed to checkout, and complete payment via Razorpay.
  7. View your order confirmation, and track past orders from your order history page.
  8. Store admins can log into /admin/ to add, edit, or bulk-import products and categories.

🖼️ Screenshots

Landing Page Landing Page

Category Page Category Page

Order Detail Page Order Detail

Cart Cart

Checkout Checkout


🔌 API Documentation

All endpoints below are server-rendered Django views; the cart/wishlist endpoints are called asynchronously via fetch() and return JSON.

Method Endpoint Description Response
GET / Homepage HTML
GET /category/<category_name>/ Category product listing HTML
GET /product/<product_id>/ Product detail page HTML
GET /search/ Product search HTML
POST /cart/add/<product_id>/ Add item to cart { "cart_count": int }
POST /cart/update/<product_id>/ Update cart item quantity { "cart_count": int }
POST /cart/remove/<product_id>/ Remove item from cart { "cart_count": int }
GET /cart/ View cart HTML
POST /wishlist/add/<product_id>/ Add item to wishlist { "wishlist_count": int }
POST /wishlist/remove/<product_id>/ Remove item from wishlist { "wishlist_count": int }
GET /wishlist/ View wishlist HTML
GET/POST /checkout/ Checkout page HTML
POST /place-order/ Place an order JSON
POST /payment/verify/ Verify Razorpay payment JSON
GET /order/<order_id>/confirmation/ Order confirmation page HTML
GET /orders/ Order history HTML
GET /order/<order_id>/ Order detail HTML
GET/POST /accounts/user_login User login HTML
GET/POST /accounts/user_register User registration HTML
GET /accounts/user_logout User logout Redirect

All POST requests require a valid Django CSRF token, sent via the X-CSRFToken header.


⚡ Performance

  • Static design assets served via WhiteNoise with compression enabled
  • Product images served via Cloudinary's CDN, avoiding load on the app server entirely
  • Database connections use conn_max_age pooling via dj-database-url to reduce connection overhead on NeonDB

🧩 Challenges Faced

  • Silent storage misconfiguration: DEFAULT_FILE_STORAGE was removed in Django 5.1 in favor of the STORAGES dict — using the old setting caused uploads to silently fall back to local disk storage with no error raised, which took careful debugging to trace back to a Django version mismatch.
  • Ephemeral filesystem on serverless deployment: locally-stored media files don't persist across deployments on Vercel, requiring a move to Cloudinary for all user/product-uploaded images.
  • Static vs. media asset separation: design assets (category banners, hero images) needed to be served as static files rather than treated as media, requiring template and settings changes plus WhiteNoise configuration.
  • Serverless static file bundling: Vercel's Python runtime doesn't automatically run collectstatic, requiring WHITENOISE_USE_FINDERS and explicit includeFiles configuration in vercel.json.
  • Nested project directory structure: a doubly-nested ecommerce/ecommerce/ layout made BASE_DIR-relative paths (and vercel.json build paths) easy to misconfigure.

🚀 Future Improvements

  1. Add product reviews and ratings
  2. Add product filtering by price, size, and color
  3. Add pagination for large category listings
  4. Add email notifications for order confirmation and shipping updates
  5. Add a "recently viewed products" section
  6. Add discount codes / coupon support
  7. Add guest checkout (without requiring account registration)
  8. Add multi-image zoom/lightbox on product detail pages
  9. Add an inventory low-stock warning system in admin
  10. Add order status tracking (processing, shipped, delivered)
  11. Add a returns/refund request flow
  12. Add unit and integration test coverage
  13. Add caching (e.g. Redis) for category and product listing pages
  14. Add a recommendation engine for related products
  15. Add multi-currency support
  16. Add a mobile app or PWA version
  17. Add analytics dashboard for admin (sales, top products, traffic)

🧪 Testing

  • Manual Testing: All core flows (browsing, cart, wishlist, checkout, payment, order history) have been manually tested across the development and deployed environments.
  • Unit Testing: Not yet implemented — planned as a future improvement using Django's TestCase framework.
  • Edge Cases: Verified behavior for empty cart/wishlist states, unauthenticated access to protected routes (redirects to login), and out-of-stock products.
  • Security Testing: CSRF protection verified on all state-changing endpoints; environment secrets kept out of version control.
  • Performance Testing: Not yet load-tested; recommended before scaling to production traffic.

🌍 Deployment

Currently deployed on Vercel using the @vercel/python runtime.

{
  "builds": [
    {
      "src": "ecommerce/ecommerce/wsgi.py",
      "use": "@vercel/python",
      "config": { "includeFiles": ["ecommerce/static/**"] }
    }
  ],
  "routes": [
    { "src": "/(.*)", "dest": "ecommerce/ecommerce/wsgi.py" }
  ]
}

Remember to set all environment variables directly in your hosting platform's dashboard — they are not read from a committed .env file.

Other deployment options this project could be adapted for:

  • Render / Railway — persistent filesystem, simpler static file handling
  • Docker — containerized deployment for any cloud provider
  • AWS / Azure / Google Cloud — for larger-scale production hosting

🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes and commit: git commit -m "Add your feature"
  4. Push to your fork: git push origin feature/your-feature-name
  5. Open a Pull Request describing your changes

Please open an issue first for major changes so we can discuss the approach.


📄 License

This project is licensed under the MIT License.

MIT License

Copyright (c) 2026 Sakshi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

🙏 Acknowledgements



Built with 🖤 by Sakshi

About

Built a scalable full-stack e-commerce application using Django with secure user authentication, Razorpay integration, product catalog, shopping cart, wishlist, and responsive design.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages