No. 69Frontend8 min read1,992 words
How to build a customer-facing dashboard: that stays fast
How to build a customer-facing dashboard people trust: the v1 scope, rollup tables, time zones, tenant isolation, streaming in Next.js and charts that inform.
- Written by
- Lazy Devs
- Published
- Updated
- Sources
- Cited inline

Key takeaways · 05
The short version
- 01A customer dashboard exists to answer one recurring question, such as 'how am I doing?' or 'what will I owe?', in the first viewport without scrolling or clicking.
- 02Version one needs three to five headline numbers, a date-range filter, two or three supporting charts, one data table, and deliberate empty and loading states.
- 03Do not aggregate raw events on every page load. Read from pre-aggregated rollup tables, built incrementally or on a schedule, so the dashboard stays fast as customers' data grows.
- 04Scope every query to the logged-in customer in a shared data layer and test with two accounts. A cross-tenant data leak is the most expensive bug a dashboard can have.
- 05Decide which time zone defines 'today' and show when data was last updated. Totals that do not match the customer's own records destroy trust quickly.
On this page · 12
To build a customer-facing dashboard that people trust, decide the one question it must answer, show three to five numbers that answer it above the fold, and back them with pre-aggregated data so the page stays fast as accounts grow. Scope every query to the logged-in customer, be explicit about time zones and freshness, and stream each card in as its data is ready.
Every product eventually grows a dashboard. It is often the first screen a customer opens and the one they judge your product by. Built well, it answers questions before anyone has to email you. Built badly, it becomes a wall of charts nobody reads.
What a customer-facing dashboard is for
A customer-facing dashboard is the logged-in screen where users see their own data: usage, spend, performance, orders or whatever your product produces on their behalf. It is not an internal admin tool and it is not a marketing chart. It is where a paying customer goes to answer a recurring question without talking to you.
So the core job is worth saying out loud: a dashboard answers "how am I doing?" at a glance. For a billing product that is "what will I owe this month?" For an analytics product it is "did the thing I shipped move the number?" For logistics it is "is anything late?" If the dashboard does not answer that question in the first viewport, it has failed, however many widgets it has.
Find the question by reading your support inbox. Whatever customers keep asking about is what the dashboard should lead with.
The dashboard v1 feature set
Build first
- One summary view with three to five numbers that matter, visible without scrolling, each compared with the previous period.
- A date-range filter. Last 7 days, last 30 days and custom. Table stakes, and often forgotten.
- Two or three supporting charts that explain the headline numbers rather than decorate them.
- A data table with sorting, filtering and pagination for the underlying records.
- Empty, loading and error states that look intentional, not broken.
- A "last updated" timestamp on anything that is not live.
Build later
- Saved views, custom comparisons and per-user layouts.
- CSV and PDF export. Everyone asks for it, few use it weekly, but it is cheap once the table exists.
- Drill-downs from a chart into the rows behind it.
- Alerts and digests, such as "email me when spend crosses a threshold".
- Team and multi-account switching, if you sell to companies.
The trap is shipping a dozen widgets in version one because each felt cheap to add. Five numbers people read beat twenty they ignore. We go deeper on layout, hierarchy and information density in designing B2B SaaS dashboards.
Choosing charts that inform
Pick the chart for the question, not for variety.
| Question the customer is asking | Best format | Avoid |
|---|---|---|
| "What is the number right now?" | A big number with a change versus last period | A gauge or donut |
| "How is it trending?" | Line chart over time | 3D or stacked area with many series |
| "What makes up the total?" | Horizontal bar chart, sorted | Pie charts with more than a few slices |
| "How do these compare?" | Bar chart on a shared axis | Separate charts with different scales |
| "Which records need attention?" | Sortable table with status | A chart for data people need to act on row by row |
Accessibility matters here too. Do not rely on colour alone to show meaning (red for bad, green for good). WCAG's use of colour guidance applies to charts: add labels, icons or patterns, and offer the underlying data as a table.
Aggregations get slow before you notice
The first demo with a few hundred rows is instant. The first large customer with millions of events times out. Running sum over a live events table on every page load is the most common reason a dashboard feels slow.
The fix is pre-aggregated rollups. A summary table built incrementally turns a scan of every event into a read of a few dozen rows:
-- One row per customer per day, updated incrementally or by a scheduled job.
-- The dashboard reads this, never the raw events.
create table usage_daily (
customer_id bigint not null,
day date not null, -- the day in the customer's reporting time zone
requests bigint not null default 0,
errors bigint not null default 0,
cost_cents bigint not null default 0,
primary key (customer_id, day)
);
-- The headline query now scans days, not millions of events.
select
date_trunc('week', day)::date as week,
sum(requests) as requests,
sum(cost_cents) as cost_cents
from usage_daily
where customer_id = $1
and day >= $2 and day < $3
group by 1
order by 1;Return money in cents and format it in the UI, rather than dividing in SQL and losing precision.
How to keep rollups current, from simplest to most involved:
- Scheduled refresh. A job recalculates recent days every few minutes or hourly. Simple and good enough for most products.
- Materialised views. Postgres materialised views store a query's result and can be refreshed on a schedule. Fine for moderate data sizes, though each refresh recomputes the whole view.
- Incremental updates on write. Each new event increments the right rollup row. Fast to read and always fresh, but you must handle late and corrected events.
- A columnar analytics store. When you have very large event volumes and many ad hoc filters, a columnar database such as ClickHouse is the next step. Most products never need it.
Pair rollups with indexes on the columns you filter and group by. Our Redis caching guide covers when an extra cache layer helps and when it just adds staleness.
Time zones and date boundaries
"Today" for a customer in Sydney is not "today" in a database that stores everything in UTC. If your daily totals do not match the customer's own spreadsheet, they stop trusting every number on the screen.
- Store timestamps in UTC, always.
- Pick a reporting time zone per account, usually set by an admin, and use it for "today", "this week" and "this month".
- Bucket in that time zone. Postgres's
date_truncaccepts a time zone argument, sodate_trunc('day', created_at, 'Australia/Sydney')buckets by the customer's local day. - If rollups are daily, roll up in the account's time zone, or roll up hourly and combine hours into local days at read time.
- Format dates in the browser with
Intl.DateTimeFormatand an explicit time zone, and label the time zone on the screen.
Daylight saving changes will produce 23 and 25 hour days. Test those dates on purpose.
Tenant isolation: the bug that ends contracts
Every query must be scoped to the logged-in customer, every time. One missing customer_id filter and someone sees another company's revenue.
Do not leave this to each developer remembering a where clause:
- Put all dashboard queries behind a data-access layer that takes the tenant from the session, never from a URL or request body.
- Consider Postgres row-level security as a second line of defence.
- Write automated tests that log in as two customers and assert neither can see the other's data, including exports and drill-downs.
- Check permissions within a customer too: a team member may be allowed to see usage but not spend.
This belongs in the data layer, which is core API and backend engineering work rather than a frontend afterthought. If your product serves many companies, our post on multi-tenant architecture without headaches covers the wider design choices.
If you are new to the term, what multi-tenancy is explains the models and where isolation usually breaks.
Perceived performance: stream the shell, then the cards
Even a fast dashboard feels slow if the screen stays blank until every number is ready. Render the layout immediately and fill each card as its data arrives.
In the Next.js App Router, wrap each independent card in a React Suspense boundary. The page shell is sent first and each card streams in as its query resolves, as described in the Next.js streaming guide:
import { Suspense } from "react";
export default function DashboardPage() {
return (
<section className="grid gap-4 md:grid-cols-3">
<Suspense fallback={<CardSkeleton />}>
<SpendCard />
</Suspense>
<Suspense fallback={<CardSkeleton />}>
<UsageCard />
</Suspense>
<Suspense fallback={<TableSkeleton />}>
<RecentActivityTable />
</Suspense>
</section>
);
}Sibling boundaries load in parallel, so one slow query no longer holds up the rest of the page. Make skeletons the same size as the content they stand in for, so nothing jumps when data arrives.
The stack we would reach for
Nothing exotic, on purpose.
- Next.js with the App Router. Server Components fetch data close to the database, and streaming makes the dashboard feel fast.
- Postgres with rollup tables for anything aggregated and indexes on filter and group-by columns.
- TypeScript end to end, so the shape of the data is checked from the query to the chart.
- A focused charting library such as Recharts or visx, styled to match your product.
- A component library for tables, filters and date pickers, so effort goes into the data rather than the controls.
- Background jobs for rollups, exports and digest emails.
We avoid embedding third-party BI tools into customer-facing products. They are great for internal reporting, but they look like someone else's software bolted onto yours and fight you on branding, permissions and performance.
Does it need to be real time?
Usually not. A clear "last updated two minutes ago" satisfies most customers. Live updates make sense when customers act on numbers within seconds: operations, logistics, trading or monitoring. If that is you, our guide on how to build a real-time app covers the options and trade-offs.
What drives the cost
We do not quote a dashboard we have not scoped. The biggest swing factor is rarely the UI. It is the state of your data.
| Factor | Simpler | More involved |
|---|---|---|
| Source data | Clean, in one database | Spread across several systems or third-party APIs |
| Freshness | Hourly or daily | Near real time |
| Data volume per customer | Modest | Very large event streams |
| Permissions | Everyone in an account sees everything | Role-based visibility within accounts |
| Interactivity | Fixed views and date filter | Drill-downs, saved views, custom reports |
| Exports and alerts | None at launch | Scheduled reports, threshold alerts |
Clean source data makes everything faster to build. Messy data spread across several systems means pipeline work before you draw a single chart. Get the data honest before you budget the pixels.
Common mistakes to avoid
- Aggregating on read at scale. Fine in the demo, a support fire once large customers arrive.
- Vanity metrics. Every headline figure should inform a decision the customer might make.
- No empty states. New accounts have no data. If the dashboard looks broken on day one, you lose them on day one.
- Cross-tenant leaks. Scope every query and test with two accounts.
- Refresh ambiguity. Show when data was last updated, and stop the "is this live?" emails.
- Designing for the sales demo. Build for the impatient user checking on their phone late at night.
Dashboards often sit inside a broader self-service area where customers also manage orders, invoices and support. If that is where you are heading, read our guide to building a customer portal.
Where to start
- Write down the one question your dashboard answers, and the three to five numbers that answer it.
- Check the data behind each number exists, is clean and is attributable to a customer.
- Build rollups and the tenant-scoped data layer first.
- Build the summary view, filter, charts and table, with streaming and real empty states.
- Ship to a few customers and watch what they click and what they still email you about.
A great customer-facing dashboard is one screen that answers one question fast, backed by aggregation that stays quick as you grow and isolation tight enough to trust. That is exactly the kind of thing we build. Talk to us and we will look at your data and tell you honestly what your first version should be.
FAQ · 05 questions
Frequently asked questions
What should a customer dashboard show?
The few numbers your customers make decisions with, usually the ones they email support to ask about. Lead with three to five headline figures for the selected period, add charts that explain changes in those numbers, and give access to the underlying records in a table. Anything nobody can act on is clutter.
Should I embed a BI tool or build a custom dashboard?
Embedded analytics tools are quick to set up and fine for internal reporting or early pilots. For a core customer-facing experience, a custom dashboard usually wins because it matches your product's design, enforces your own permissions and lets you tune performance. Embedded tools tend to look and feel like someone else's software.
Which chart library should I use for a React dashboard?
Use a focused React charting library such as Recharts or visx rather than a heavyweight all-in-one BI component. Choose one that renders accessible SVG, supports responsive sizing and lets you style it to match your design system. The chart library matters far less than choosing the right chart for each question.
Does a customer dashboard need real-time data?
Usually not. Most dashboards are fine with data that refreshes every few minutes or hourly, as long as a 'last updated' timestamp makes that clear. Build real-time updates only for numbers customers act on within seconds, such as live operations, because real-time infrastructure adds cost and complexity.
How do I make a dashboard load faster?
Read from pre-aggregated tables instead of raw data, index the columns you filter and group by, and render the page shell on the server while each card streams in as its data arrives. Keep client-side JavaScript small, and virtualise or paginate large tables.