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>
This commit is contained in:
CoolChange.AI
2026-07-31 20:35:17 -07:00
co-authored by Claude Fable 5
parent f3088e996f
commit 89a9e318c2
10 changed files with 1192 additions and 672 deletions
+12 -1
View File
@@ -36,12 +36,20 @@ RESEND_API_KEY="re_your_api_key"
# Email Configuration - Choose one of the following options:
#
# Set a complete from email address (recommended, highest priority)
# 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)
# ====================================
@@ -75,6 +83,9 @@ STORAGE_PUBLIC_URL=""
# 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"