Skip to content

VS-10 Dashboard Vertical Slice v1 (KPI + Activity + Map Summary) #46

Open

Description

@CherryClairette

What to build

The landing page of the product. Give users an immediate read on ecological system state — a few key indicators, the most stressed zones, and a map thumbnail linking to the full map. This replaces the original KPI/activity framing with one grounded in the actual data model.

APIs
GET /v1/dashboard/kpis?bbox={viewport_bbox}&period={bucket_id}
GET /v1/zones/at-risk?limit=10

FIREBASE Firestore listener — alert notifications stream
KPI response: vegetation_coverage, ecological_trend — each with value, previous, delta_pct

Acceptance criteria

  • KPI cards: vegetation_coverage + ecological_trend, each with current value + trend arrow + delta_pct vs previous period
  • KPI bbox = current map viewport from mapStore.viewportBbox
  • Risk zone list: top 10 by score_global, each links to map with zone pre-selected
  • Alert section: Firebase Firestore real-time listener — shows zones where score dropped or entered at-risk. Notification badge count.
  • Map summary card links to /map
  • Loading, error, and empty states are all distinct and designed — no blank cards
  • Responsive across mobile and desktop

Architecture note
Activity feed = Firebase Firestore stream (not paginated REST). Dashboard layout persistence = Firestore (not apps/api). Subscription/quota data = Cloud Functions + Firestore directly — not in this ticket's scope.

Blocked by

VS-07
#17 Firebase setup

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions