Loading repository dataβ¦
Loading repository dataβ¦
Abdulazizovv / repository
π Django REST Framework e-commerce backend with JWT authentication, advanced admin panel, sequential order management, and optimized database performance. Production-ready with Docker support.
Professional Django REST Framework e-commerce backend with comprehensive admin management system and JWT authentication.
ecommerce/
βββ apps/
β βββ api/ # API configuration
β βββ cart/ # Shopping cart functionality
β βββ category/ # Product categories
β βββ order/ # Order management
β βββ product/ # Product catalog
β βββ users/ # User management
βββ core/ # Project settings
βββ media/ # User uploaded files
βββ static/ # Static files
βββ nginx/ # Nginx configuration
βββ docker-compose.yml # Docker services
βββ Dockerfile # Docker image
βββ requirements.txt # Python dependencies
git clone https://github.com/Abdulazizovv/ecommerce.git
cd ecommerce
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
venv\Scripts\activate # Windows
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your database credentials
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
docker-compose up --build
docker-compose exec web python manage.py createsuperuser
POST /api/auth/login/ # User login
POST /api/auth/register/ # User registration
POST /api/auth/refresh/ # Refresh token
POST /api/auth/logout/ # User logout
GET /api/products/ # List products
POST /api/products/ # Create product
GET /api/products/{id}/ # Product details
PUT /api/products/{id}/ # Update product
DELETE /api/products/{id}/ # Delete product
GET /api/orders/ # List user orders
POST /api/orders/ # Create order
GET /api/orders/{id}/ # Order details
PUT /api/orders/{id}/ # Update order
GET /api/categories/ # List categories
POST /api/categories/ # Create category
GET /api/categories/{id}/ # Category details
GET /api/cart/ # Get cart items
POST /api/cart/add/ # Add to cart
PUT /api/cart/update/ # Update cart item
DELETE /api/cart/remove/ # Remove from cart
Access the admin panel at /admin/ with superuser credentials.
Optimized indexes for:
Run tests with:
python manage.py test
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
# JWT Settings
JWT_SECRET_KEY=your-secret-key
JWT_ACCESS_TOKEN_LIFETIME=60 # minutes
JWT_REFRESH_TOKEN_LIFETIME=7 # days
# Django Settings
DEBUG=False
SECRET_KEY=your-django-secret-key
ALLOWED_HOSTS=localhost,127.0.0.1
# Media Files
MEDIA_URL=/media/
STATIC_URL=/static/
DEBUG=FalseALLOWED_HOSTSdocker-compose -f docker-compose.prod.yml up -d
git checkout -b feature/AmazingFeature)git commit -m 'Add AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
Abdulazizov
Built with β€οΈ using Django REST Framework