Initial commit: TSS Bot Web Backend (Rust/Axum)

This commit is contained in:
clxud
2026-07-02 02:08:40 +00:00
commit 8bbe86759c
8 changed files with 3655 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
# tssbot.web-backend
Rust/Axum API server for the TSS Bot web platform. Serves tournament, team, player, and game data via REST endpoints backed by SQLite.
## Build
```bash
cargo build --release
```
## Run
```bash
cp example.env .env # edit with your values
cargo run --release
```
The backend reads `.env` from the parent directory or the current directory.
## Environment Variables
| Variable | Description |
|---|---|
| `BACKEND_PORT` | Port to listen on (default: 6000) |
| `BACKEND_HOST` | Bind address (default: 127.0.0.1) |
| `BACKEND_ALLOWED_ORIGINS` | Comma-separated CORS origins |
| `TSS_BATTLES_DB` | Path to battles SQLite database |
| `TSS_TEAMS_DB` | Path to teams SQLite database |
| `TSS_TOURNAMENTS_DB` | Path to tournaments SQLite database |
| `VEHICLE_TRANSLATIONS_JSON` | Path to vehicle name translations |
| `VEHICLE_DATA_CACHE_JSON` | Path to vehicle data/icon cache |