SaaS
FlowStack — Multi-Tenant SaaS Analytics Dashboard
A multi-tenant analytics dashboard for a B2B SaaS platform, built with Next.js, tRPC, and PostgreSQL. Replaced a slow legacy admin panel with real-time charts, role-based access, and a billing flow powered by Stripe subscriptions, cutting page load times from over four seconds to under 700 milliseconds.

Tags
Next.jstRPCPostgreSQLStripeshadcn/ui
The challenge
The client's legacy admin panel was built on a jQuery front end bolted onto a Rails monolith. Page loads regularly exceeded four seconds, there was no meaningful role-based access control, and every new report required a developer to hand-write a SQL migration. Enterprise prospects were walking away during trials because the product felt slow and dated.
The solution
- Rebuilt the dashboard from scratch in Next.js with server components for data-heavy views and client components only where interactivity was required, keeping the JavaScript bundle small.
- Designed a tRPC API layer with end-to-end type safety, replacing dozens of untyped REST endpoints and eliminating an entire category of runtime bugs.
- Modeled a proper multi-tenant PostgreSQL schema with row-level scoping and indexes tuned for the dashboard's actual query patterns, plus a role-based permission system with four access tiers.
- Integrated Stripe subscriptions with metered usage billing, webhooks for plan changes, and a self-serve upgrade flow that previously required a support ticket.
The results
- Page load times dropped from over four seconds to under 700 milliseconds on the primary dashboard view.
- Enterprise trial-to-paid conversion improved after the new role-based access controls unblocked security review for two large prospects.
- Support tickets related to billing and plan changes dropped by more than half within the first month post-launch.