文件
csp/frontend/README.md

53 行
1.3 KiB
Markdown
原始文件 Blame 文件历史

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
# Frontend (Next.js) - Minecraft Edition 🧱
This project now features a full **Minecraft-themed UI overhaul**!
📖 **[Read the Gameplay Guide](./GAMEPLAY.md)** for details on the RPG mechanics, Quest Board, and more.
## Theme Features
- **8-bit Aesthetic**: Uses `Press Start 2P` and `VT323` fonts.
- **RPG Terminology**: Problems are "Quests", Submissions are "Spells".
- **Gamification**: XP Bar, Levels, and Trading Post.
## 开发
```bash
npm ci
npm run dev
```
默认访问:`http://localhost:3000`
## 构建
```bash
npm run lint
npm run build
npm run start
```
## 环境变量
- `NEXT_PUBLIC_API_BASE`:浏览器访问后端 API 的基地址。
- 开发默认:`http://localhost:8080`
- Docker/生产推荐:`/admin139`
- `BACKEND_INTERNAL_URL`Next.js 反向代理后端目标(服务端)
- Docker 默认:`http://backend:8080`
## 页面
- `/auth` 登录/注册
- `/problems` Quest Board (Questions)
- `/problems/:id` 题目详情与提交
- `/submissions` Spell History (Submissions)
- `/submissions/:id` 提交详情
- `/wrong-book` Cursed Tome (Wrong Book)
- `/contests` Raid Board (Contests)
- `/contests/:id` 比赛详情/报名/排行榜
- `/kb` 知识库列表
- `/kb/:slug` 文章详情
- `/imports` 题库导入任务状态与结果
- `/run` 在线 C++ 运行
- `/me` 当前用户信息
- `/leaderboard` Hall of Fame (Rankings)