# Admin Dashboard

## Overview

The Admin Dashboard is the home screen of the platform-owner console. After logging in as a platform admin you land on the Users page; open the Dashboard from the admin menu. It answers one question at a glance: how is the whole platform doing right now?

Everything on this page is calculated live from your real data — paid orders, signups, sent messages, and workspace activity. A fresh install shows zeros and fills in as customers sign up and pay. There are no fake placeholder numbers.

> Who can see it? Only users with a platform role (admin, owner, or super-admin). When such a user logs in they are taken to the admin console; regular workspace users land on their own workspace dashboard instead.

## The Time Window Picker

At the top-right of the page is a window picker. Every metric, chart, and delta on the dashboard is calculated for the window you choose, and compared against the previous window of the same length (so a 7-day view compares this week against last week).

Option | Window | Compared against
--- | --- | ---
Last 24 hours | 1 day | The day before
Last 7 days (default) | 7 days | The prior 7 days
Last 30 days | 30 days | The prior 30 days
Last 90 days | 90 days | The prior 90 days
Last 1 year | 365 days | The prior year

Changing the dropdown reloads the page for the new window, and the choice is kept in the page address — so you can bookmark or share a specific view.

## The Four Headline KPIs

The top strip shows four cards. Each card shows the value for the selected window plus a percentage delta against the previous window (green when up, red when down).

Card | What it measures
--- | ---
Total income | The total of all paid orders in the window.
Profit | A rough estimate — currently 32% of income. This is a placeholder until real cost and refund data is tracked.
Total views | Total messages sent across the platform (including both campaign sends and team-inbox replies).
Conversion rate | Paid workspaces ÷ new signups in the window, shown as a percentage. Tells you how many new accounts became paying customers.

> Caution: The Profit figure is a rough 32% estimate, not an accounting number. Do not use it for financial reporting — use the income figure and your own cost data.

## Revenue Over Time

Below the KPIs is a revenue chart split into twelve buckets across the selected window. Short windows bucket by day; longer windows bucket by week or month automatically. A lighter "target" line sits behind the actual revenue line — it is a simple projection (10% growth on the prior bucket) so you have a visual benchmark to beat.

The card header shows the window total and the total target alongside it.

## Geography & Payment Mix

Three smaller panels break down where your business is coming from:

- Sessions by country — the top four countries by new signups in the window, with a share percentage. This panel is illustrative: the platform doesn't store a country for each user, so in practice it stays empty.
- Sales by region — a radar chart that rolls those countries up into broad regions (Europe, Americas, Africa, Middle East, Pacific, Asia).
- Sales by platform — a donut of the top three payment gateways by paid revenue in the window. On a fresh install this shows Stripe / Razorpay / PayPal at zero until real orders arrive.

> Note: The country and region breakdowns are illustrative placeholders — the platform doesn't store a country for each user, so these panels stay empty in practice. That's expected, not a bug.

## Registered Users by Plan

A donut splits your total user base into premium (users who own at least one workspace on a paid plan) versus basic (everyone else, including free and trial). The center shows the total user count and the premium share as a percentage — a quick read on how much of your audience is monetised.

## Workspace Activity

This table lists the five most recently active workspaces. For each one you get the workspace name and industry, the owner, the current plan (as a coloured pill), the last 7 days' message volume, a health badge, and estimated monthly recurring revenue (MRR). Clicking any row opens that workspace's detail page.

The health badge is a simple traffic light based on messages sent in the last 7 days:

Badge | Meaning
--- | ---
Good | More than 50,000 messages in the last 7 days — a healthy, active account.
Watch | Between 5,000 and 50,000 — moderate activity.
Risk | Under 5,000 — low activity; the account may be dormant or churning.

## Admin Alerts

The alerts panel surfaces up to three operational issues that need your attention, with an "open" count in the header. Alerts are generated from live conditions:

- Payment failures (high severity) — orders that failed in the last 24 hours, with the gateway's failure reason.
- Message spikes (medium severity) — a workspace sending at least 3× its normal hourly volume in the last hour, which can signal abuse or a runaway campaign.
- Workspaces pending review (low severity) — a count of suspended/unapproved workspaces awaiting an admin decision.

When nothing is wrong, the panel reads "All systems healthy — no alerts."

> Tip: Treat a sudden message-spike alert as a cue to open that workspace and check its campaigns — a spike combined with a flood of failures often means a number is getting rate-limited or is at risk of a WhatsApp block.

## Where to Go Next

The dashboard is a launch pad. From here you'll typically drill into:

- User Management — find, verify, suspend, or reset any account.
- Workspaces — inspect a workspace, log in as the owner, or adjust limits.
- Plans & Packages — tune pricing, limits, and feature gates.
- Payment Gateways — enable the gateways your customers actually use.