Skip to main content
CASE STUDY

HowWeBuildaSaaSAnalyticsDashboard

A customer-facing analytics module: real-time metrics, an 8-signal churn score, exportable board reports, role-based access, and white-label theming, all designed to answer a query in under 200 milliseconds on millions of events.

Overview
DomainSaaS / Business Intelligence
Typical Timeline12 to 18 weeks
Team Shape3 Full-Stack + 1 Designer
Market Range$70K to $120K

This is the playbook we build with our team when a SaaS product needs to show customers their own data. The numbers above are how a build like this usually shapes up. The rest of this page is the engineering underneath it, the decisions, the trade-offs, and the things we got wrong the first time and fixed.

The Problem We Keep Seeing

A B2B SaaS product collects a mountain of useful data about how each customer uses it. Logins, feature adoption, revenue, the lot. And then that data sits locked in database tables where nobody outside the engineering team can reach it. The customer who wants to see their own usage files a support ticket, waits a few days, and gets back a static PDF they cannot click into.

That gap costs deals. Buyers ask for a dashboard during the demo and get a blank screen. Existing customers cannot prove ROI to their own leadership, so when renewal comes around they have no reason to fight for the line item. Meanwhile the competitor down the street ships self-serve analytics and starts winning the exact conversations you are losing.

So the brief is rarely subtle. Real data, not last night's batch. Charts people can filter and drill into. Reports clean enough to drop straight into a board deck. Different views for a manager and a frontline user. A white-label option for enterprise accounts that want it under their own brand. And every query back in under 200 milliseconds, across accounts holding millions of data points. That last constraint is the one that shapes every decision after it.

How We Build It

The dashboard ships as an embedded module inside the existing product, not a bolt-on. The front end is Next.js with TypeScript, because once the data layer gets complicated, types stop being a nicety and start saving you from 2am incidents. D3.js handles the visualizations that need real craft (cohort grids, funnels, heatmaps). Chart.js covers the everyday line and bar charts. We load Chart.js up front and pull D3 in only when someone opens an advanced view, which keeps the bundle honest.

The pipeline is the part that earns its keep. Raw events land in PostgreSQL. Every 15 minutes an AWS Lambda job rolls those events up into pre-computed metrics, things like daily active users, adoption rates, revenue by cohort, churn risk, and parks them in materialized views the dashboard reads straight off. The last 24 hours of hot data lives in Redis so the most-looked-at numbers come back instantly. Nothing fancy. Just the right thing cached in the right place.

White-label is where a lot of teams overthink it and end up with a fork per client. We do not. Each account gets its own logo, palette, and domain through CSS custom properties that swap at runtime. One codebase, one deployment, every tenant served. No conditional rendering, no parallel builds to keep in sync at 2am.

Tech Stack

Next.js, TypeScript, PostgreSQL, Redis, D3.js, Chart.js, AWS Lambda, Stripe, Tailwind CSS, custom white-label theming engine

The Decisions That Mattered

Real-time versus near-real-time is always the first argument. True streaming, a WebSocket pushing every event the instant it happens, sounds great and quietly demands you rebuild your whole infrastructure to get it. So we split the difference. Historical metrics refresh on the 15-minute materialized-view cycle. The handful of counters that need to feel live, like active users right now, run on a 5-second batch. Customers genuinely cannot tell, and the bill for the streaming-everything version is several times higher for a difference nobody perceives.

We reach for PostgreSQL materialized views over a dedicated analytics warehouse like ClickHouse or Redshift more often than you might expect, and the reason is boring and correct: the team already runs PostgreSQL. A new database means new training, new on-call runbooks, one more thing to wake up for. Materialized views give you most of the query speed for a fraction of the operational drag. Once an account crosses 10 million events we partition by month, and 12-month trend reports still come back under 200ms.

Access control gets enforced twice, on purpose. A permission matrix in PostgreSQL says what each role (admin, manager, viewer, billing) can see, which date ranges, which exports. The front end only renders what you are allowed to touch, and the API checks again on the way in, so a hand-crafted request for a metric outside your role just gets a 403. No hiding sensitive numbers behind CSS and hoping. Enterprise buyers with compliance teams ask about this in the first call, every time.

And the churn score is not machine learning, which surprises people. Most products simply do not have enough churn events to train a model that beats a good heuristic. So we score eight signals instead: login frequency falling off, feature usage dropping, support tickets climbing, billing failures, team members getting removed, API calls thinning out, exports going quiet, and plain days since the last visit. Each one is weighted against the product's own history. It is transparent, you can explain exactly why an account is flagged, and there is no model to retrain every quarter.

What Gets Built

Interactive Metrics Dashboard

The home screen is a wall of cards. Whatever an account cares about most, active users, revenue, churn, adoption, sits right on top. Tap a card and it opens up: the time-series chart, the segment filters, a way to hold this month against last. People rearrange the cards to match how they actually work, and the layout sticks between visits. The date picker does the obvious shortcuts and lets you pin a custom range when you need one. Hover a line, you get the exact number. Click a point, you drop straight into the rows behind it. That last part matters more than it sounds. A dashboard you cannot dig under is just a prettier PDF.

