data seed feature for demo and prod

This commit is contained in:
2025-11-15 20:57:39 +01:00
parent 41439eed09
commit e3ed4a3295
17 changed files with 4574 additions and 1793 deletions

109
.env
View File

@@ -1,53 +1,104 @@
# .env.example
# =============================================================================
# ENVIRONMENT CONFIGURATION
# =============================================================================
DEBUG=True
# Project information
PROJECT_NAME=Ecommerce Backend API with Marketplace Support
DESCRIPTION=Advanced product management system with JWT authentication
VERSION=0.0.1
# =============================================================================
# PROJECT INFORMATION
# =============================================================================
PROJECT_NAME=Wizamart - Multi-Vendor Marketplace Platform
DESCRIPTION=Multi-tenants multi-themes ecommerce application
VERSION=2.2.0
# Database Configuration
# DATABASE_URL=postgresql://username:password@localhost:5432/wizamart_db
# For development, you can use SQLite:
# =============================================================================
# DATABASE CONFIGURATION
# =============================================================================
# For development (SQLite)
DATABASE_URL=sqlite:///./wizamart.db
# Documentation
# .env.development
DOCUMENTATION_URL=http://localhost:8001
# .env.production
# DOCUMENTATION_URL=https://yourdomain.com/docs
# .env.staging
# DOCUMENTATION_URL=https://staging-docs.yourdomain.com
# For production (PostgreSQL)
# DATABASE_URL=postgresql://username:password@localhost:5432/wizamart_db
# JWT Configuration
# =============================================================================
# ADMIN INITIALIZATION
# =============================================================================
# These are used by init_production.py to create the platform admin
# ⚠️ CHANGE THESE IN PRODUCTION!
ADMIN_EMAIL=admin@wizamart.com
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin123
ADMIN_FIRST_NAME=Platform
ADMIN_LAST_NAME=Administrator
# =============================================================================
# JWT CONFIGURATION
# =============================================================================
JWT_SECRET_KEY=your-super-secret-jwt-key-change-in-production
JWT_EXPIRE_HOURS=24
JWT_EXPIRE_MINUTES=30
# API Configuration
# =============================================================================
# API SERVER
# =============================================================================
API_HOST=0.0.0.0
API_PORT=8000
DEBUG=False
# Rate Limiting
# =============================================================================
# DOCUMENTATION
# =============================================================================
# Development
DOCUMENTATION_URL=http://localhost:8001
# Staging
# DOCUMENTATION_URL=https://staging-docs.wizamart.com
# Production
# DOCUMENTATION_URL=https://docs.wizamart.com
# =============================================================================
# RATE LIMITING
# =============================================================================
RATE_LIMIT_ENABLED=True
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=3600
# Logging
# =============================================================================
# LOGGING
# =============================================================================
LOG_LEVEL=DEBUG
LOG_FILE=log/app.log
LOG_FILE=logs/app.log
# Platform domain configuration
PLATFORM_DOMAIN=platform.com # Your main platform domain
# =============================================================================
# PLATFORM DOMAIN CONFIGURATION
# =============================================================================
# Your main platform domain
PLATFORM_DOMAIN=wizamart.com
# Custom domain features
ALLOW_CUSTOM_DOMAINS=True # Enable/disable custom domains
REQUIRE_DOMAIN_VERIFICATION=True # Require DNS verification
# Enable/disable custom domains
ALLOW_CUSTOM_DOMAINS=True
# Require DNS verification
REQUIRE_DOMAIN_VERIFICATION=True
# SSL/TLS configuration for custom domains
SSL_PROVIDER=letsencrypt # or "cloudflare", "manual"
AUTO_PROVISION_SSL=False # Set to True if using automated SSL
# SSL/TLS configuration
# "letsencrypt" or "cloudflare", "manual"
SSL_PROVIDER=letsencrypt
# Set to True if using automated SSL
AUTO_PROVISION_SSL=False
# DNS verification
DNS_VERIFICATION_PREFIX=_wizamart-verify
DNS_VERIFICATION_TTL=3600
DNS_VERIFICATION_TTL=3600
# =============================================================================
# PLATFORM LIMITS
# =============================================================================
MAX_VENDORS_PER_USER=5
MAX_TEAM_MEMBERS_PER_VENDOR=50
INVITATION_EXPIRY_DAYS=7
# =============================================================================
# DEMO/SEED DATA CONFIGURATION (Development only)
# =============================================================================
SEED_DEMO_VENDORS=3
SEED_CUSTOMERS_PER_VENDOR=15
SEED_PRODUCTS_PER_VENDOR=20
SEED_ORDERS_PER_VENDOR=10