Grill: multi-instance account model #7

Closed
opened 2026-08-02 15:15:21 +00:00 by TheAnachronism · 1 comment

Part of #1
Blocked by: #2, #4

Question

How does multi-instance work in the MVP: what is an “account”, what credentials/URL fields are stored, how does switching instances behave, and what does “personal now, shareable later” require at account-setup UX time vs explicitly defer?

Part of #1 Blocked by: #2, #4 ## Question How does multi-instance work in the MVP: what is an “account”, what credentials/URL fields are stored, how does switching instances behave, and what does “personal now, shareable later” require at account-setup UX time vs explicitly defer?
Author
Owner

Resolution

Multi-instance Account model locked for the MVP.

What an Account is

  • Stable id (uuid)
  • baseUrl — tt-rss web root (scheme/host/optional path); trim trailing /; strip trailing /api or /api/; ApiClient POSTs to {baseUrl}/api/
  • username + password (password in flutter_secure_storage for login / transparent re-login)
  • sid in secure storage (never shared across base URLs)
  • Optional displayName; default label username@host
  • Unique on (normalized baseUrl, username)

Lifecycle

  • Sign-in: normalize URL → login → require api_level ≥ 23 → save → set active → List hub Fresh+Unread
  • Map LOGIN_ERROR, API_DISABLED (tell user to enable API access in tt-rss prefs), and network/TLS failures to clear messages
  • Edit (Manage accounts): displayName / baseUrl / username / password; credential or URL change re-logins and refreshes sid but keeps the same id
  • Remove: best-effort logout, delete metadata + secrets + that Account’s mark outbox; if active, switch to another Account (Fresh+Unread) or Sign-in root if none remain
  • No separate “sign out but keep Account” in MVP

Switching & prefs

  • Persist last active Account id across restarts
  • Account switch / cold start → Fresh + Unread (per IA); memory providers scoped to active id (ADR-0001)
  • Mark-read mode is a global pref
  • Unread filter is session UI state (not durable per Account)

Personal now / shareable later

MVP Sign-in is only baseUrl, username, password, optional displayName.

Deferred beyond this map: HTTP basic auth, client certs, custom CA / insecure SSL toggle, proxy, Wi‑Fi-SSID overlays, Account export/import / cloud backup. Packaging/privacy surface for distribution remains in Not yet specified.

## Resolution Multi-instance Account model locked for the MVP. ### What an Account is - Stable **id** (uuid) - **baseUrl** — tt-rss web root (scheme/host/optional path); trim trailing `/`; strip trailing `/api` or `/api/`; ApiClient POSTs to `{baseUrl}/api/` - **username** + **password** (password in `flutter_secure_storage` for login / transparent re-login) - **sid** in secure storage (never shared across base URLs) - Optional **displayName**; default label **`username@host`** - Unique on **(normalized baseUrl, username)** ### Lifecycle - **Sign-in:** normalize URL → `login` → require `api_level` ≥ 23 → save → set active → List hub Fresh+Unread - Map `LOGIN_ERROR`, `API_DISABLED` (tell user to enable API access in tt-rss prefs), and network/TLS failures to clear messages - **Edit** (Manage accounts): displayName / baseUrl / username / password; credential or URL change re-logins and refreshes `sid` but **keeps the same id** - **Remove:** best-effort `logout`, delete metadata + secrets + that Account’s mark outbox; if active, switch to another Account (Fresh+Unread) or Sign-in root if none remain - **No** separate “sign out but keep Account” in MVP ### Switching & prefs - Persist **last active Account id** across restarts - Account switch / cold start → Fresh + Unread (per IA); memory providers scoped to active id (ADR-0001) - **Mark-read mode** is a **global** pref - **Unread filter** is **session UI state** (not durable per Account) ### Personal now / shareable later MVP Sign-in is only baseUrl, username, password, optional displayName. **Deferred beyond this map:** HTTP basic auth, client certs, custom CA / insecure SSL toggle, proxy, Wi‑Fi-SSID overlays, Account export/import / cloud backup. Packaging/privacy surface for distribution remains in Not yet specified.
Sign in to join this conversation.
No description provided.