Skip to content

guiklose/simple-e-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 eCommerce Fullstack Application – CS50w

A simple eCommerce application built with Django during the Harvard CS50w course.

📐 Specification

🧱 Models

this application have three models in addition to the built-in User model:

  1. Listing
  2. Bid
  3. Comment

🚀 Features

📝 Create Listing

  • Users can create new listings.
  • Required:
    • Title
    • Description (text-based)
    • Starting Bid
  • Optional:
    • Image URL
    • Category (e.g., Fashion, Toys, Electronics, Home, etc.)

📃 Active Listings Page

  • Default route.
  • Displays all currently active auction listings.
  • Each listing should include:
    • Title
    • Description
    • Current Price
    • Image (if available)

📄 Listing Page

When clicking on a listing:

  • Display all details:
    • Title, Description, Image, Starting Bid, and Current Price
  • If user is signed in:
    • ✅ Can add to Watchlist / remove from Watchlist
    • 💰 Can place a Bid
      • Bid must:
        • Be ≥ starting bid
        • Be > all previous bids
      • Otherwise, show an error
    • 🏁 If user is the creator, they can close the auction
      • Highest bidder becomes the winner
      • Listing is no longer active
    • 🎉 If the user won the closed auction, display a message
    • 💬 Can add comments
      • All comments are shown on the listing page

👁️ Watchlist

  • Signed-in users can view their Watchlist.
  • Displays all listings the user added.
  • Clicking a listing redirects to its page.

🧩 Categories

  • Users can visit a Categories page.
  • Lists all available listing categories.
  • Clicking a category shows all active listings in that category.

🔐 Django Admin Interface

Via Django Admin:

  • Admins can:
    • View / Add / Edit / Delete:
      • Listings
      • Bids
      • Comments

⚙️ Setup Instructions

Follow these steps to set up and run the Django project locally:

📁 1. Clone the Repository

git clone <https://github.com/guiklose/simple-e-commerce.git>
cd <simple-e-commerce>

🐍 2. Create and Activate a Virtual Environment

🔵 On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
🟢 On Windows (CMD):
python -m venv venv
venv\Scripts\activate

📦 3. Install Dependencies

pip install -r requirements.txt

🛠️ 4. Apply Migrations

python manage.py makemigrations
python manage.py migrate

👤 5. Create a Superuser (Optional, for Admin Interface)

python manage.py createsuperuser

🚀 6. Run the Development Server

python manage.py runserver

Open your browser and go to: http://127.0.0.1:8000/

About

A simple eCommerce application built with Django during the Harvard CS50w course.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published