This is a full-stack e-commerce web application built using React for the frontend and Django for the backend. The application allows users to view products, add products to a shopping cart, edit the quantity of products in the cart, and remove products from the cart.
- Features
- Technologies Used
- Installation
- Usage
- API Endpoints
- Screenshots
- Contributing
- License
- Contact
- Display products from the database
- View detailed information about a product
- Add products to the shopping cart
- Edit the quantity of products in the cart
- Remove products from the cart
- React
- Axios (for API calls)
- Styled Components (for styling)
- Django
- Django REST Framework
- PostgreSQL (or any other database supported by Django)
- Node.js
- npm (or yarn)
- Python 3.x
- pip
- PostgreSQL (or any other database supported by Django)
-
Clone the repository:
git clone https://github.com/luornor/ecomerce.git cd ecomerce
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Configure the database in
settings.py
. -
Apply migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Clone the repository:
git clone https://github.com/luornor/jiji-web.git cd jiji-web
-
Install the dependencies:
npm install # or yarn install
-
Create a
.env
file and add your backend API URL:REACT_APP_API_URL=http://127.0.0.1:8000
-
Start the development server:
npm start # or yarn start
- Navigate to the frontend URL (usually
http://localhost:3000
). - Browse the products listed on the homepage.
- Click on a product to view its details.
- Add the product to the cart.
- Navigate to the cart to view, edit, or remove items.
GET /products/
- List all productsGET /products/:id/
- Retrieve a specific product
GET /cart/
- Retrieve the cart itemsPOST /cart/
- Add an item to the cartPUT /cart/:id/
- Update the quantity of a cart itemDELETE /cart/:id/
- Remove an item from the cart
Screenshot of the homepage listing products.
Screenshot of the product details page.
Screenshot of the shopping cart.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
This project is licensed under the MIT License.
Luornor Nathan Tettey - tetteynathan89@gmail.com
Project Link: https://github.com/luornor/jiji-web.git