Files
horizon-airdef/crates/horizon-mod-registry/Cargo.toml
T
Ludovic Marie 455817204f Mod registry: 1-5 star ratings, one per GitHub account
The registry service keeps players' ratings of published projects in one
SQLite file on a volume (REGISTRY_DB, /data on Railway):
- GET /api/mods/ratings: every rated project's average and count, cached a
  minute; never who rated.
- GET /api/mods/{id}/rating: the signed-in account's own rating.
- POST /api/mods/{id}/rating: sets or changes it, checked like a submission
  (origin, session, CSRF token), 30 per account and 600 in all per hour, only
  for projects on the registry's main, never by their owners.
- The sign-in takes ?back=/mods/<id> to come back to a project's page.

The image hands the volume to nobody before running as nobody.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:15:46 +01:00

36 lines
1.2 KiB
TOML

[package]
name = "horizon-mod-registry"
version = "0.1.0"
edition = "2024"
license = "MIT"
rust-version = "1.90"
publish = false
description = "The registry's submission service: GitHub sign-in, the file's checks, staging, and a pull request (docs/api/mod-index.md)"
# Its own workspace, as the telemetry server's: the game's workspace never builds a web server.
[workspace]
[dependencies]
horizon-mods = { path = "../horizon-mods", default-features = false, features = ["index"] }
axum = { version = "0.8", default-features = false, features = ["http1", "tokio", "json", "query", "multipart"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "signal", "fs", "io-util"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1"
# GitHub's API, blocking, on tokio's blocking pool: the launcher's HTTP client.
ureq = { version = "2", default-features = false, features = ["json", "tls"] }
hmac = "0.12"
sha2 = "0.10"
base64 = "0.22"
getrandom = "0.3"
# Ratings: one SQLite file on a small volume, as the telemetry server keeps its data.
rusqlite = { version = "0.37", features = ["bundled"] }
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
[profile.release]
strip = true
lto = "thin"