# -----------------------------------------------------------------------------
# Application
# -----------------------------------------------------------------------------
NODE_ENV=development
PORT=3000
APP_NAME="Ibraimi Motorsport"
APP_URL=http://localhost:3000
FRONTEND_URL=http://localhost:4200
API_PREFIX=/api

# Comma-separated list of allowed origins, or * for all (development only)
CORS_ORIGIN=*

# -----------------------------------------------------------------------------
# Database (Prisma / MySQL)
# -----------------------------------------------------------------------------
DATABASE_URL="mysql://root:@localhost:3306/ibraimi_motorsport"
# DATABASE_URL="mysql://root:@localhost:3306/starter_db"
# -----------------------------------------------------------------------------
# Authentication (JWT)
# Generate strong secrets, e.g.: node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"
# -----------------------------------------------------------------------------
JWT_ACCESS_SECRET=a9ad9552a7bfe5e85356dfb04df98db0659bd8209b918434a15eaf23e5df4e05d836b61ab8edcf5e0425c68220664c77
JWT_REFRESH_SECRET=6d35d2aa188410f0fa8d5fdf54a5d4aa473d83fa21a75b01a480c475de524cbde215c07767242bcf362f148c611e932e
JWT_ACCESS_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d

# -----------------------------------------------------------------------------
# Mail (SMTP)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Mail (SMTP)
#
# Nothing listens on localhost:587, so with these defaults every send FAILS.
# Check whatever you configure with:  npm run mail:test -- you@example.com
#
# Gmail (personal account) — for testing and low volume:
#   1. Turn on 2-Step Verification on the Google account.
#   2. Create an App Password (Google Account → Security → App passwords).
#      A normal account password is refused: "Username and Password not accepted".
#   3. MAIL_HOST=smtp.gmail.com
#      MAIL_PORT=587
#      MAIL_SECURE=false          (587 upgrades via STARTTLS; use 465 + true for implicit TLS)
#      MAIL_USER=you@gmail.com
#      MAIL_PASSWORD=<the 16-character App Password>
#      MAIL_FROM_ADDRESS=you@gmail.com   <- must equal MAIL_USER, or Gmail rewrites the sender
#   Limits: ~500 messages/day, and Gmail is not meant as a transactional sender.
# -----------------------------------------------------------------------------
# LIVE 
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_SECURE=false
MAIL_USER=drinnis7@gmail.com
MAIL_PASSWORD=acbduptfrqgbqlwp
# Where the public contact form delivers (defaults to MAIL_FROM_ADDRESS).
MAIL_FROM_ADDRESS=drinnis7@gmail.com
MAIL_FROM_NAME="Ibraimi Motorsport"
# -----------------------------------------------------------------------------
# MAIL_HOST=localhost
# MAIL_PORT=587
# MAIL_SECURE=false
# MAIL_USER=
# MAIL_PASSWORD=
# MAIL_FROM_ADDRESS=noreply@example.com
# MAIL_FROM_NAME="Ibraimi Motorsport"

# -----------------------------------------------------------------------------
# SMS  (provider: log | twilio)
# -----------------------------------------------------------------------------
SMS_PROVIDER=log
SMS_FROM=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=

# -----------------------------------------------------------------------------
# Storage  (driver: local | s3)
# -----------------------------------------------------------------------------
STORAGE_DRIVER=local
STORAGE_LOCAL_ROOT=storage
UPLOAD_MAX_FILE_SIZE_MB=10

# -----------------------------------------------------------------------------
# Logging & rate limiting
# -----------------------------------------------------------------------------
LOG_LEVEL=debug
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=600

# -----------------------------------------------------------------------------
# Seeding
# -----------------------------------------------------------------------------
SEED_ADMIN_EMAIL=admin@example.com
SEED_ADMIN_PASSWORD=
# SEED_PARTNER_EMAIL=partner@example.com
# SEED_PARTNER_PASSWORD=
# SEED_CUSTOMER_EMAIL=customer@example.com
# SEED_CUSTOMER_PASSWORD=


# -----------------------------------------------------------------------------
# Commerce
# BASE_CURRENCY is the currency every price is STORED in — changing it after
# go-live requires migrating every money column. Display currencies come from
# the `currencies` table's exchange rates.
# -----------------------------------------------------------------------------
# BASE_CURRENCY=CHF
# DEFAULT_COUNTRY=CH
# DEFAULT_TAX_RATE=8.1
# ORDER_NUMBER_PREFIX=IM
# # Free shipping threshold in the base currency (0 = never)
# FREE_SHIPPING_FROM=0
# # Days an untouched cart survives before cleanup
# CART_TTL_DAYS=30
