The auth module fell back to a publicly-known secret string when JWT_SECRET was unset, creating a critical authentication bypass risk. Both jwt.strategy.ts and auth.module.ts now throw at startup if JWT_SECRET is missing. Co-Authored-By: Paperclip <noreply@paperclip.ing>
84 lines
3.0 KiB
Plaintext
84 lines
3.0 KiB
Plaintext
# =============================================================================
|
|
# GoodGo Platform — Environment Variables
|
|
# Copy this file to .env and update values for your local environment
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# PostgreSQL + PostGIS
|
|
# -----------------------------------------------------------------------------
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_NAME=goodgo
|
|
DB_USER=goodgo
|
|
DB_PASSWORD=goodgo_secret
|
|
DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?schema=public
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Redis
|
|
# -----------------------------------------------------------------------------
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6379
|
|
REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Typesense
|
|
# -----------------------------------------------------------------------------
|
|
TYPESENSE_HOST=localhost
|
|
TYPESENSE_PORT=8108
|
|
TYPESENSE_PROTOCOL=http
|
|
TYPESENSE_API_KEY=ts_dev_key_change_me
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# MinIO (S3-compatible Object Storage)
|
|
# -----------------------------------------------------------------------------
|
|
MINIO_ENDPOINT=localhost
|
|
MINIO_API_PORT=9000
|
|
MINIO_CONSOLE_PORT=9001
|
|
MINIO_USER=minioadmin
|
|
MINIO_PASSWORD=minioadmin_secret
|
|
MINIO_BUCKET=goodgo-media
|
|
MINIO_USE_SSL=false
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# NestJS API
|
|
# -----------------------------------------------------------------------------
|
|
API_PORT=3000
|
|
NODE_ENV=development
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# JWT / Auth (REQUIRED — app will not start without JWT_SECRET)
|
|
# -----------------------------------------------------------------------------
|
|
JWT_SECRET=your_jwt_secret_change_me
|
|
JWT_EXPIRES_IN=15m
|
|
JWT_REFRESH_SECRET=your_refresh_secret_change_me
|
|
JWT_REFRESH_EXPIRES_IN=7d
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Next.js Web
|
|
# -----------------------------------------------------------------------------
|
|
NEXT_PUBLIC_API_URL=http://localhost:3000
|
|
WEB_PORT=3001
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# AI Service (Python/FastAPI)
|
|
# -----------------------------------------------------------------------------
|
|
AI_SERVICE_PORT=8000
|
|
CLAUDE_API_KEY=
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Mapbox
|
|
# -----------------------------------------------------------------------------
|
|
NEXT_PUBLIC_MAPBOX_TOKEN=
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Payment Gateways (VNPay, MoMo, ZaloPay)
|
|
# -----------------------------------------------------------------------------
|
|
VNPAY_TMN_CODE=
|
|
VNPAY_HASH_SECRET=
|
|
MOMO_PARTNER_CODE=
|
|
MOMO_ACCESS_KEY=
|
|
MOMO_SECRET_KEY=
|
|
ZALOPAY_APP_ID=
|
|
ZALOPAY_KEY1=
|
|
ZALOPAY_KEY2=
|