refactor: reorganize project structure and improve code quality

- Move CI/CD configs to config/ci/ directory
- Reorganize scripts into categorized directories (deployment, monitoring, testing, utils)
- Consolidate documentation into docs/ directory with proper structure
- Update linting and testing configurations
- Remove obsolete test reports and performance summaries
- Add new documentation for code quality tools and contact form security
- Improve project organization and maintainability
- Fix lint-staged config to only lint JS/TS files
- Disable react/react-in-jsx-scope rule for Next.js compatibility
- Ignore scripts and test config directories in ESLint
This commit is contained in:
张翔
2026-03-24 13:38:58 +08:00
parent c06ac08510
commit 498bb3a3c8
62 changed files with 5473 additions and 6498 deletions
+57 -15
View File
@@ -1,31 +1,55 @@
# Resend API Configuration
RESEND_API_KEY=your_resend_api_key_here
# Environment Configuration Template
# 复制此文件为 .env.local (开发环境) 或 .env.production (生产环境)
# Company Email (接收联系表单邮件的邮箱)
COMPANY_EMAIL=contact@novalon.cn
# Next.js Configuration
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# Sentry Error Monitoring (Optional - for production)
NEXT_PUBLIC_SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
# ============================================
# Database Configuration
# ============================================
# 开发环境: file:./data/dev.db
# 生产环境: file:./data/prod.db
DATABASE_URL=file:./data/dev.db
# ============================================
# NextAuth Configuration
NEXTAUTH_SECRET=your-secret-key-here
# ============================================
# 开发环境: http://localhost:3000
# 生产环境: https://novalon.cn
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key-here
# Admin User
# ============================================
# Admin User Configuration
# ============================================
ADMIN_EMAIL=admin@novalon.cn
ADMIN_PASSWORD=your-secure-password
# Database
DATABASE_URL=file:./data/dev.db
# ============================================
# Email Configuration (Resend)
# ============================================
RESEND_API_KEY=your_resend_api_key_here
COMPANY_EMAIL=contact@novalon.cn
# File Upload
# ============================================
# Site Configuration
# ============================================
# 开发环境: http://localhost:3000
# 生产环境: https://novalon.cn
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# ============================================
# Error Monitoring (Sentry)
# ============================================
# 生产环境必需,开发环境可选
NEXT_PUBLIC_SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
# ============================================
# File Upload Configuration
# ============================================
UPLOAD_DIR=./uploads
MAX_FILE_SIZE=10485760
# ============================================
# Security Configuration
# ============================================
# Rate Limiting (每分钟最大请求数)
RATE_LIMIT_MAX_REQUESTS=10
RATE_LIMIT_WINDOW_MS=60000
@@ -37,3 +61,21 @@ CAPTCHA_MAX_ATTEMPTS=3
# Security Logging
SECURITY_LOG_RETENTION_DAYS=30
SECURITY_LOG_MAX_ENTRIES=1000
# ============================================
# Development vs Production
# ============================================
#
# 开发环境设置:
# - DATABASE_URL=file:./data/dev.db
# - NEXTAUTH_URL=http://localhost:3000
# - NEXT_PUBLIC_SITE_URL=http://localhost:3000
# - NEXT_PUBLIC_SENTRY_DSN= (可选)
#
# 生产环境设置:
# - DATABASE_URL=file:./data/prod.db
# - NEXTAUTH_URL=https://novalon.cn
# - NEXT_PUBLIC_SITE_URL=https://novalon.cn
# - NEXT_PUBLIC_SENTRY_DSN= (必需)
# - RESEND_API_KEY= (生产环境密钥)
# - ADMIN_PASSWORD= (强密码)