Skip to content

SubhojitGuin/Ecommerce_Django_API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Django REST API

This is an E-Commerce API built with Django and Django REST framework. It provides endpoints for managing users and products.

Table of Contents

Features

  • User management (registration, login, wishlist, cart, etc.)
  • Product management (CRUD operations - product details, reviews)
  • Order management (CRUD operations)
  • Payment gateway integration (Stripe)
  • Authentication and Authorization (using Django's built-in auth system)
  • API documentation with Swagger UI and ReDoc

Installation

Prerequisites

  • Python 3.6+
  • Django 3.0+
  • Django REST framework
  • drf_yasg for API documentation

Setup

  1. Clone the repository:

    git clone https://github.com/SubhojitGuin/Ecommerce_Django_API.git
    cd Ecommerce_Django_API
  2. Create a virtual environment

    python -m venv .venv
    .\.venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Change the directory

    cd Ecommerce
  5. Apply migrations:

    python manage.py migrate
  6. Create a superuser:

    python manage.py createsuperuser

    Now add your credentials and save it.

  7. Create the .env file Create a .env file in Ecommerce\Ecommerce folder an copy the format from .env.sample i.e.:

    STRIPE_SECRET_KEY=your_stripe_secret_key
    STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
    TAX=tax_rate

    To get your stripe keys, click here.

  8. Run the development server:

    python manage.py runserver 8080

Usage

Access the Admin Panel

Access the admin panel at http://localhost:8000/admin/ using the superuser credentials.

admin page

Access the API Documentation

  • Swagger UI: http://localhost:8000/swagger/
  • ReDoc: http://localhost:8000/redoc/

api documentation

API Endpoints

Order API

order api

Payment API

payment api

Product API

product api

User API

user api

For more details, check the API documentation.

License

This project is licensed under the MIT License. See the 🎗️LICENSE file for details.

Contributors

Django E-commerce REST API contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%