# ============================================================
# Backend Course — .env.example
# Copy this file to `.env` in each backend project root and fill.
# NEVER commit `.env` — only `.env.example`।
# ============================================================

# ---------- Common ----------
NODE_ENV=development
PORT=3000
LOG_LEVEL=debug
CORS_ORIGIN=http://localhost:5173

# ---------- JWT / Auth ----------
JWT_SECRET=change-me-to-a-long-random-string-min-32-chars
JWT_EXPIRES_IN=7d
BCRYPT_SALT_ROUNDS=10

# ---------- MySQL (Node/Prisma & Spring Boot) ----------
DATABASE_URL="mysql://root:root@localhost:3306/appdb"
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_DATABASE=appdb

# ---------- PostgreSQL ----------
POSTGRES_URL="postgresql://postgres:postgres@localhost:5432/appdb"

# ---------- MongoDB ----------
MONGO_URL="mongodb://localhost:27017/appdb"

# ---------- Redis (cache/queue) ----------
REDIS_URL="redis://localhost:6379"

# ---------- Python / FastAPI ----------
PY_PORT=8000
PY_DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/appdb"

# ---------- Java / Spring Boot ----------
SERVER_PORT=8080
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/appdb
SPRING_DATASOURCE_USERNAME=root
SPRING_DATASOURCE_PASSWORD=root

# ---------- Microservices ----------
GATEWAY_PORT=4000
ORDER_SERVICE_URL=http://localhost:4001
PAYMENT_SERVICE_URL=http://localhost:4002
NOTIFICATION_SERVICE_URL=http://localhost:4003
RABBITMQ_URL=amqp://guest:guest@localhost:5672
KAFKA_BROKERS=localhost:9092

# ---------- Object Storage (S3-compatible) ----------
S3_ENDPOINT=http://localhost:9000
S3_REGION=us-east-1
S3_ACCESS_KEY=minio
S3_SECRET_KEY=minio123
S3_BUCKET=uploads

# ---------- Payments (Stripe test) ----------
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx

# ---------- AI Gateway (optional) ----------
OPENAI_API_KEY=sk-xxx
EMBEDDING_MODEL=text-embedding-3-small