I'll build a full Globpay.ai merchant analytics dashboard with live filters, KPI cards, charts, and a data table. First I'm checking the project structure and installing chart dependencies.
I'll install chart and icon libraries, then read the existing styles and utilities.
I'll set up types, sample data, theme context, and the dashboard components next.
Next I'll add formatting helpers and the dark-mode theme context.
I'll create the theme context and shared UI pieces next.
Now I'll add the KPI cards, filters, charts, and data table components.
I'll continue building the header, KPI cards, and filter bar.
Creating filter controls and KPI cards next.
I'll add the KPI summary cards with trend indicators.
I'll create the chart components with tooltips and smooth transitions.
I'll add ChartCard and the remaining chart components.
I'll add the bar and donut charts next.
Creating the donut chart and transactions table.
I'll build the sortable, filterable transactions table next.
I'll create a small success-rate sparkline chart and wire everything into App.
Now I'll assemble the main App and update styles and the page title.
I'll update the global CSS for dark mode and polish, then set the page title.
Updating the HTML title and adding Inter font for a cleaner look.
I'll run a production build to verify everything compiles cleanly.
Built a complete Globpay.ai merchant analytics dashboard with live-updating views. Here’s what’s included:
Features
- KPI cards — Gross volume, transactions, avg ticket, success rate, new customers, refunds, each with trend % vs prior period
- Charts (Recharts) — Area (volume + txns), bar (segment revenue), donut (payment methods), line (success rate), all with hover tooltips and animations
- Filters — Date range (7D / 30D / 90D / YTD) and segment (All / Retail / SaaS / Marketplace / Subscription) update every view live
- Transactions table — Sortable columns, search, status/method filters, pagination
- Dark mode — Toggle with persistence
- Responsive layout — Sidebar drawer on mobile, adaptive grids, sticky header
Structure
- Sample data generators with seeded randomness for realistic, stable demo metrics
- Clean hierarchy: sidebar · header · filters · KPIs · charts · ledger
- Soft indigo/violet branding and gradient accents
The project builds successfully. Open the app and use the date/segment controls to see KPIs, charts, and the table update together.
Files built: src/types.ts, src/data/sampleData.ts, src/utils/format.ts, src/context/ThemeContext.tsx, src/components/Sidebar.tsx, src/components/Header.tsx, src/components/FilterBar.tsx, src/components/KpiCards.tsx, src/components/charts/RevenueChart.tsx, src/components/charts/ChartCard.tsx, src/components/charts/SegmentBarChart.tsx, src/components/charts/MethodDonutChart.tsx, src/components/TransactionsTable.tsx, src/components/charts/SuccessRateChart.tsx, src/App.tsx, src/index.css, index.html