mirror of
https://github.com/handsomezhuzhu/QQuiz.git
synced 2026-02-20 20:10:14 +00:00
## 新功能 - 实现管理后台API配置管理(OpenAI/Anthropic/Qwen) - API配置保存到数据库,实时生效无需重启 - API密钥遮罩显示(前10位+后4位) - 完整endpoint URL自动显示 ## 后端改进 - 新增 config_service.py 用于加载数据库配置 - LLMService 支持动态配置注入,回退到环境变量 - 更新 exam.py 和 question.py 使用数据库配置 - 扩展 schemas.py 支持所有API配置字段 ## 前端改进 - 重写 AdminSettings.jsx 增强UI体验 - API密钥显示/隐藏切换 - 当前使用的提供商可视化标识 - 移除"需要重启"的误导性提示 ## 项目结构重组 - 移动所有脚本到 scripts/ 目录 - 移动所有文档到 docs/ 目录 - 清理 Python 缓存文件 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
95 lines
2.0 KiB
Markdown
95 lines
2.0 KiB
Markdown
# QQuiz Quick Start Guide
|
|
|
|
## Step 1: Configure (30 seconds)
|
|
|
|
Double-click to run:
|
|
```
|
|
setup.bat
|
|
```
|
|
|
|
This will:
|
|
- Create `.env` file
|
|
- Open it in Notepad
|
|
- You need to replace `sk-your-openai-api-key-here` with your real OpenAI API key
|
|
|
|
**Where to get API key:**
|
|
- Visit: https://platform.openai.com/api-keys
|
|
- Create new secret key
|
|
- Copy and paste into `.env` file
|
|
|
|
## Step 2: Start Application (3-5 minutes)
|
|
|
|
Double-click to run:
|
|
```
|
|
start_app.bat
|
|
```
|
|
|
|
**PostgreSQL Password:**
|
|
- When prompted, enter your PostgreSQL password
|
|
- Default is usually: `postgres`
|
|
- Or just press Enter to try without password
|
|
|
|
The script will automatically:
|
|
- ✓ Check Python and Node.js
|
|
- ✓ Create database
|
|
- ✓ Install all dependencies
|
|
- ✓ Start backend (new window)
|
|
- ✓ Start frontend (new window)
|
|
|
|
## Step 3: Access System
|
|
|
|
Browser will open automatically: http://localhost:3000
|
|
|
|
**Login:**
|
|
- Username: `admin`
|
|
- Password: `admin123`
|
|
|
|
**Test the system:**
|
|
1. Click "题库管理" (Exam Management)
|
|
2. Click "创建题库" (Create Exam)
|
|
3. Enter name: `Test Exam`
|
|
4. Upload file: `test_data/sample_questions.txt`
|
|
5. Wait 10-30 seconds for AI to process
|
|
6. Click "开始刷题" (Start Quiz)
|
|
|
|
## What You'll See
|
|
|
|
✅ Beautiful login page
|
|
✅ Dashboard with statistics
|
|
✅ Create exam and upload documents
|
|
✅ AI processes questions automatically
|
|
✅ Quiz player with different question types
|
|
✅ Automatic mistake collection
|
|
✅ Progress tracking
|
|
|
|
## Troubleshooting
|
|
|
|
### Can't find PostgreSQL password
|
|
- Try: `postgres` or leave empty
|
|
- Or check PostgreSQL installation
|
|
|
|
### Port already in use
|
|
```cmd
|
|
netstat -ano | findstr :3000
|
|
taskkill /F /PID <PID>
|
|
```
|
|
|
|
### Dependencies install failed
|
|
- Check internet connection
|
|
- Script uses China mirrors for speed
|
|
|
|
## Success!
|
|
|
|
If you see the login page at http://localhost:3000 - congratulations! 🎉
|
|
|
|
The system is now running. You can:
|
|
- Create exam banks
|
|
- Upload documents (TXT/PDF/DOCX/XLSX)
|
|
- Start quizzing
|
|
- Review mistakes
|
|
- Track progress
|
|
|
|
---
|
|
|
|
Enjoy using QQuiz! 🚀
|