Dashboard Overview
The Admin Dashboard (AdminDashboardView) provides at-a-glance KPIs and analytics for store managers.
Access
Available only to users with role = 'admin' in the Analytics tab.
KPI Cards
The top section shows key metrics for the selected time range:
| KPI | Source | Format |
|---|---|---|
| Total Revenue | Sum of orders.total | Dollar amount |
| Order Count | Count of non-cancelled orders | Number |
| Average Order | Revenue / Order Count | Dollar amount |
| Total Tips | Sum of orders.tip | Dollar amount |
| New Customers | Profiles created in period | Number |
Time Range Selector
Admins can filter all analytics by time period:
- 7 days
- 30 days
- 90 days
The AnalyticsViewModel re-fetches all data when the time range changes.
Chart Sections
The dashboard includes several chart/data sections:
- Sales Summary — Revenue, tips, tax totals
- Hourly Distribution — Order volume by hour of day (identifies peak hours)
- Top Items — Best-selling items by quantity and revenue
- Popular Modifiers — Most-used modifiers and their revenue
- Order Status — Current breakdown of order statuses
- Employee Performance — Orders completed, avg fulfillment time
- Loyalty Insights — Tier distribution, star activity
Data Sources
All analytics data comes from AnalyticsService, which queries:
orderstable for revenue and order dataorder_itemsfor item-level analyticsorder_item_modifiersfor modifier popularityprofilesfor customer countsloyalty_accountsfor tier distributionstar_transactionsfor star activity- Analytics views (
analytics_daily_sales,analytics_hourly_distribution, etc.)