From 5d16a4be1812e8edbcb220a198831dd857681889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E7=93=9C=C2=B0?= Date: Thu, 4 Jun 2026 19:48:13 +0800 Subject: [PATCH] docs: document backend runtime structure --- backend/README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 backend/README.md diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 00000000..ab2996a2 --- /dev/null +++ b/backend/README.md @@ -0,0 +1,36 @@ +# dcalc backend + +## Run + +```bash +uv sync +python main.py +``` + +## Test + +```bash +uv run pytest -v +``` + +## Quality + +```bash +uv run ruff check . +``` + +## Runtime Entry + +- `main.py`: FastAPI application and uvicorn entry. +- `api/routes/calc.py`: `/api/calc` HTTP route. +- `services/calc_service.py`: calculation orchestration. +- `core/basic/character/`: character calculation implementation. +- `core/basic/equipment.py`: equipment data models and compatibility access. +- `core/basic/equipment_registry.py`: equipment version registry and cache. +- `database/connect.py`: SQLite and Redis connections. + +## Compatibility Rules + +- Do not change `/calc` request and response contract without frontend migration approval. +- Do not change frontendNew result data shape during backend refactors. +- Keep Skill and Forge business formulas behavior-compatible unless a dedicated formula task says otherwise.