diff --git a/backend/url-shortener/DEPLOY.md b/backend/url-shortener/DEPLOY.md index f52935d..13df4bb 100644 --- a/backend/url-shortener/DEPLOY.md +++ b/backend/url-shortener/DEPLOY.md @@ -59,6 +59,14 @@ export BEARER='…' ./scripts/smoke_shorten.sh examples/crash_reporter/backend/scripts/validate_be_services.sh ``` +## Hub admin (Short links card) + +Operator UI lives in the **crashes console** (shared `ac_crash_sess`), not on `s.f0xx.org`: + +- `https://apps.f0xx.org/app/androidcast_project/crashes/?view=short_links` +- Enable in crashes `config.php`: `url_shortener.enabled => true` + MariaDB `url_shortener` block (see `examples/crash_reporter/backend/config/config.example.php`) +- Smoke: `examples/crash_reporter/backend/scripts/test_short_links_api.sh` + ## Config [config/config.example.php](config/config.example.php) — prefer **`socket`** `/run/mysqld/mysqld.sock` on Alpine (same as crashes when TCP refused). diff --git a/docs/20260610_SERVICES.md b/docs/20260610_SERVICES.md index 72f3617..a8c40d8 100644 --- a/docs/20260610_SERVICES.md +++ b/docs/20260610_SERVICES.md @@ -332,7 +332,7 @@ Flow doc: [20260607-2FA-email-mobile-auth-flow.md](20260607-2FA-email-mobile-aut ## URL shortener -**Web:** [https://s.f0xx.org](https://s.f0xx.org) +**Web:** [https://s.f0xx.org](https://s.f0xx.org) · **Admin:** […/crashes/?view=short_links](https://apps.f0xx.org/app/androidcast_project/crashes/?view=short_links) (RBAC: company owner/admin) | Kind | Path | Notes | |------|------|--------| @@ -340,13 +340,15 @@ Flow doc: [20260607-2FA-email-mobile-auth-flow.md](20260607-2FA-email-mobile-aut | Shorten | `GET/POST /api/v1/shorten` | Bearer token required | | QR | `GET /api/v1/qr/{slug}.png` | PNG (`libqrencode-tools` on BE) | | Redirect | `GET /{slug}` | `302` → origin; `410` if expired | +| Admin UI | `…/crashes/?view=short_links` | Mint/revoke bearers, list links (session RBAC) | Spec: [specs/20100611_3_url_shortener.md](specs/20100611_3_url_shortener.md) · code: [backend/url-shortener/](../backend/url-shortener/) ```bash curl -fsS https://s.f0xx.org/api/v1/health -# Bearer: php backend/url-shortener/scripts/seed_bearer.php (on BE after deploy) +# Bearer: hub Short links → Mint, or php backend/url-shortener/scripts/seed_bearer.php (CLI) export BEARER=… BASE=https://s.f0xx.org backend/url-shortener/scripts/demo_curl.sh +CRASHES_BASE=https://apps.f0xx.org/app/androidcast_project/crashes ./examples/crash_reporter/backend/scripts/test_short_links_api.sh ``` --- diff --git a/examples/app_hub/assets/i18n/hub-en.json b/examples/app_hub/assets/i18n/hub-en.json index 8dbb114..0e961f1 100644 --- a/examples/app_hub/assets/i18n/hub-en.json +++ b/examples/app_hub/assets/i18n/hub-en.json @@ -15,6 +15,7 @@ "nav.crashes": "Crashes", "nav.graphs": "Graphs", "nav.remote": "Remote access", + "nav.short_links": "Short links", "nav.builder": "Builder", "nav.toggle": "Navigation", "nav.security": "Security", diff --git a/examples/app_hub/assets/i18n/hub-ru.json b/examples/app_hub/assets/i18n/hub-ru.json index 21bc57c..b7a7429 100644 --- a/examples/app_hub/assets/i18n/hub-ru.json +++ b/examples/app_hub/assets/i18n/hub-ru.json @@ -15,6 +15,7 @@ "nav.crashes": "Крэши", "nav.graphs": "Графики", "nav.remote": "Удалённый доступ", + "nav.short_links": "Короткие ссылки", "nav.builder": "Сборщик", "nav.toggle": "Навигация", "nav.security": "Безопасность", diff --git a/examples/app_hub/index.php b/examples/app_hub/index.php index 1c628f2..53e281f 100644 --- a/examples/app_hub/index.php +++ b/examples/app_hub/index.php @@ -143,6 +143,7 @@ function hub_h(string $s): string {
  • Tickets
  • Graphs
  • Remote access
  • +
  • Short links
  • Builder