Saman
  • Projects
  • Gallery
  • Blog
  • Resume
GitHub

Build experiments. Learn constantly. Ship iteratively.

Next.jsTypeScriptGSAPThree.jsLenisTailwind
  • GitHub
  • LinkedIn
  • Instagram
  • Saman Sahraei
  • Projects
  • Resume
  • Blog
  • Gallery

© 2026 Saman Sahraei

←All notes
Published February 18, 20259 min readSaman Sahraei

Building Analytics UI That Scales to Billions of Events

Rollups, funnel charts, retention cohorts, and the UX patterns that keep exploration fast even on mock data.

AnalyticsData VizProduct
Building Analytics UI That Scales to Billions of Events by Saman Sahraei

Analytics products fail in the UI long before they fail in the warehouse. If every slice requires a spinning loader, analysts stop asking questions. The interface has to feel instant even when the backend is doing heavy aggregation.

Precompute what humans repeat

KPI tiles, hourly throughput, channel breakdowns, and retention cohorts are not ad-hoc queries — they are curated views with known shapes. Mock APIs can still mirror that contract so the frontend learns the real constraints early.

  • ◆Typed overview payloads validated with Zod
  • ◆Metric toggles that reuse the same chart shell
  • ◆Funnel and cohort components isolated for testing
  • ◆Shareable state encoded in the URL where possible

Even in a portfolio demo, treating analytics like a product surface makes the engineering story credible.

More notes

December 8, 2025

Real-Time Frontend Architecture

How to separate event throughput from render throughput using normalization, buffering, batch processing, and selective subscriptions in high-frequency dashboards.

November 12, 2025

Tile-Based Caching for Interactive Maps

How square tile keys, spatial caches, and zoom-aware fetching keep dense vendor maps responsive without blocking the UI thread.

October 3, 2025

React Query Patterns for Live Portfolio Demos

Stale times, refetch intervals, and optimistic UI for dashboards that look alive without pretending to be production infrastructure.