Files
course-craft-service/.env.example

77 lines
2.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ===========================================
# CourseCraft Environment Variables
# ===========================================
#
# ОБЯЗАТЕЛЬНО ДЛЯ ВХОДА И API (без них будет 401 на /api/courses):
# - NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY — один и тот же проект Supabase
# - SUPABASE_SERVICE_ROLE_KEY — из того же проекта (Settings → API → service_role secret)
# - JWT_SECRET — любая длинная строка (для подписи JWT на бэкенде)
# - NEXT_PUBLIC_API_URL — URL бэкенда (для фронта; если не задан, по умолчанию localhost:3125)
#
# ===========================================
# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/coursecraft?schema=public"
# Redis (порт 6395)
REDIS_URL="redis://localhost:6395"
REDIS_HOST="localhost"
REDIS_PORT="6395"
# Supabase Auth (все три — из одного проекта Supabase!)
NEXT_PUBLIC_SUPABASE_URL="https://your-project.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"
SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"
# OpenRouter AI
OPENROUTER_API_KEY="your-openrouter-api-key"
OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"
# Default AI model (used for all tiers; PRO users can override in settings)
AI_MODEL_DEFAULT="openai/gpt-4o-mini"
# Testing: set to true to ignore monthly course limit (for local/dev only)
# BYPASS_COURSE_LIMIT="true"
# Stripe Payments
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
PAYMENT_MODE="PROD" # DEV | PROD
# Stripe Price IDs
STRIPE_PRICE_PREMIUM="price_..."
STRIPE_PRICE_PRO="price_..."
# Meilisearch
MEILISEARCH_HOST="http://localhost:7700"
MEILISEARCH_API_KEY="your-meilisearch-master-key"
# S3 / Cloudflare R2 Storage
S3_ENDPOINT="https://your-account.r2.cloudflarestorage.com"
S3_ACCESS_KEY_ID="your-access-key"
S3_SECRET_ACCESS_KEY="your-secret-key"
S3_BUCKET_NAME="coursecraft"
S3_REGION="auto"
# Cooperation form email (optional; if not set requests are still saved in DB)
COOPERATION_EMAIL_TO="exbytestudios@gmail.com"
COOPERATION_EMAIL_FROM="noreply@coursecraft.local"
SMTP_HOST=""
SMTP_PORT="587"
SMTP_USER=""
SMTP_PASS=""
SMTP_SECURE="false"
# App URLs (API на 3125; веб — свой порт, напр. 3000)
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXT_PUBLIC_API_URL="http://localhost:3125"
API_URL="http://localhost:3125"
AI_SERVICE_URL="http://localhost:3002"
# JWT Secret — ОБЯЗАТЕЛЕН для API (подпись токенов после обмена с Supabase)
JWT_SECRET="your-super-secret-jwt-key-change-in-production"
# Environment
NODE_ENV="development"