Files
ai-directory-platform/.env.example
T
CoolChange.AIandClaude Fable 5 89a9e318c2 fix: P0 工程修复(eslint 9 / .env.example / 联系表单后端)
- eslint 迁移至 v9 flat config + eslint-config-next 16,lint 脚本改为 eslint .(next lint 在 Next 16 已移除),新增 typecheck 脚本
- React Compiler 严格规则对存量代码降为警告,修复邮件模板未转义字符
- .env.example 补齐 RESEND_VERIFIED_DOMAIN / RESEND_FROM_NAME / NEXT_PUBLIC_APP_NAME / CONTACT_RECEIVER_EMAIL
- email.ts 发件地址改为发送时求值,避免冷启动缓存错误值
- 联系表单接入 server action:留言落库 contact_message,并邮件通知管理员(HTML 转义防注入)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 20:35:17 -07:00

97 lines
3.1 KiB
Bash

# ====================================
# Database Configuration
# ====================================
# PostgreSQL connection string
# Format: postgresql://username:password@host:port/database?sslmode=require
DATABASE_URL="postgresql://username:password@host/database?sslmode=require"
# ====================================
# Authentication (Better Auth)
# ====================================
# Secret key for Better Auth (must be at least 32 characters in production)
# Generate with: openssl rand -base64 32
BETTER_AUTH_SECRET="your-super-secret-key-at-least-32-characters-long-for-production"
# The URL where your app is hosted
BETTER_AUTH_URL="http://localhost:3000"
# ====================================
# Google OAuth (Optional)
# ====================================
# Get these from: https://console.cloud.google.com/
# Guide: https://authjs.dev/getting-started/providers/google
AUTH_GOOGLE_ID="your-google-client-id"
AUTH_GOOGLE_SECRET="your-google-client-secret"
# Public Google OAuth settings
NEXT_PUBLIC_AUTH_GOOGLE_ENABLED="true"
NEXT_PUBLIC_AUTH_GOOGLE_ONE_TAP_ENABLED="true"
# ====================================
# Email Service (Required for email features)
# ====================================
# Resend API for transactional emails
# Get your API key from: https://resend.com
RESEND_API_KEY="re_your_api_key"
# Email Configuration - Choose one of the following options:
#
# Option A (recommended, highest priority): set a complete from email address
RESEND_FROM_EMAIL="Your App <noreply@yourdomain.com>"
# Option B: set a verified domain (production requires A or B),
# from address becomes "{RESEND_FROM_NAME} <noreply@{RESEND_VERIFIED_DOMAIN}>"
RESEND_VERIFIED_DOMAIN=""
RESEND_FROM_NAME=""
# Optional: Resend Audience ID for newsletter/marketing
RESEND_AUDIENCE_ID="your-resend-audience-id"
# Optional: where contact form notifications are sent (admin inbox)
CONTACT_RECEIVER_EMAIL=""
# ====================================
# Analytics & Monitoring (Optional)
# ====================================
# Posthog Analytics
NEXT_PUBLIC_POSTHOG_KEY=""
NEXT_PUBLIC_POSTHOG_HOST=""
# Google Analytics
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=""
# Microsoft Clarity
NEXT_PUBLIC_CLARITY_PROJECT_ID=""
# Analytics Feature Flags(可选)
NEXT_PUBLIC_ANALYTICS_ENABLE_IN_DEVELOPMENT=""
# ====================================
# Storage Configuration (Optional - for file uploads)
# ====================================
# R2/S3-compatible storage for file uploads
# Works with Cloudflare R2, AWS S3, MinIO, etc.
STORAGE_ACCESS_KEY_ID=""
STORAGE_SECRET_ACCESS_KEY=""
STORAGE_ENDPOINT=""
STORAGE_BUCKET_NAME="uploads"
STORAGE_PUBLIC_URL=""
# ====================================
# Application Settings
# ====================================
# Public app URL (update in production)
NEXT_PUBLIC_APP_URL="http://localhost:3000"
# App name used in email sender and titles (optional)
NEXT_PUBLIC_APP_NAME="Toolso.AI"
# Node environment
NODE_ENV="development"
# ====================================
# Feature Flags (Optional)
# ====================================
# Enable/disable features
NEXT_PUBLIC_MAINTENANCE_MODE="false"