feat: offer a demo instance link from the live deployment
Some checks are pending
ci / backend (push) Waiting to run
ci / frontend (push) Waiting to run

This commit is contained in:
Justin Visser 2026-08-11 10:21:18 +02:00
parent cdace7d170
commit b60a492417
10 changed files with 63 additions and 8 deletions

View file

@ -18,6 +18,9 @@ class Settings(BaseSettings):
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
app_mode: AppMode = AppMode.DEMO
# Optional public URL of a fixture-replay twin of this deployment; the UI
# offers it as an escape hatch when the live Spotify quota runs out.
demo_instance_url: str = ""
# Spotify application and OAuth. The redirect URI must exactly match a
# URI registered in the Spotify developer dashboard, port included.

View file

@ -124,7 +124,10 @@ def create_app(
@app.get("/api/health")
def health() -> dict[str, str]:
return {"status": "ok", "mode": active_settings.app_mode}
payload = {"status": "ok", "mode": active_settings.app_mode}
if active_settings.demo_instance_url:
payload["demo_url"] = active_settings.demo_instance_url
return payload
app.include_router(router)
app.include_router(recommendations_router)