3c5336ed6199790e4f7698cdfe800782fef388e8
* feat(database): 添加 beatmap_ratings 表用于用户评分
- 新增 BeatmapRating 模型类,用于表示 beatmap_ratings 表
- 该表包含 id、beatmapset_id、user_id 字段
- 建立与 Beatmapset 和 User 表的关联关系
* feat(beatmapset_ratings): 添加判断用户是否可以对谱面集进行评分的接口
- 新增 /beatmapsets/{beatmapset_id}/can_rate 接口
- 判断用户是否能对谱面集进行过评分,返回True/False
* feat(ratings): 添加为谱面评分的接口
- 新增 POST /beatmapsets/{beatmapset_id} 路由,用于用户给谱面集评分
- 实现谱面集评分的添加和更新逻辑
- 在 BeatmapRating 模型中添加 rating 字段 (漏了最重要的,我真tm丢脸)
* chore(database): 添加alembic数据库迁移脚本
* fix(ratings): 更改上传谱面打分的api路径,防止冲突
* fix(ratings): add changes from pr review
* refactor(ratings): remove swears from code
* feat(ratings): 从beatmapset中移除ratings字段,并改由从beatmap_ratings表中直接计算评分
* chore(deps): 添加 git 包并更新依赖项
- 在 builder 阶段添加了 git 包的安装
* chore(database): 更新数据库连接地址并删除意外的迁移脚本
- 将 Alembic 配置文件中的数据库连接地址从本地地址改为 Docker Compose 中的 mysql 服务地址
- 删除了 migrations/versions 目录下的 dba1f8d9992e_add_beatmap_ratings_table.py 文件
* chore(database): generate alembic script for beatmap ratings
* fix(ratings): apply changes suggested in review
- revert changes to alembic.ini
- add name to apis
- modify migration scripts
* chore: format server.py using ruff
- who forgot to do this?
* fix(migrate): fix remove achievement index
* perf(rating): optimize SQL query
* fix(rating): ensure user can rate beatmapset
* fix(rating): add boundary check
* chore(project): remove submodule
---------
Co-authored-by: MingxuanGame <MingxuanGame@outlook.com>
g0v0-server
简体中文 | English
This is an osu! API server implemented with FastAPI + MySQL + Redis, supporting most features of osu! API v1, v2, and osu!lazer.
Features
- OAuth 2.0 Authentication: Supports password and refresh token flows.
- User Data Management: Complete user information, statistics, achievements, etc.
- Multi-game Mode Support: osu! (RX, AP), taiko (RX), catch (RX), mania.
- Database Persistence: MySQL for storing user data.
- Cache Support: Redis for caching tokens and session information.
- Multiple Storage Backends: Supports local storage, Cloudflare R2, and AWS S3.
- Containerized Deployment: Docker and Docker Compose support.
Quick Start
Using Docker Compose (Recommended)
-
Clone the project
git clone https://github.com/GooGuTeam/g0v0-server.git cd g0v0-server -
Create a
.envfilePlease see wiki to modify the .env file.
cp .env.example .env -
Start the service
# Standard server docker-compose -f docker-compose.yml up -d # Enable osu!RX and osu!AP statistics (ppy-sb pp algorithm) docker-compose -f docker-compose-osurx.yml up -d -
Connect to the server from the game
Use a custom osu!lazer client, or use LazerAuthlibInjection, and change the server settings to the server's address.
Updating the Database
Refer to the Database Migration Guide
License
MIT License
Contributing
The project is currently in a state of rapid iteration. Issues and Pull Requests are welcome!
See Contributing Guide for more information.
Discussion
- Discord: https://discord.gg/AhzJXXWYfF
- QQ Group:
1059561526
Languages
Python
99%
HTML
0.6%
Shell
0.2%
Dockerfile
0.1%
Mako
0.1%