Add microservices, web UI, and replay tooling
Some checks failed
ci / tests (push) Has been cancelled

This commit is contained in:
dan
2025-12-25 03:28:40 +03:00
commit 46a07f548b
72 changed files with 9142 additions and 0 deletions

32
docs/replay_format.md Normal file
View File

@@ -0,0 +1,32 @@
# Replay Format
JSON-формат реплея (v1) хранит сид партии и список применённых действий. Состояние восстанавливается повторным проигрыванием событий.
Пример:
```json
{
"version": 1,
"id": "d7b4b593-0f2a-4c3f-9d90-6f6a8a3ddf2e",
"created_at": "2024-03-01T12:00:00Z",
"seed": 123456,
"players": ["Alice", "Bob"],
"winner": "Alice",
"slots": [
{"slot_id": 1, "name": "Alice", "user_id": 1, "is_ai": false, "ready": true, "color": "red"},
{"slot_id": 2, "name": "Bob", "user_id": null, "is_ai": true, "ai_kind": "random", "ready": true, "color": "blue"}
],
"actions": [
{
"idx": 1,
"ts": "2024-03-01T12:01:00Z",
"actor": "Alice",
"action": {"type": "roll", "payload": {}},
"applied": true,
"meta": {}
}
]
}
```
Импорт в аналитический сервис сохраняет реплей в базу и делает его доступным в UI.