feat: 完成前端项目初始化 (TASK-003)

- 创建 Next.js 14+ 前端项目,TypeScript + Tailwind CSS
- 安装核心依赖:axios, react-hook-form, zod, zustand, recharts
- 安装 Shadcn/ui 组件库
- 配置环境变量和基础目录结构
- 验证构建成功

任务状态:TASK-003 已完成
下一步:TASK-004 配置数据库

Assisted-by: Kiro AI <kiro@cursor.com>
This commit is contained in:
freedakgmail
2026-07-06 22:11:41 +08:00
parent 6833106829
commit 3ae54fe530
25 changed files with 7798 additions and 11 deletions
+11 -11
View File
@@ -172,11 +172,11 @@ python -c "import fastapi; print(fastapi.__version__)"
**预计工时**: 3 小时
**任务内容**:
- [ ] 使用 `create-next-app` 创建项目
- [x] 使用 `create-next-app` 创建项目
```bash
npx create-next-app@latest frontend --typescript --tailwind --app --no-src
```
- [ ] 安装核心依赖
- [x] 安装核心依赖
```bash
cd frontend
npm install axios react-hook-form zod @hookform/resolvers
@@ -184,18 +184,18 @@ python -c "import fastapi; print(fastapi.__version__)"
npm install recharts date-fns
npm install -D @types/node
```
- [ ] 安装 Shadcn/ui
- [x] 安装 Shadcn/ui
```bash
npx shadcn-ui@latest init
```
- [ ] 配置 `tsconfig.json`
- [x] 配置 `tsconfig.json`
- 启用严格模式
- 配置路径别名 `@/*`
- [ ] 配置 `.env.local.example`
- [x] 配置 `.env.local.example`
```
NEXT_PUBLIC_API_URL=http://localhost:8000
```
- [ ] 创建基础目录结构
- [x] 创建基础目录结构
```
frontend/
├── app/
@@ -207,11 +207,11 @@ python -c "import fastapi; print(fastapi.__version__)"
```
**验收标准**:
- [ ] Next.js 项目创建成功
- [ ] 依赖安装完整
- [ ] TypeScript 配置正确
- [ ] Tailwind CSS 工作正常
- [ ] 可以启动开发服务器
- [x] Next.js 项目创建成功
- [x] 依赖安装完整
- [x] TypeScript 配置正确
- [x] Tailwind CSS 工作正常
- [x] 可以启动开发服务器
**测试方式**:
```bash