Skip to main content

Admin Dashboard — Data Model

Status: populated Owner: Platform Engineering (Frontend) Last updated: 2026-04-18

1. No Database

The admin-dashboard is a stateless frontend service. It owns no database schema, no PostgreSQL tables, no Redis keys. All persistent state lives in upstream backend services.

  • Type: Encrypted JSON (iron-session or equivalent)
  • Flags: HttpOnly; Secure; SameSite=Strict; Path=/
  • TTL: JWT expiry (1 hour); renewed on refresh
  • Contents:
{
"userId": "usr_01H...",
"email": "admin@ghasi.io",
"roles": ["admin"],
"accessToken": "<platform-jwt>",
"expiresAt": "2026-04-18T15:00:00Z"
}
  • Flags: HttpOnly; Secure; SameSite=Strict; Path=/api/auth/refresh
  • TTL: 7 days
  • Contents:
{
"refreshToken": "<opaque-refresh-token>"
}

3. Session Storage

KeyTypeContentCleared
adm_msg_filtersJSON stringLast-used cross-tenant message filter stateOn tab close
adm_dashboard_rangestringSelected dashboard time range (24h, 7d)On tab close
adm_dismissed_alertsJSON string[]List of dismissed alert serviceNamesOn tab close

4. In-Memory React State

ComponentStateDescription
DashboardPollermetricsDataLatest polled metrics; updated every 30s
OperatorCreateModalformStatereact-hook-form values; cleared on close
RoutingRuleListruleOrderDrag-and-drop local ordering before save
AlertBannerListdismissedAlertsSet of dismissed alert IDs (also in sessionStorage)

5. No localStorage for Auth Data

Raw tokens are never written to localStorage. Firebase Auth persistence set to browserSessionPersistence.

6. Cache Headers

  • All admin pages: Cache-Control: private, no-store — always fresh, no CDN caching
  • Static assets: Cache-Control: public, max-age=31536000, immutable
  • Health and metrics API routes: Cache-Control: no-store