One of three parallel consulting contracts at the time (with Bullla and WEX). A slow stakeholder dashboard was blocking the business I rewrote the backend from scratch.
Context
Stakeholder dashboard pulling Facebook API data for actionable analytics. One of three parallel consulting contracts I was running at the time (with Bullla and WEX), so the engineering had to be tight and self-explanatory.
Problem
Dashboard responding in 3s at peak. Backend was patchwork N+1 queries everywhere, no caching, no observability. Stakeholders avoided the tool because it was faster to ask via Slack.
Rewrite
Backend from scratch with Next.js on the front. Optimized queries, strategic cache (per-stakeholder + per-time-window), lean API layer that the dashboard could trust as a single source of truth.
Outcome
Latency dropped from 3s to 200ms at peak 15× faster. Dashboard shifted from 'avoided' to 'first place stakeholders open' for time-sensitive decisions.
- Why a backend rewrite instead of incremental fixes?Full rewriteThe patchwork had more accidental complexity than the domain. Rewriting was faster than untangling the N+1s, the missing cache layer and the absent observability one PR at a time.
- Why Next.js on the front?Next.js + SSRStakeholders open the dashboard from email/Slack first-byte time matters more than rich client interactivity. SSR gave them the data on the first paint, not after a JS bundle parsed.
3s → 200ms. The dashboard became a real-time decision tool for stakeholders.