crush-level-web/docs/project-overview.md

68 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 项目概述
这是一个使用 Next.js App Router 的 Web 应用.
crushlevel-next/
├── app/
│ ├── (auth)/ # 路由组:认证相关页面
│ │ ├── login/
│ │ │ └── page.tsx # /login 页面
│ │ ├── register/
│ │ │ └── page.tsx # /register 页面
│ │ └── layout.tsx # 认证页面共享布局
│ ├── (dashboard)/ # 路由组:仪表盘相关页面
│ │ ├── page.tsx # /dashboard 页面
│ │ ├── settings/
│ │ │ └── page.tsx # /dashboard/settings 页面
│ │ └── layout.tsx # 仪表盘页面共享布局
│ ├── api/ # API 路由
│ │ ├── auth/
│ │ │ └── route.ts # /api/auth 路由
│ │ └── users/
│ │ └── route.ts # /api/users 路由
│ ├── layout.tsx # 根布局(全局布局)
│ ├── page.tsx # 根页面(/ 路由)
│ ├── globals.css # 全局样式
│ ├── favicon.ico # 网站图标
│ └── not-found.tsx # 404 页面
├── components/ # 可复用组件
│ ├── ui/ # UI 组件(如按钮、卡片等)
│ │ ├── Button.tsx
│ │ └── Card.tsx
│ ├── layout/ # 布局相关组件
│ │ ├── Navbar.tsx
│ │ └── Footer.tsx
│ └── features/ # 功能相关组件
│ ├── AuthForm.tsx
│ └── DashboardChart.tsx
├── lib/ # 工具函数和库
│ ├── api.ts # API 调用封装
│ ├── auth.ts # 认证相关逻辑
│ └── db/ # 数据库连接和查询
│ ├── prisma.ts
│ └── models.ts
├── types/ # TypeScript 类型定义
│ ├── user.ts
│ └── post.ts
├── public/ # 静态资源
│ ├── images/
│ └── fonts/
├── styles/ # 样式文件(如果不使用 globals.css
│ ├── tailwind.css
│ └── components/
├── middleware.ts # 中间件(如认证、国际化)
├── next.config.mjs # Next.js 配置文件
├── tsconfig.json # TypeScript 配置文件
├── package.json
├── docs # 文档
└── README.md
## UI库
使用Shadcn/U作为UI的基础组件结合tailwindcss实现。
token都存放在global.css中。
## 组件库
基础组件库components/ui