next修复CVE-2025-66478漏洞,编程代理改成claude

This commit is contained in:
2025-12-08 17:01:59 +08:00
parent c1fda9bb7e
commit 1349317f88
15 changed files with 34 additions and 78 deletions

12
.claude/settings.json Normal file
View File

@@ -0,0 +1,12 @@
{
"permissions": {
"allow": [
"Read(./.env.example)"
],
"deny": [
"Read(./.env)",
"Read(./.env.development)",
"Read(./.env.production)"
]
}
}

View File

@@ -1,53 +0,0 @@
# 这里的文件会被Cline忽略一般从 .gitignore 直接复制就行,一些需要保密不便给大模型看的文件也可以写在这
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# env files (can opt-in for committing if needed)
.env*
!.env*.example
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
/postgresql
tasks.md
/prisma/zod
# pnpm
.pnpm-store/
# lock 一般的项目需要用git管理但这个是模板项目就不管理
package-lock.json
pnpm-lock.yaml

View File

@@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y \
cmake \
telnet \
redis-tools \
iputils-ping \
potrace \
imagemagick \
zsh \
@@ -108,7 +109,6 @@ RUN mkdir -p /var/run/sshd && \
RUN code-server --install-extension ms-ceintl.vscode-language-pack-zh-hans \
&& code-server --install-extension bierner.markdown-mermaid \
&& code-server --install-extension ms-python.python \
&& code-server --install-extension saoudrizwan.claude-dev \
&& code-server --install-extension dbaeumer.vscode-eslint \
&& code-server --install-extension prisma.prisma \
&& code-server --install-extension ecmel.vscode-html-css \

View File

@@ -29,6 +29,7 @@
- **cmake**: 构建工具
- **telnet**: 网络调试
- **redis-tools**: Redis 命令行工具
- **ping**: 网络连通性测试
- **potrace**: 位图转矢量图
- **imagemagick**: 图像处理工具
- **uv**: 快速 Python 包管理器

View File

@@ -11,14 +11,12 @@ services:
- "7681:7681" # ttyd (Web Terminal)
- "3000:3000" # Next.js Dev Server
volumes:
# 项目代码映射(使用 cached 模式提高性能)
# 项目代码映射(如果映射到Windows/Mac宿主机的本地目录使用 cached 模式提高性能)
- ../:/workspace:cached
# node_modules 使用命名卷以提高性能
- node_modules:/workspace/node_modules
# pnpm store 缓存
- pnpm_store:/root/.local/share/pnpm/store
# Git 配置(可选,如果需要保留 Git 配置)
- ~/.gitconfig:/root/.gitconfig:ro
# Code Server 配置(包含 config.yaml 和密码)
- code-server-config:/root/.config/code-server
# Code Server 数据(插件、用户设置、扩展数据)
- code-server-data:/root/.local/share/code-server
environment:
- NODE_ENV=development
- TZ=Asia/Shanghai

View File

@@ -26,6 +26,7 @@ POSTGRESQL_PASSWORD=
POSTGRESQL_PORT=
DATABASE_URL=
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
@@ -46,7 +47,6 @@ DB_PARALLEL_LIMIT =
# NextAuth.js Configuration
NEXTAUTH_SECRET=
NEXTAUTH_URL=
PKUAI_API_KEY=
PKUAI_API_BASE=

View File

@@ -1,12 +0,0 @@
{
"mcpServers":{
"ai-elements": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://registry.ai-sdk.dev/api/mcp"
]
}
}
}

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"prisma.pinToPrisma6": true
}

View File

@@ -1,3 +1,7 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 项目说明
本项目模板Hair Keeper v1.1.0是一个高度集成、深度定制、约定优于配置的全栈Web应用模板旨在保持灵活性的同时提供一套基于成熟架构的开发底座自带身份认证、权限控制、丰富前端组件、文件上传、后台任务、智能体开发等丰富功能提供AI开发辅助免于纠结功能如何实现可快速上手专注于业务逻辑。

View File

@@ -79,6 +79,7 @@ Hair Keeper是个诙谐有趣的名称和项目内容毫无关系。
### 其他
- `constants/`:项目全局常量管理
- `constants/permissions.ts`:权限定义,支持前后端一致的权限控制,支持解析复杂的权限表达式(如"A&B|(C&D)"
- `constants/menu.ts`: 菜单管理工具库,提供菜单项定义、查询、权限过滤等功能
- `lib/schema/`集中管理数据验证schema定义前后端统一的数据结构和验证规则前端对默认值等其他要求写在表单组件中后端对默认值等其他要求写在接口文件中使用z.input而不是z.infer来获取Schema的输入类型
- `lib/algorithom.ts`:通用计算机算法实现,例如拓扑排序
- `lib/format.ts`:数据格式化工具函数库

View File

@@ -74,7 +74,7 @@
"minio": "^8.0.6",
"motion": "^12.23.22",
"nanoid": "^5.1.6",
"next": "~15.4.0",
"next": "~15.4.8",
"next-auth": "^4.24.11",
"next-themes": "^0.4.6",
"nuqs": "^2.6.0",
@@ -109,7 +109,6 @@
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.5.2",
"react-icons": "^5.5.0",
"react-live": "^4.1.8",
"shadcn": "^3.5.0",
"tailwindcss": "^4",

2
quickstart.sh Normal file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
# 您可以运行这个脚本来快速初始化和使用本模板项目

View File

@@ -10,6 +10,7 @@ REMOTE_PORT=""
PROJECT_NAME=""
REMOTE_DIR="~/$PROJECT_NAME"
pnpm run lint
echo "🔨 开始构建项目..."
pnpm run build

View File

@@ -29,7 +29,7 @@ export function WelcomeDialog({ open, onOpenChange }: WelcomeDialogProps) {
<DialogTitle className="text-2xl"></DialogTitle>
</div>
<DialogDescription className="pt-4 text-base">
{/* 内容暂时没想好,先不实现 */}
Hair Keeper
</DialogDescription>
</DialogHeader>
<div className="flex justify-end gap-2 pt-4">

View File

@@ -13,7 +13,7 @@ export function getRedisClient() {
const redisPassword = process.env.REDIS_PASSWORD
redisClient = new Redis({
host: 'localhost',
host: process.env.REDIS_HOST || 'localhost',
port: parseInt(redisPort, 10),
password: redisPassword,
maxRetriesPerRequest: null, // BullMQ 推荐设置