This is a full-stack e-commerce application built using Django and React. It allows users to browse and purchase products, manage their shopping cart, checkout using Stripe, create accounts, manage orders, apply coupons, and more.
-
Product Catalog:
- View a list of products with details.
- Filter products by size, category, and price range.
-
Shopping Cart:
- Add products to the cart.
- Specify quantities and select sizes if required.
- Edit cart items, including quantity and size.
- Remove items from the cart.
-
User Accounts:
- Create an account during checkout.
- Log in with existing accounts.
- Change passwords for logged-in users.
- Manage billing and shipping addresses.
-
Checkout:
- Securely checkout and pay with Stripe.
- Choose different billing and shipping addresses or use the same for both.
-
Order History:
- View order history for logged-in users.
-
Coupons:
- Apply coupons to orders and get discounts.
-
Guest Cart:
- Users can add items to the cart without creating an account.
- Clone the repository:
git clone https://github.com/IgweDaniel/urbanWear.git
- Navigate to the project directory:
cd <cloned-folder-name>
- Install Python dependencies using Poetry:
poetry install
- Install Node.js dependencies for the React frontend:
cd client && npm install
-
Set up your Django settings:
- Create a
.env
file from the provided.env.example
and configure your environment variables such asSECRET_KEY
,DEBUG
,DATABASE_URL
, andSTRIPE_SECRET_KEY
. - Run Django migrations:
python manage.py migrate
- Create a
-
Seed the Database (Optional):
- If you want to populate the database with default products and sizes, run the seed function:
python manage.py seed data.json
- If you want to populate the database with default products and sizes, run the seed function:
-
Media Storage Configuration:
- The project supports two media storage options based on the
DEBUG
environment variable:- If
DEBUG
is set toTrue
, media files are stored locally using file storage. - If
DEBUG
is set toFalse
, media files are stored on Cloudinary using django-cloudinary-storage.
- If
- The project supports two media storage options based on the
-
Build the React frontend:
- In the
frontend
directory, runnpm run build
.
- In the
-
Start the Django development server:
python manage.py runserver
-
Access the application in your web browser at
http://localhost:8000
.
- Django with Django Rest Framework
- PostgreSQL database
- Redux Toolkit for state management
- Styled Components for styling
- Axios for making HTTP requests
- Formik for form handling
- React-Query for data fetching and synchronization
- Stripe for payment processing