Churn Prediction Engine

The risk score recomputes overnight, every account, every night. One screen lists the accounts most likely to walk, ranked, with the signals that pushed each one up the list. Success teams wire alerts straight to it. Cross a threshold (65 by default) and the owner gets an email and a Slack ping, plus a short list of what to actually do about it. The real target is the quiet churn. The accounts that go dark for three weeks before anyone in the room notices. A score is only useful if it shouts before the renewal call, not after.

Exportable Reports

Any view exports to PDF, CSV, or PNG. The PDF comes out formatted, charts and tables and a summary line, ready to drop into a board deck without anyone touching it again. Reports can run on a schedule too, daily or weekly or monthly, landing in an inbox at a set time. We render them server-side with Puppeteer on Lambda so the charts look identical to the web version, not some sad stripped-down print stylesheet. For a lot of teams the scheduled export quietly becomes the whole reason they keep the dashboard, because it replaces the manual deck someone used to rebuild by hand every Monday.

White-Label Theming

Enterprise accounts want the dashboard wearing their brand, not yours. So they get custom logos, a four-color palette, a font from a curated list, and a domain of their own. It all runs through CSS custom properties injected per account, so there is still just one build and one deploy. A preview mode lets them see the branding before it goes live. Done right, this ships in about three weeks and turns into one of the cleaner upsells in the product, because making your customer look good to their customer is worth real money.

Role-Based Access Control

Four roles ship by default: admin sees everything, manager sees the metrics but not billing, analyst gets read-only with exports, viewer gets the dashboard and nothing to download. Enterprise accounts can mint their own roles on top, down to which metric categories, which date ranges, which export formats. The rules hold at the UI and the API both. Audit logs record who looked at what and when, which is exactly the paper trail a SOC 2 review asks for.

Cohort Analysis and Funnel Visualization

This is where D3 earns its place. Cohort tables show retention by signup week, color-coded so the good weeks and the bad weeks jump out without anyone squinting at a number. Funnels track the journey you define, trial to activation to first payment to expansion, and people build their own by picking events from a dropdown while the conversion rates recalculate as they go. In our experience this is the section product teams open first thing in the morning, because it answers the question they actually care about: where are people falling off.

What the Build Is Engineered to Do

These are the design targets we hold the system to, the engineering it takes to make a customer-facing dashboard fast and trustworthy at scale. They describe the architecture, not a specific client's revenue.

CapabilityTargetHow
Query speedUnder 200ms P95Materialized views plus Redis on the hot path
Scale per account10M+ eventsMonthly table partitioning keeps trend queries fast
Live counters5-second windowBatched inserts instead of full event streaming
Churn signal8 factors, nightlyTransparent weighted score, no black-box model
White-label1 deploymentPer-account theming via CSS custom properties
ReportsBoard-readyServer-rendered PDF/CSV/PNG, scheduled delivery

Build It, or Use Mixpanel?

Most founders start with Mixpanel or Amplitude, and they should. Those tools are very good at what they do. They start to pinch the moment your product needs custom metrics, white-labeled dashboards, or data that lives outside the analytics vendor's schema. Here is the honest comparison.

ApproachCostTimelineCustomizationBest For
Custom Analytics Dashboard$70K to $120K upfront3 to 5 monthsFull controlSaaS products needing embedded, customer-facing analytics
Mixpanel$25 to $1K/mo (usage-based)1 to 2 weeksModerate (event-based model)Product teams tracking user behavior funnels
Amplitude$0 to $2K/mo1 to 2 weeksModerate (strong cohort analysis)Growth teams focused on retention and activation
Looker / Embedded Metabase$3K to $5K/mo (Looker), free (Metabase OSS)2 to 6 weeksHigh (SQL-driven)Teams with data engineers who want SQL-first analytics

So when does the custom build pay for itself? The moment your customers need to see their own data. Mixpanel and Amplitude were never meant to be customer-facing. You can embed Metabase and it works, but it looks like Metabase. A custom dashboard wears your product's design, loads in under two seconds off materialized views, and turns into a retention feature instead of an internal report nobody outside the company ever sees.

The same real-time pattern travels well. eCommerce teams point it at conversion. EdTech platforms watch student engagement through it. Healthcare products track outcomes with the same shape of dashboard. The deciding question is simple. Is analytics a feature of your product, or just an internal reporting need? If your users will pay to see it, build it.

What We've Learned Building These

Speed is a feature, not a technical footnote. Put a dashboard in front of users and the ones that take more than about three seconds to load just quietly get abandoned. Nobody files a complaint. They simply stop opening it. All the work on materialized views and Redis and query tuning is not gold-plating. It is the line between a dashboard people live in and one that collects dust.

The churn problem rarely needs machine learning. We have started more than one of these projects planning to train a model and then looked at the data and found a few thousand churn events, nowhere near enough for ML to behave. A weighted eight-signal score, tuned on that same history, holds up just as well and you can actually explain it to a customer. Not every problem is an AI problem, and pretending otherwise mostly buys you maintenance debt.

White-label punches above its weight. It is roughly three weeks of engineering, and it tends to be one of the features enterprise buyers will pay a premium for, because it makes them look good to their own customers. Features with that property are worth chasing. Most are not nearly so leveraged.

