# Admin Analytics Dashboard - RateRight

## Overview
Single-page analytics dashboard for RateRight admins to monitor marketplace health and user activity.

---

## KPI Cards (Top Row)

| Metric | Display | Format |
|--------|---------|--------|
| Signups Today | Number | 1,234 |
| Signups This Week | Number | 8,456 |
| Signups This Month | Number | 32,109 |
| Profile Completions | % of signups | 68% |

---

## Core Metrics Grid

### Jobs & Hires
| Metric | Description |
|--------|-------------|
| Jobs Posted (Total) | Cumulative jobs created |
| Jobs Posted (This Month) | Monthly active listings |
| Hires Made | Confirmed worker placements |
| Hire Rate | Hires ÷ Jobs Posted |

### SMS Activity
| Metric | Description |
|--------|-------------|
| SMS Sent | Total messages dispatched |
| SMS Replied | User response count |
| Reply Rate | Replied ÷ Sent |
| Avg Response Time | Time to first reply |

---

## Conversion Funnel

Visual funnel showing drop-off at each stage:

```
┌─────────────────┐  100%  12,500
│     Signup      │
├─────────────────┤   75%   9,375
│ Profile Created │
├─────────────────┤   40%   5,000
│  Job Posted     │
├─────────────────┤   15%   1,875
│   Hire Made     │
└─────────────────┘
```

**Stages:**
1. **Signup** - Account creation completed
2. **Profile Created** - Worker profile filled or Hirer profile complete
3. **Job Posted** - At least one job created (hirers) OR applied to job (workers)
4. **Hire Made** - Successful match confirmed

---

## Date Range Selector

- **Today**
- **This Week** (Mon-Sun)
- **This Month**
- **Last 30 Days**
- **Custom Range**

---

## Data Refresh

- Auto-refresh: Every 5 minutes
- Last updated timestamp displayed
- Manual refresh button

---

## Tech Notes

**Data Sources:**
- Users table (signups, profile completion status)
- Jobs table (postings, status)
- Hires table (confirmed placements)
- SMS logs (sent/replied tracking)

**Calculations:**
- Profile completion = users with `profile_completed_at` not null
- Hire = `hires.status = 'completed'` or `hires.confirmed_at` exists
- Funnel percentages = stage count ÷ previous stage count

---

## MVP Scope

- Single page, no tabs
- Read-only display
- No export functionality (v2)
- No user drill-down (v2)

---

## Page Layout

```
┌─────────────────────────────────────────────┐
│  RateRight Admin              [Today ▼]     │
├─────────────────────────────────────────────┤
│  [Signups] [Week] [Month] [Profile %]       │
├─────────────────────────────────────────────┤
│  Jobs Posted      |      Hires Made         │
│  45,231           |      8,942              │
├─────────────────────────────────────────────┤
│  SMS Sent: 124,500  |  Replied: 89,200      │
│  Reply Rate: 71.6%  |  Avg Response: 4.2h   │
├─────────────────────────────────────────────┤
│           Conversion Funnel                 │
│         [Visual funnel chart]               │
└─────────────────────────────────────────────┘
```
