Skip to content

Repository files navigation

Discount E-commerce API

A Django REST Framework-based e-commerce backend that supports:

  • User authentication (JWT, registration, login, roles)
  • Product management (internal/external, categories, tags, images, variants, reviews)
  • Cart and cart item management
  • Bulk upload (JSON/CSV) for products, categories, tags
  • Filtering, search, ordering, and more

Getting Started

1. Clone the Repository

git clone <your-repo-url>
cd discount-ecommerce-api

2. Set Up Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Set Up Environment Variables

  • Copy sample_env to .env and fill in your secrets/configuration:
cp sample_env .env
  • Edit .env as needed (see sample_env for required variables).

5. Run Migrations

python manage.py makemigrations
python manage.py migrate

6. Create a Superuser (for admin access)

python manage.py createsuperuser

7. Start the Development Server

python manage.py runserver

8. Access the API

Features

  • JWT authentication with roles (customer, seller, manager, admin)
  • Product, category, tag, image, variant, review management
  • Cart and cart item management (one cart per user)
  • Bulk upload (JSON/CSV) for products, categories, tags
  • Filtering, search, ordering on all major endpoints
  • Admin dashboards for all models

Contributing

Pull requests are welcome! Please open an issue first to discuss major changes.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages