Admin Panel
Dashboard
The landing page, with platform revenue, headline counts, items needing attention, user growth and recent activity.
Where it lives
| Route | View / component | Access |
|---|---|---|
/dashboard | src/views/dashboard/Dashboard.tsx | Admin only |
State and requests: src/services/dashboard/dashboard-thunk.ts, src/services/dashboard/dashboard-slice.ts (Redux slice dashboard), plus fetchPlatformEarnings from src/services/earnings/earnings-thunk.ts (slice adminEarnings). Server side: getDashboardStats and getRecentActivity in service/src/controllers/admin.controller.ts.
Before you start
- Signed in as an admin. Nothing else is needed; the page is read-only.
Flow
- Opening
/dashboardfires three requests at once:
| Request | Stored in | Feeds |
|---|---|---|
GET /api/v1/admin/dashboard/stats | dashboard.stats | Stat cards, attention strip, growth chart, users by role |
GET /api/v1/admin/dashboard/activity | dashboard.recentActivity | Recent Activity |
GET /api/v1/admin/earnings | adminEarnings.earnings | Revenue banner |
- Read the page top to bottom.
Revenue banner
- "Available platform revenue" shows the withdrawable balance in full naira.
- The line below reads "
amountstill accruing in open escrows ·amountwithdrawn to date", using short forms such as ₦1.2M. - "Manage earnings" opens
/dashboard/earnings(see Earnings and payouts).
Stat cards
| Card | Value | Line underneath |
|---|---|---|
| Total Users | Count of all user accounts, every role | "+N this month", or "No signups this month" |
| Properties | Count of properties that are not deleted | "N live · N awaiting review" (status listed and status pending_verification) |
| Deals Closed | Count of escrow transactions with status completed | "amount transacted" (gross value of those deals) |
| Platform Revenue | Sum of the platform fee on completed escrows | "Fees on completed escrows" |
Attention strip
| Tile | Value | Click |
|---|---|---|
| Awaiting verification ("Listings that cannot go live yet") | Properties with status pending_verification | Not a link |
| Possible duplicates ("Held until you review them") | Duplicate flags with status open | Opens /dashboard/duplicates |
| Escrows in flight ("Funded or awaiting payment") | Escrows with status pending or funded | Not a link |
| New users this month ("Signups since the 1st") | Users created since the first of the month | Not a link |
User growth this year
- One bar per month, JAN to DEC, for the current calendar year. Bar height is relative to the busiest month.
- Hovering a bar shows "N signups" (or "1 signup").
Recent Activity
- Up to eight rows, newest first. Each row shows an icon, the actor's name, a description and a relative time such as "just now", "12m ago", "3h ago" or "2d ago".
- The server builds the feed from the five newest users ("New
rolesigned up") and the five newest properties ("Listed a newtype—title", attributed to the landlord), merged and cut to eight.
Only two activity types are produced today
The view has icons for signup, listing, booking, review and kyc, but the server only emits signup and listing entries. Bookings, reviews and KYC events do not appear in this feed.
Users by Role
- One bar each for Tenants, Landlords, Agents, Lawyers, Developers and Admins, with the count on the right. Bar length is relative to the largest role.
States and edge cases
- Loading: each block shows grey skeleton placeholders until its own request returns. The three requests are independent, so blocks can fill at different times.
- Empty growth chart: "No signups recorded this year yet."
- Empty activity: "Nothing has happened on the platform yet."
- Errors: the
dashboardslice records "Failed to fetch dashboard stats" or "Failed to fetch recent activity", but this view does not display it. A failed stats request leaves the cards showing 0, and a failed earnings request leaves the banner at ₦0. Reload the page to retry. - Month and year boundaries for the counts are calculated on the server in UTC.
- A
401on any of the three requests goes through the token refresh described in the overview; if that fails you are returned to sign-in with the session-expired notice.
What happens next
- Nothing on this page changes data. Use it to decide where to go next: the duplicates queue, the earnings page, or the users table.