feat: 初始化 Toolso.AI 开源 AI 工具导航站项目

🎯 项目概述
- 一个开源的 AI 工具导航站,帮助用户发现和探索优秀的 AI 工具
- 基于 Next.js 16 + React 19 构建的现代化全栈应用

✨ 核心功能
- AI 工具目录:分类展示、搜索筛选、工具详情页
- 工具提交:用户可提交新工具,社区驱动
- 管理后台:工具审核、用户管理、角色权限控制
- 博客系统:MDX 驱动,AI 资讯和教程
- 国际化支持:中文/英文双语 (next-intl)
- 用户认证:Better Auth + Google OAuth
- 深色/浅色主题切换

🛠 技术栈
- 前端:Next.js 16 (App Router) + React 19 + TypeScript
- 样式:Tailwind CSS + Framer Motion 动画
- UI 组件:自定义组件库 + Radix UI
- 表单验证:React Hook Form + Zod
- 数据库:PostgreSQL + Drizzle ORM
- 认证:Better Auth (邮箱密码 + Google OAuth)
- 邮件:Resend (验证邮件 + Newsletter)
- 存储:Cloudflare R2 / AWS S3 兼容

📁 项目结构
- src/app/[locale]/(auth) - 认证页面
- src/app/[locale]/(marketing) - 营销页面 (首页、博客、工具目录)
- src/app/[locale]/(protected) - 受保护页面 (仪表板、个人资料)
- src/app/[locale]/(admin) - 管理后台
- src/features - 功能模块
- src/lib - 核心业务逻辑
- messages - 国际化翻译文件

🗄 数据库
- 包含 user, session, account, verification, passwordResetToken 等核心表
- 支持 Drizzle ORM 迁移管理

📝 文档
- 完整的 CLAUDE.md 项目指南
- 环境变量配置示例 (.env.example)
- MIT 开源许可证
This commit is contained in:
CoolChange.AI
2026-01-03 23:52:28 +08:00
commit 8976caaaad
191 changed files with 37184 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
# ====================================
# 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:
#
# Set a complete from email address (recommended, highest priority)
RESEND_FROM_EMAIL="Your App <noreply@yourdomain.com>"
# Optional: Resend Audience ID for newsletter/marketing
RESEND_AUDIENCE_ID="your-resend-audience-id"
# ====================================
# 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"
# Node environment
NODE_ENV="development"
# ====================================
# Feature Flags (Optional)
# ====================================
# Enable/disable features
NEXT_PUBLIC_MAINTENANCE_MODE="false"