137 lines
3.6 KiB
Markdown
137 lines
3.6 KiB
Markdown
# 洛天依应用管理后台
|
||
|
||
这是一个基于 Next.js 和 React 构建的洛天依应用管理后台系统,提供完整的管理功能,包括用户管理、AI模型管理、卡牌管理、内容管理等功能。
|
||
|
||
## 功能特点
|
||
|
||
- **用户管理**:查看用户数据、活跃用户统计
|
||
- **AI模型管理**:大模型框架系统、模型微调、语音克隆与合成、知识库管理
|
||
- **卡牌管理**:服装卡牌、道具卡牌、家居装饰卡牌、食物卡牌
|
||
- **内容管理**:歌曲管理、舞蹈管理、好感度系统、成就系统
|
||
- **数据分析**:用户活跃度统计、系统运行概览
|
||
- **安全认证**:用户登录/注册系统
|
||
|
||
## 技术栈
|
||
|
||
- [Next.js](https://nextjs.org/) - React 框架
|
||
- [React](https://reactjs.org/) - UI 库
|
||
- [Tailwind CSS](https://tailwindcss.com/) - 样式框架
|
||
- [Radix UI](https://www.radix-ui.com/) - 无障碍组件库
|
||
- [Lucide React](https://lucide.dev/) - 图标库
|
||
- [Recharts](https://recharts.org/) - 图表库
|
||
|
||
## 安装与运行
|
||
|
||
### 前提条件
|
||
|
||
- Node.js 22.x 或更高版本
|
||
- npm 或 yarn 或 pnpm
|
||
|
||
### 安装步骤
|
||
|
||
1. 克隆仓库
|
||
```bash
|
||
git clone <repository-url>
|
||
cd admin-dashboard
|
||
```
|
||
|
||
2. 安装依赖
|
||
```bash
|
||
npm install
|
||
# 或
|
||
yarn
|
||
# 或
|
||
pnpm install
|
||
```
|
||
|
||
3. 启动开发服务器
|
||
```bash
|
||
npm run dev
|
||
# 或
|
||
yarn dev
|
||
# 或
|
||
pnpm dev
|
||
```
|
||
|
||
4. 打开浏览器访问 http://localhost:3000
|
||
|
||
## 构建与部署
|
||
|
||
```bash
|
||
# 构建项目
|
||
npm run build
|
||
# 或
|
||
yarn build
|
||
# 或
|
||
pnpm build
|
||
|
||
# 启动生产环境服务器
|
||
npm run start
|
||
# 或
|
||
yarn start
|
||
# 或
|
||
pnpm start
|
||
```
|
||
|
||
## 项目结构
|
||
|
||
```
|
||
admin-dashboard/
|
||
├── app/ # Next.js 应用程序目录
|
||
│ ├── ai-model/ # AI模型管理相关页面
|
||
│ ├── achievements/ # 成就系统页面
|
||
│ ├── affinity/ # 好感度系统页面
|
||
│ ├── dances/ # 舞蹈管理页面
|
||
│ ├── food/ # 食物卡牌管理页面
|
||
│ ├── home-decor/ # 家居装饰卡牌管理页面
|
||
│ ├── login/ # 登录页面
|
||
│ ├── outfits/ # 服装卡牌管理页面
|
||
│ ├── permissions/ # 权限管理页面
|
||
│ ├── props/ # 道具卡牌管理页面
|
||
│ ├── register/ # 注册页面
|
||
│ ├── settings/ # 系统设置页面
|
||
│ ├── songs/ # 歌曲管理页面
|
||
│ └── users/ # 用户管理页面
|
||
├── components/ # React 组件
|
||
├── hooks/ # 自定义 React hooks
|
||
├── lib/ # 工具函数和辅助库
|
||
├── public/ # 静态资源
|
||
└── styles/ # 全局样式
|
||
```
|
||
|
||
## 浏览器支持
|
||
|
||
- Chrome (最新版本)
|
||
- Firefox (最新版本)
|
||
- Safari (最新版本)
|
||
- Edge (最新版本)
|
||
|
||
## 许可证
|
||
|
||
[MIT](LICENSE)
|
||
|
||
## Environment Configuration
|
||
|
||
This project uses environment variables for configuration across different environments. The configuration files are:
|
||
|
||
- `.env` - Base environment variables (lowest priority)
|
||
- `.env.development` - Development environment variables (used with `next dev`)
|
||
- `.env.production` - Production environment variables (used with `next start`)
|
||
- `.env.local` - Local overrides for any environment (highest priority)
|
||
|
||
### Setup
|
||
|
||
1. Copy the example files to create your environment configuration:
|
||
|
||
```bash
|
||
cp .env.example .env
|
||
cp .env.local.example .env.local
|
||
```
|
||
|
||
2. Update the variables in these files as needed for your environment.
|
||
|
||
3. Environment variables that need to be exposed to the browser should be prefixed with `NEXT_PUBLIC_`.
|
||
|
||
### Environment Variables
|
||
|
||
- `NEXT_PUBLIC_API_BASE_URL`: The base URL for API requests |