And the boring feature usually wins. Scheduled PDF exports sound like nothing. They reliably end up with the highest daily engagement of anything on the dashboard, because a team emails that report to their leadership every Monday and that weekly habit is what keeps the whole thing indispensable. Building something that slots into a workflow people already have beats building something flashy that asks them to change how they work.

Frequently Asked Questions

How long does it take to build a SaaS analytics dashboard?

Plan on 12 to 18 weeks for a customer-facing dashboard. A first version with core metrics, interactive charts, and basic role-based access lands around week 10. Churn scoring, white-label theming, and scheduled exports push the full build to roughly 16 weeks. The biggest variable is how many data sources you wire in and how custom the visualizations get.

How much does a custom analytics dashboard cost to build?

In the market today a customer-facing SaaS analytics dashboard usually runs $70,000 to $120,000 for the first build, with hosting between $600 and $1,200 a month depending on data volume and user count. Those are market ranges to plan against, not a fixed quote. The number that actually decides the investment is whether the dashboard is something your customers will pay for, and analytics has some of the highest willingness-to-pay in SaaS.

What technology stack powers a dashboard like this?

Next.js with TypeScript on the front end. PostgreSQL as the primary store, Redis for the hot queries, D3.js and Chart.js for the visualizations, AWS Lambda for the aggregation jobs, and Stripe where billing is involved. The white-label layer is CSS custom properties that swap per account, so one deployment serves every tenant.

How do you keep query times under 200ms?

Three moves, mostly. Materialized views pre-aggregate the common metrics on a 15-minute refresh. Redis holds the most-requested dashboard configurations so they never touch the database. And past 10 million events we partition tables by month, which keeps even a 12-month trend query fast. Live counters use a 5-second batching window instead of streaming every single row.

Can Geminate Solutions build a similar analytics dashboard for our SaaS product?

Yes. The data pipeline, the visualization components, and the white-label engine are patterns we build with our team and reuse from one product to the next. Geminate Solutions has shipped 50+ products. A customer-facing dashboard typically takes 12 to 18 weeks. Start at geminatesolutions.com/get-started for a free project assessment.

Build a custom dashboard or use Mixpanel?

Buy if the analytics are internal-only reporting, because Mixpanel and Amplitude are excellent at that. Build when the analytics are a feature your own customers see and pay for, because those tools were never designed to sit inside your product under your brand. Once you are tracking tens of thousands of users, a custom dashboard also tends to cost less per year than the growth tier of a usage-priced tool.

What are the ongoing costs of running a SaaS dashboard?

Hosting scales with how much data you push through it. At 50,000-plus events a day, budget around $800 to $2,000 a month, and more if you never archive, since storage creeps up 20 to 30 percent a quarter. High-frequency data like logistics tracking or IoT telemetry hits those limits first, and seasonal spikes are what force you onto auto-scaling. Again, market ranges to plan against, not a quote.

How do you choose a team to build a SaaS product?

Look for a portfolio that holds both startup speed and production scale. A team that has built HR analytics, claims dashboards, and consumer SaaS understands the data-pipeline side and the UX side at once. Ask to see load-test numbers, because sub-200ms at fifty thousand users is not something you fake in a demo.

What a Build Like This Costs in the Market

For planning, a complete customer-facing analytics dashboard sits in the $70,000 to $120,000 range in the market right now. That covers a Next.js front end, the PostgreSQL pipeline, the Redis layer, the D3 and Chart.js visualizations, the white-label engine, the churn score, and the weeks of work to wire it all together. Running it tends to land around $800 to $1,200 a month in hosting at a normal data volume, with another few hundred for ongoing tuning and feature work. These are market ranges to budget against. The exact number depends on your data sources, your scale, and how custom you want the visualizations.

The more useful way to frame it is against the cost of not building it. If you are losing demos to competitors who ship self-serve analytics, and customers cannot prove their own ROI at renewal, the dashboard is not really a cost line. It is the thing that protects the revenue you already have and opens an upsell you do not have yet. Whether that math works for you is exactly the conversation we would rather have up front than oversell.

Why Teams Bring This to Us

A dashboard like this needs Next.js, D3, and real-time data-pipeline experience in the same heads, and that mix is genuinely hard to assemble in a hurry. More often the issue is not skill at all. The in-house engineers are already flat out on the core product, and pulling them onto a dashboard would stall the roadmap for months. Building it with our team lets the product keep moving while the analytics get built in parallel, by people who have shipped this exact shape of thing before.

Speed to market is usually the real driver. When a competitor is shipping analytics, every month of delay is more lost demos and more quiet churn. We build with you as a product partner, not a code shop taking a spec over the wall. That is why the churn score, or the scheduled export, often comes from a suggestion on our side, because we have watched which features actually move retention across the products we have built, and we would rather tell you than wait to be asked.

Thinking about building one?

The architecture, the technology choices, and the scaling patterns on this page are the same ones we build with our team for your product. Tell us what you are trying to show your customers and we will tell you, honestly, what it takes.

Ready to get started?

Start a Project