Files
ai-directory-platform/packages/core/.env.example
T
bigcode 05440ffb5b feat: 服务器迁移后的全量演进(依赖升级/安全审计/设计统一/截图/SEO 底座化)
在原仓库历史之上同步本服务器上的全部演进:

- 迁移至新服务器并重建 PG 数据库 + ddnc 开发域名绑定
- 全部依赖升级至最新(Next 16.3.5 / React 19.3 / better-auth 1.7.5 / Drizzle 0.45 / TS 7),
  overrides 消除已知 CVE,安全审计 19 项发现全部修复闭环
- 设计统一:各站宽度 token(--container + site-container)、classic hero 重设计、
  头部换行修复、页面过渡与 View Transitions
- 截图功能:api.adx9.com 截图服务接入(ow=800 本地化 webp、cf=1、去重/限流/占位图)
- SEO 底座化:canonical/hreflang/sitemap/JSON-LD/robots 全部收进 core,新站自动继承
- 加载体验:五站五形态路由骨架(data-theme 切换、shimmer 微光、延迟淡入)+
  过滤 useTransition 交叉淡入淡出(card-enter 错峰入场)
- 构建:experimental.cpus 限流防 PG 连接打满;清理死组件链
2026-09-15 18:19:53 +08:00

117 lines
3.9 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"
# ====================================
# AI Directory Platform 扩展配置
# ====================================
# GitHub OAuth(配置后登录页自动显示 GitHub 按钮)
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
NEXT_PUBLIC_AUTH_GITHUB_ENABLED="false"
# 站点主题(构建时生效):classic | product | editorial | niche | minimal
# 多主题构建:SITE_THEME=product NEXT_DIST_DIR=.next-product bun run build
# 多主题启动:SITE_THEME=product NEXT_DIST_DIR=.next-product next start -p 3002
SITE_THEME="classic"
# ====================================
# Website screenshots (captured via API, stored locally)
# ====================================
# SCREENSHOT_API_BASE="https://api.adx9.com/screenshot/v1"
# SCREENSHOT_STORAGE_DIR="./.screenshots"
# SCREENSHOT_TIMEOUT_MS="90000"