53 行
1.3 KiB
Markdown
53 行
1.3 KiB
Markdown
# 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)
|