Skip to content

Homepage Metrics Display from S3 (Web App Team) #104

@saquibb8

Description

@saquibb8

User Story

As a user visiting the Saayam homepage, I want to see up-to-date platform metrics displayed in the stats bar, so that I can trust the numbers reflect real activity on the platform.


Background

The homepage stats bar shows Total Requests, Requests Resolved, Total Volunteers, and Total Beneficiaries. The data engineering team will produce a daily-refreshed metrics.json file in S3. The web app needs to consume this file instead of hitting the database directly, keeping the frontend lightweight and decoupled from the backend database.


Objective

Update the homepage to fetch the metrics JSON from the agreed S3 endpoint and render the four stat values dynamically in the existing stats bar UI.


Scope

  • Fetch metrics.json from the S3 path provided by the data engineering team on page load
  • Populate the four metric values in the existing stats bar UI
  • Handle fetch failures gracefully (show 0 or last known value)
  • No direct database calls from the frontend
  • Coordinate with the data engineering team on S3 path and JSON schema before implementation begins

Acceptance Criteria

  • Homepage fetches and displays all four metrics from S3 on load
  • Values update to reflect the latest metrics.json on each page visit
  • If the S3 fetch fails, the UI falls back gracefully without breaking the page
  • No direct database calls originate from the frontend
  • Stats bar matches the existing UI design with live values populated

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions