GuidesAdminDashboard Overview

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:

KPISourceFormat
Total RevenueSum of orders.totalDollar amount
Order CountCount of non-cancelled ordersNumber
Average OrderRevenue / Order CountDollar amount
Total TipsSum of orders.tipDollar amount
New CustomersProfiles created in periodNumber

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:

  1. Sales Summary — Revenue, tips, tax totals
  2. Hourly Distribution — Order volume by hour of day (identifies peak hours)
  3. Top Items — Best-selling items by quantity and revenue
  4. Popular Modifiers — Most-used modifiers and their revenue
  5. Order Status — Current breakdown of order statuses
  6. Employee Performance — Orders completed, avg fulfillment time
  7. Loyalty Insights — Tier distribution, star activity

Data Sources

All analytics data comes from AnalyticsService, which queries:

  • orders table for revenue and order data
  • order_items for item-level analytics
  • order_item_modifiers for modifier popularity
  • profiles for customer counts
  • loyalty_accounts for tier distribution
  • star_transactions for star activity
  • Analytics views (analytics_daily_sales, analytics_hourly_distribution, etc.)