Skip to content

Commit ff72e00

Browse files
authored
Revise README for improved project documentation
Updated project overview, features, tech stack, and installation instructions in README.md for clarity and completeness.
1 parent 0264c89 commit ff72e00

File tree

1 file changed

+141
-114
lines changed

1 file changed

+141
-114
lines changed

README.md

Lines changed: 141 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,78 @@
11
# 🛒 Shopnow (E‑Kart) – Django E‑Commerce Web Application
22

3-
## 📌 Project Overview
3+
![Python Version](https://img.shields.io/badge/python-3.11-blue)
4+
![Django Version](https://img.shields.io/badge/django-5.1.4-green)
5+
![Database](https://img.shields.io/badge/database-MySQL-orange)
6+
![Payment Gateway](https://img.shields.io/badge/payments-Razorpay-blueviolet)
47

5-
**Shopnow (E‑Kart)** is a full‑stack e‑commerce web application built using **Django**. The project allows users to register, log in, browse products, add items to a cart, and place orders. It follows Django’s **MTV (Model‑Template‑View)** architecture and uses Bootstrap for responsive UI.
8+
**Shopnow (E‑Kart)** is a full‑stack, production-ready e‑commerce web application built using the **Django** framework. It provides a complete shopping experience, allowing users to register, log in, browse products by category, manage their shopping cart, and securely place orders using the Razorpay payment gateway.
69

7-
This project is designed as a **learning + production‑ready mini e‑commerce platform**, suitable for fresher interviews, real‑world demonstrations, and scalable deployment scenarios including online payments and order management.
10+
The project strictly adheres to Django’s **MTV (Model‑Template‑View)** architecture and uses Bootstrap 5 and Axios to deliver a responsive, dynamic frontend.
811

912
---
1013

11-
## 🚀 Features
1214

13-
### 👤 User Module
15+
## 🚀 Key Features
1416

15-
* User Registration
16-
* User Login & Logout
17-
* Forgot Password (Reset password manually)
18-
* Django Authentication System
17+
### 👤 User Management
18+
- Secure user registration, login, and logout.
19+
- Forgot Password functionality.
20+
- Dedicated user profile to view order history.
1921

20-
### 🛍️ Product Module
22+
### 🛍️ Product Catalog
23+
- Dynamic product listing with clear pricing and unit details.
24+
- Categorized browsing (Fruits, Vegetables, Groceries, etc.).
25+
- Image handling via Django Media.
26+
- Search functionality to quickly find products.
2127

22-
* Product listing with price & unit
23-
* Category‑wise products
24-
* Product images using Django Media
25-
* Dynamic product rendering
28+
### 🛒 Dynamic Cart System
29+
- AJAX-powered Add to Cart functionality (no page reloads).
30+
- Real-time cart quantity updates (+/- controls).
31+
- Automatic calculation of delivery and handling charges based on the cart total.
2632

27-
### 🛒 Cart Module
33+
### 💳 Secure Payments & Checkout
34+
- **Razorpay** payment gateway integration.
35+
- Secure online transaction handling and verification.
36+
- Order creation only upon successful payment verification.
2837

29-
* Add to cart functionality
30-
* Quantity management
31-
* Dynamic cart update (frontend‑based)
38+
### 📦 Order Tracking
39+
- Detailed order history accessible to users.
40+
- Order status tracking (Pending, Paid, Completed, etc.).
41+
- Admin capabilities to view and manage all orders.
3242

33-
### 💳 Payment Module (Razorpay)
3443

35-
* Razorpay payment gateway integration
36-
* Secure online payments
37-
* Payment verification and order confirmation
38-
39-
### 📦 Order Module
40-
41-
* Order creation after successful payment
42-
* Order history for users
43-
* Order status tracking
44+
---
4445

45-
### 🎨 UI / Frontend
46+
## 🧰 Tech Stack
4647

47-
* HTML5, CSS3
48-
* Bootstrap 5
49-
* Javascript
50-
* Responsive design
51-
* Reusable templates
48+
| Component | Technology |
49+
| :--- | :--- |
50+
| **Backend Framework** | Python 3.11, Django 5.1.4 |
51+
| **Frontend** | HTML5, CSS3, Bootstrap 5, JavaScript (Axios for AJAX) |
52+
| **Database** | MySQL (configured via `django-environ`) |
53+
| **Payment Gateway** | Razorpay API |
54+
| **Authentication** | Django Auth System |
5255

5356
---
5457

55-
## 🧰 Tech Stack
56-
57-
| Layer | Technology |
58-
| ------------ | -------------------------------- |
59-
| Backend | Python, Django |
60-
| Frontend | HTML, CSS, Bootstrap 5, JavaScript (Axios) |
61-
| Database | MySQL (used as primary database) |
62-
| Payments | Razorpay Payment Gateway |
63-
| Auth | Django Auth System |
64-
| Static Files | Django Static & Media |
58+
## 🧠 Architecture Used
6559

60+
- **MTV (Model-Template-View)**
61+
- AJAX-based client–server communication using **Axios**
62+
- REST-style Django views for cart & order actions
63+
- Separation of concerns between UI, logic, and data
64+
- Secure authentication & CSRF protection
65+
6666
---
6767

68+
6869
# 📁 Project Structure
6970

7071
```
7172
Shopnow/
7273
7374
├── apps/
74-
│ └── shop/
75+
│ └── shop/ # Core application (Models, Views, URLs, Forms)
7576
│ ├── __init__.py
7677
│ ├── admin.py
7778
│ ├── apps.py
@@ -86,7 +87,7 @@ Shopnow/
8687
│ └── templatetags/
8788
│ └── custom_tags.py
8889
89-
├── config/
90+
├── config/ # Django project configuration & settings
9091
│ ├── __init__.py
9192
│ ├── urls.py # Project routing
9293
│ ├── wsgi.py # WSGI entrypoint
@@ -102,134 +103,162 @@ Shopnow/
102103
│ └── media/
103104
│ └── images/
104105
105-
├── static/ # Static assets (CSS, JS, images)
106+
├── static/ # CSS, JavaScript (Axios logic), and UI assets
106107
107-
├── template/ # Global HTML templates
108+
├── template/ # Global HTML Templates (Bootstrap components)
108109
109110
├── .gitignore
110111
├── README.md
111112
├── manage.py # Django project launcher
112113
└── requirements.txt # Dependencies list
114+
113115
```
114116

117+
---
115118

116-
## 🔁 Project Flow (Step‑by‑Step)
119+
## ⚙️ Prerequisites
117120

118-
### 1️⃣ User Registration Flow
121+
Before you begin, ensure you have the following installed on your machine:
122+
- **Python 3.10+**
123+
- **MySQL Server** (Running locally or remotely)
124+
- **Git**
119125

120-
```
121-
User → Register Page → Form Validation → User Created → Redirect to Home
122-
```
126+
---
123127

124-
### 2️⃣ User Login Flow
128+
## 📦 Installation & Setup
125129

126-
```
127-
User → Login Page → Credentials Check → Session Created → Home Page
130+
### 1. Clone the repository
131+
132+
```bash
133+
git clone [https://github.com/Sairaj-25/django_shopnow.git](https://github.com/Sairaj-25/django_shopnow.git)
134+
cd django_shopnow
128135
```
129136

130-
### 3️⃣ Browse Products Flow
137+
### 2. Set up a Virtual Environment
138+
- Isolate your project dependencies:
131139

140+
```bash
141+
python -m venv venv
132142
```
133-
User → Home Page → Product List → Product Card → Price & Unit Display
143+
- Windows
144+
```
145+
venv\Scripts\activate
134146
```
135147

136-
### 4️⃣ Add to Cart Flow
137-
148+
- macOS / Linux
138149
```
139-
User → Click Add to Cart → Product ID Captured → Cart Updated → Quantity Control
150+
source venv/bin/activate
140151
```
141152

142-
User → Click Add to Cart → Product ID Captured → Cart Updated → Quantity Control
153+
### 3. Install Dependencies
154+
```bash
155+
pip install -r requirements.txt
156+
```
157+
### 4. Configure Environment Variables
158+
- Create a .env file in the root directory (alongside manage.py) and add your database credentials and API keys:
143159

160+
161+
```
162+
# Django Settings
163+
DJANGO_SECRET_KEY="your-super-secret-django-key"
164+
DEBUG=True
165+
166+
# Database Configuration (MySQL)
167+
DB_NAME="your_db_name"
168+
DB_USER="root"
169+
DB_PASSWORD="your_db_password"
170+
DB_HOST="127.0.0.1"
171+
DB_PORT="3306"
172+
173+
# Razorpay API Keys
174+
RAZOR_KEY_ID="your_razorpay_key_id"
175+
RAZOR_KEY_SECRET="your_razorpay_key_secret"
144176
```
145177

146-
### 5️⃣ Payment & Order Flow
178+
### 5. Create Database
179+
- Make sure you create the corresponding MySQL database (DB_NAME) on your MySQL server before running migrations.
180+
```
181+
CREATE DATABASE your_db_name;
147182
```
148183

149-
User → Checkout → Razorpay Payment → Payment Verification → Order Created → Order History Updated (MySQL)
184+
### 6. Apply Migrations
185+
- Initialize the database and apply the schema:
150186

187+
```bash
188+
python manage.py makemigrations
189+
```
190+
```bash
191+
python manage.py migrate
192+
```
193+
### 7. Create a Superuser (Admin)
194+
```bash
195+
python manage.py createsuperuser
151196
```
152197

153-
### 6️⃣ Logout Flow
198+
### 8. Run the Development Server
199+
200+
```bash
201+
python manage.py runserver
202+
```
203+
```
204+
Open your browser and navigate to: http://127.0.0.1:8000/
154205
```
155206

156-
User → Logout → Session Destroyed → Redirect to Home
157207

158-
````
208+
## 🔐 Admin Panel
209+
- Access the Django admin dashboard at:
210+
```
211+
http://127.0.0.1:8000/admin/
212+
```
159213

160-
---
214+
- From here, you can:
161215

162-
## 🧠 Architecture Used
216+
- Add and manage Products & Categories.
163217

164-
- **MTV (Model-Template-View)**
165-
- AJAX-based client–server communication using **Axios**
166-
- REST-style Django views for cart & order actions
167-
- Separation of concerns between UI, logic, and data
168-
- Secure authentication & CSRF protection
218+
- Monitor incoming Orders and Payments.
169219

220+
- Manage Users and Customers.
170221

171222
---
172223

173-
### ⚙️ How to Run the Project
174-
175-
### 1️⃣ Clone or Extract Project
176-
```bash
177-
git clone <repository-url>
178-
cd E-Kart/Shopnow
179224

180-
````
225+
## 🔁 Project Flow (Step‑by‑Step)
181226

182-
### 2️⃣ Activate Virtual Environment
227+
### 1️⃣ User Registration Flow
183228

184-
```bash
185-
env\Scripts\activate # Windows
186-
source env/bin/activate # Linux/Mac
187229
```
188-
189-
### 3️⃣ Install Dependencies
190-
191-
```bash
192-
pip install django
230+
User → Register Page → Form Validation → User Created → Redirect to Home
193231
```
194232

195-
### 4️⃣ Run Migrations
233+
### 2️⃣ User Login Flow
196234

197-
```bash
198-
python manage.py migrate
199235
```
200-
201-
### 5️⃣ Create Superuser
202-
203-
```bash
204-
python manage.py createsuperuser
236+
User → Login Page → Credentials Check → Session Created → Home Page
205237
```
206238

207-
### 6️⃣ Start Server
239+
### 3️⃣ Browse Products Flow
208240

209-
```bash
210-
python manage.py runserver
241+
```
242+
User → Home Page → Product List → Product Card → Price & Unit Display
211243
```
212244

213-
Open browser:
245+
### 4️⃣ Add to Cart Flow
214246

215247
```
216-
http://127.0.0.1:8000/
248+
User → Click Add to Cart → Product ID Captured → Cart Updated → Quantity Control
217249
```
218250

219-
---
220-
221-
## 🔐 Admin Panel
251+
### 5️⃣ Payment & Order Flow
222252

223253
```
224-
http://127.0.0.1:8000/admin/
254+
User → Checkout → Razorpay Payment → Payment Verification → Order Created → Order History Updated (MySQL)
225255
```
226256

227-
Admin can:
228-
229-
* Add products
230-
* Manage users
231-
* Manage categories
257+
### 6️⃣ Logout Flow
232258

259+
```
260+
User → Logout → Session Destroyed → Redirect to Home
261+
```
233262
---
234263

235264
## 📈 Future Enhancements
@@ -247,6 +276,4 @@ Admin can:
247276

248277
**Sairaj Jadhav**
249278

250-
251279
---
252-

0 commit comments

Comments
 (0)