Skip to content

πŸ›’ Open-source e-commerce backend built with Django & DRF β€” featuring vendor management, orders, payments, JWT auth, real-time notifications via WebSockets, and background tasks with Celery.

Notifications You must be signed in to change notification settings

nohan-ahmed/halum_hut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Halum Hut

License: MIT Python Django DRF

Halum Hut is a comprehensive e-commerce platform built with Django and Django REST Framework. It provides a robust backend API for managing vendors, products, orders, payments, and user accounts.

Features

  • User Authentication: JWT-based authentication with email verification
  • Vendor Management: Seller accounts, store profiles, and earnings tracking
  • Product Catalog: Categories, brands, products with variants and attributes
  • Shopping Cart: Cart management and wishlist functionality
  • Order Processing: Order creation, tracking, and management
  • Payment Integration: Support for Cash on Delivery (COD) with extensible payment methods
  • Notifications: Real-time notifications using Django Channels and WebSockets
  • Reviews: Product review and rating system

Documentation

Quick Example

# Authentication - Get JWT token
curl -X POST http://localhost:8000/accounts/api/login/ \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "yourpassword"}'

# Response
{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}

# Get products
curl -X GET http://localhost:8000/products/api/products/ \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."

Project Structure

halum_hut/ β”œβ”€β”€ accounts/ # User authentication and profile management β”œβ”€β”€ cart/ # Shopping cart and wishlist functionality β”œβ”€β”€ core/ # Core utilities and shared components β”œβ”€β”€ coupons/ # Discount coupons and promotions β”œβ”€β”€ docs/ # Documentation files β”œβ”€β”€ halum_hut/ # Project settings and configuration β”œβ”€β”€ inventory/ # Inventory management β”œβ”€β”€ notifications/ # Real-time notifications with WebSockets β”œβ”€β”€ orders/ # Order processing and management β”œβ”€β”€ products/ # Product catalog and management β”œβ”€β”€ reviews/ # Product reviews and ratings β”œβ”€β”€ vendors/ # Seller accounts and store management β”œβ”€β”€ .example.env # Example environment variables β”œβ”€β”€ docker-compose.yml # Docker configuration β”œβ”€β”€ Dockerfile # Docker build instructions β”œβ”€β”€ manage.py # Django management script └── requirements.txt # Python dependencies

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/halum_hut.git
    cd halum_hut
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Copy .example.env to .env and configure environment variables:

    cp .example.env .env
    # Edit .env with your settings
  5. Run migrations:

    python manage.py migrate
  6. Start the development server:

    python manage.py runserver
  7. For WebSocket support (notifications), run Daphne:

    daphne -p 8001 halum_hut.asgi:application

Docker Deployment

For production deployment using Docker:

# Build and start containers
docker-compose up -d
# Create superuser
docker-compose exec web python manage.py createsuperuser

Testing

Run the test suite:

python manage.py test

For coverage report:

coverage run --source='.' manage.py test
coverage report

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please read CONTRIBUTING.md for detailed guidelines.

Security

If you discover any security related issues, please email security@example.com instead of using the issue tracker.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Django and Django REST Framework communities
  • All contributors who have helped shape this project

About

πŸ›’ Open-source e-commerce backend built with Django & DRF β€” featuring vendor management, orders, payments, JWT auth, real-time notifications via WebSockets, and background tasks with Celery.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages