Skip to content

Full-featured Django web app for online auctions, built as part of CS50W. Users can create listings, place bids, comment, manage watchlists, and close auctions. Includes admin panel, notifications, pagination, and category filtering.

License

Notifications You must be signed in to change notification settings

Wesleykyle2005/Commerce-Web50

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 Commerce Web50 — CS50W Project Solution

🗪 README.md en español: README_ES.md

Commerce Web50, a full-featured implementation of the online auction project inspired by eBay, developed as part of CS50’s Web Programming with Python and JavaScript. This solution is built using Django and fulfills all the specifications outlined in the original assignment.


📸 Screenshots

  • Active Listings Active Listings

  • Create New Listing Create Listing

  • View Listing View Listing

  • Watchlist Watchlist


🧾 Overview

This platform allows users to:

  • Create auctions with title, description, starting price, optional image, and optional category.
  • Place bids in real time, with validation to ensure bids are higher than the current maximum.
  • Post public comments on listings.
  • Add or remove listings from a personal watchlist.
  • Close their own auctions, automatically notifying the winner if any.
  • Receive in-app notifications relevant to their activity.
  • Filter and browse active auctions by category.

⚙️ Project Setup

1. Clone the repository

git clone https://github.com/Wesleykyle2005/Commerce-Web50.git
cd Commerce-Web50

2. Install dependencies

pip install django

3. Apply database migrations

python manage.py makemigrations
python manage.py migrate

4. Insert demo data

python make_insertions.py

This script generates:

  • 30 user accounts

  • 30 categories

  • 30 listings with predefined bids and comments

  • Superuser credentials:

    • Username: Admin1234
    • Password: Admin1234

5. Run the development server

python manage.py runserver

Access via: http://127.0.0.1:8000


📐 Implementation Details

  • Custom models:

    • User (extends AbstractUser), Auction, Bid, Comment, Category
  • Auction creation form:

    • Supports title, description, starting bid, optional image upload, and category selection.
  • Active listings:

    • Home page shows all currently open auctions.
  • Auction detail view:

    • Enables bidding, commenting, managing watchlist, and auction closure (by owner only).
  • Watchlist:

    • Per-user view to track listings of interest.
  • Category navigation:

    • Allows filtering of open listings by category.
  • Admin panel:

    • Full Django admin support at /admin, accessible via the provided superuser.

🛠️ Technical Considerations

  • Sensitive routes are protected using the @login_required decorator.
  • Notifications are implemented via Django’s user messaging framework.
  • Pagination is included to ensure performance at scale.
  • Class-based views and model inheritance are employed to keep the project modular and extensible.

🔗 Quick Access

  • Admin interface: http://127.0.0.1:8000/admin Use the superuser credentials provided above.

  • Key features summary:

    • Registered users can create auctions, place bids, and close their own listings.
    • Bids are only accepted if they exceed the current highest offer.
    • Real-time notifications are shown in the navigation bar.
    • Listings can be added to or removed from a personal watchlist.
    • Only the listing creator is allowed to close the auction manually.

About

Full-featured Django web app for online auctions, built as part of CS50W. Users can create listings, place bids, comment, manage watchlists, and close auctions. Includes admin panel, notifications, pagination, and category filtering.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published