first commit
This commit is contained in:
commit
114bf81fcb
114
.gitignore
vendored
Normal file
114
.gitignore
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
.env
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# OS
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage/
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
.env.test
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# vuepress build output
|
||||
.vuepress/dist
|
||||
|
||||
# Serverless directories
|
||||
.serverless
|
||||
|
||||
# FuseBox cache
|
||||
.fusebox/
|
||||
|
||||
# DynamoDB Local files
|
||||
.dynamodb/
|
||||
|
||||
# TernJS port file
|
||||
.tern-port
|
||||
|
||||
# Stores VSCode versions used for testing VSCode extensions
|
||||
.vscode-test
|
201
README.md
Normal file
201
README.md
Normal file
@ -0,0 +1,201 @@
|
||||
# 口译服务管理后台
|
||||
|
||||
一个基于 Next.js 和 TypeScript 构建的现代化口译服务管理后台系统。
|
||||
|
||||
## 功能特性
|
||||
|
||||
### 🏢 企业服务管理
|
||||
- **企业合同管理**:管理企业合同信息和服务费率配置
|
||||
- **企业员工管理**:管理企业员工信息和通话记录
|
||||
- **企业账单管理**:企业结算记录和账单管理
|
||||
- **个性化费率配置**:为不同企业设置专属服务费率
|
||||
|
||||
### 📋 订单管理
|
||||
- **多种服务类型**:
|
||||
- AI语音翻译
|
||||
- AI视频翻译
|
||||
- 手语翻译
|
||||
- 人工口译
|
||||
- 文档翻译
|
||||
- **订单状态跟踪**:待处理、处理中、已完成、已取消、失败
|
||||
- **优先级管理**:紧急、高、普通、低
|
||||
- **详细信息展示**:包括译员信息、时间安排、费用等
|
||||
|
||||
### 📄 文档管理
|
||||
- **文档上传管理**:支持多种文档格式
|
||||
- **翻译进度跟踪**:实时显示翻译状态和进度
|
||||
- **文档下载功能**:支持原文档和翻译结果下载
|
||||
|
||||
### 🧾 发票管理
|
||||
- **发票生成**:支持个人和企业发票
|
||||
- **发票下载**:PDF格式发票下载
|
||||
- **发票打印**:直接打印功能
|
||||
- **发票状态管理**:草稿、已开具、已付款、已取消
|
||||
|
||||
### 👥 用户管理
|
||||
- **用户信息管理**:个人用户和企业用户
|
||||
- **用户状态跟踪**:活跃状态、登录记录
|
||||
- **用户类型区分**:个人用户、企业用户
|
||||
|
||||
### 🎯 译员管理
|
||||
- **译员信息管理**:译员资料、专业领域
|
||||
- **译员状态监控**:在线、离线、忙碌状态
|
||||
- **语言能力管理**:支持的语言对
|
||||
|
||||
### 📞 通话管理
|
||||
- **实时通话监控**:当前活跃通话
|
||||
- **通话记录管理**:历史通话记录
|
||||
- **通话质量统计**:通话时长、费用统计
|
||||
|
||||
### ⚙️ 系统设置
|
||||
- **服务费率配置**:为每种服务设置独立费率
|
||||
- **系统参数配置**:通话设置、通知设置
|
||||
- **安全设置**:双因素认证、会话超时
|
||||
- **API配置**:第三方服务集成
|
||||
|
||||
## 技术栈
|
||||
|
||||
- **前端框架**:Next.js 14
|
||||
- **类型系统**:TypeScript
|
||||
- **样式框架**:Tailwind CSS
|
||||
- **图标库**:Heroicons
|
||||
- **状态管理**:React Hooks
|
||||
- **数据库**:Supabase(可选)
|
||||
- **部署**:Vercel(推荐)
|
||||
|
||||
## 安装和运行
|
||||
|
||||
### 环境要求
|
||||
- Node.js 18.0 或更高版本
|
||||
- npm 或 yarn
|
||||
|
||||
### 安装依赖
|
||||
```bash
|
||||
npm install
|
||||
# 或
|
||||
yarn install
|
||||
```
|
||||
|
||||
### 环境配置
|
||||
复制 `.env.example` 到 `.env.local` 并配置必要的环境变量:
|
||||
|
||||
```bash
|
||||
cp .env.example .env.local
|
||||
```
|
||||
|
||||
### 开发模式运行
|
||||
```bash
|
||||
npm run dev
|
||||
# 或
|
||||
yarn dev
|
||||
```
|
||||
|
||||
访问 [http://localhost:3000](http://localhost:3000) 查看应用。
|
||||
|
||||
### 构建生产版本
|
||||
```bash
|
||||
npm run build
|
||||
# 或
|
||||
yarn build
|
||||
```
|
||||
|
||||
### 启动生产服务器
|
||||
```bash
|
||||
npm start
|
||||
# 或
|
||||
yarn start
|
||||
```
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
├── components/ # 可复用组件
|
||||
├── lib/ # 工具库和配置
|
||||
│ ├── demo-data.ts # 演示数据
|
||||
│ ├── supabase.ts # Supabase 配置
|
||||
│ └── utils.ts # 工具函数
|
||||
├── pages/ # 页面组件
|
||||
│ ├── api/ # API 路由
|
||||
│ ├── auth/ # 认证页面
|
||||
│ └── dashboard/ # 管理后台页面
|
||||
├── public/ # 静态资源
|
||||
├── styles/ # 样式文件
|
||||
├── types/ # TypeScript 类型定义
|
||||
└── utils/ # 工具函数
|
||||
```
|
||||
|
||||
## 核心功能说明
|
||||
|
||||
### 费率优先级机制
|
||||
系统采用三级费率优先级:
|
||||
1. **企业合同费率**:优先级最高,适用于企业员工
|
||||
2. **系统通用费率**:适用于个人用户和无合同企业
|
||||
3. **默认费率**:系统兜底费率
|
||||
|
||||
### 演示模式
|
||||
项目支持演示模式,无需配置数据库即可体验完整功能:
|
||||
- 自动检测 Supabase 配置
|
||||
- 使用内置演示数据
|
||||
- 支持所有功能的模拟操作
|
||||
|
||||
### 响应式设计
|
||||
- 完全响应式界面设计
|
||||
- 支持移动端和桌面端
|
||||
- 优化的用户体验
|
||||
|
||||
## 部署
|
||||
|
||||
### Vercel 部署(推荐)
|
||||
1. 将项目推送到 GitHub
|
||||
2. 在 Vercel 中导入项目
|
||||
3. 配置环境变量
|
||||
4. 部署完成
|
||||
|
||||
### 其他平台部署
|
||||
项目支持部署到任何支持 Next.js 的平台,如:
|
||||
- Netlify
|
||||
- Railway
|
||||
- Heroku
|
||||
- 自托管服务器
|
||||
|
||||
## 环境变量
|
||||
|
||||
```bash
|
||||
# Supabase 配置(可选)
|
||||
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
|
||||
|
||||
# 其他第三方服务配置
|
||||
TWILIO_ACCOUNT_SID=your_twilio_sid
|
||||
TWILIO_AUTH_TOKEN=your_twilio_token
|
||||
OPENAI_API_KEY=your_openai_key
|
||||
```
|
||||
|
||||
## 贡献指南
|
||||
|
||||
1. Fork 项目
|
||||
2. 创建功能分支 (`git checkout -b feature/AmazingFeature`)
|
||||
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
||||
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
||||
5. 创建 Pull Request
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情。
|
||||
|
||||
## 联系方式
|
||||
|
||||
- 项目地址:[http://git.wanzhongtech.com/mars/Twilioapp-admin](http://git.wanzhongtech.com/mars/Twilioapp-admin)
|
||||
- 问题反馈:请在 GitLab Issues 中提交
|
||||
|
||||
## 更新日志
|
||||
|
||||
### v1.0.0 (2024-01-30)
|
||||
- ✅ 完成企业服务管理功能
|
||||
- ✅ 完成订单管理功能
|
||||
- ✅ 完成发票管理功能
|
||||
- ✅ 完成文档管理功能
|
||||
- ✅ 完成用户和译员管理功能
|
||||
- ✅ 完成系统设置功能
|
||||
- ✅ 完成演示模式
|
||||
- ✅ 完成响应式设计
|
Loading…
x
Reference in New Issue
Block a user