A simple and responsive E-Commerce web application built using Django, HTML, CSS, and JavaScript, allowing users to register, log in, browse products, add items to the cart, and place orders.
- Register, Login, and Logout system using Djangoβs built-in authentication.
- Session-based authentication with personalized greetings.
- User-specific shopping cart.
- Add, remove, and update item quantities (+ / - buttons).
- Real-time cart updates and total calculation.
- Persistent cart for logged-in users.
- View product listings with images, descriptions, and prices.
- Simple and responsive grid layout for all screen sizes.
- Supports product images like laptops and headphones.
- Checkout page for order details and confirmation.
- Simple order placement simulation.
- Clears cart automatically after order completion.
- Built completely with HTML5, CSS3, and Vanilla JavaScript β no Bootstrap or Tailwind.
- Clean and minimal UI with responsive layout.
- Separate pages for Login, Register, Cart, Checkout, and Home.
| Component | Technology |
|---|---|
| Backend | Django 5.2.7 |
| Frontend | HTML5, CSS3, JavaScript (ES6) |
| Database | SQLite |
| Authentication | Django Built-in Auth |
| Media Handling | Django Static & Media Management |
-
Clone the repository
git clone <repository-url> cd codeaplha_ecommerce
-
Create and activate virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run migrations
python manage.py makemigrations python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Start the development server
python manage.py runserver
-
Access the application
- Website: http://127.0.0.1:8000/
π Project Structure
ecommerce/
βββ customer_users/ # User authentication and home page
βββ shop_products/ # Product models and logic
βββ shop_cart/ # Cart and checkout functionality
βββ static/ # Static assets (CSS, JS, images)
βββ templates/ # HTML templates
βββ db.sqlite3 # Database file
βββ manage.py
βββ requirements.txt
π§ How It Works
1.User registers/logs in to access the platform.
2.Products are displayed on the homepage from the database.
3.Users can add items to their cart, adjust quantities, or remove them.
4.The cart total updates dynamically.
5.On checkout, users fill in details and confirm the order.
6.The thank-you page confirms successful order placement.
π§° Admin Panel
The Django Admin Dashboard provides powerful management tools:
Add and manage Products
Manage Users and Orders
Edit Product details and Prices
Access via: π http://127.0.0.1:8000/admin/
π¨βπ» Author
Muhammed Ismail Maaiz Built using Django, HTML, CSS, and JavaScript.