Summary
Platform-wide dashboard for administrators showing key metrics: total revenue, user counts, event counts, recent activity, and platform health indicators.
Endpoint
GET /api/admin/dashboard
Auth: JWT required (ADMIN role)
Success Response (200)
{
"success": true,
"data": {
"users": {
"total": 5420,
"buyers": 5100,
"organizers": 315,
"admins": 5,
"newThisMonth": 420
},
"events": {
"total": 890,
"draft": 45,
"published": 120,
"completed": 700,
"cancelled": 25,
"newThisMonth": 32
},
"revenue": {
"totalPlatformRevenue": 12500000,
"totalTicketsSold": 45000,
"revenueThisMonth": 2100000,
"ticketsSoldThisMonth": 3200,
"byProvider": [
{ "provider": "PAYSTACK", "amount": 9000000, "count": 35000 },
{ "provider": "MONNIFY", "amount": 2500000, "count": 7000 },
{ "provider": "BLOCKRADAR", "amount": 1000000, "count": 3000 }
]
},
"payouts": {
"totalPaid": 10000000,
"pendingAmount": 1500000,
"pendingCount": 12
},
"recentActivity": [
{ "type": "event_published", "name": "Abuja Music Fest", "at": "2026-03-12T14:00:00Z" },
{ "type": "payout_completed", "organizer": "John Doe", "amount": 450000, "at": "2026-03-12T13:30:00Z" },
{ "type": "user_registered", "email": "new@user.com", "at": "2026-03-12T13:00:00Z" }
]
}
}
Tasks
Notes
- Platform revenue = sum of HostIt fees (5% of ticket sales)
- "This month" = current calendar month
- Consider caching dashboard data in Redis to avoid heavy queries on every request
Acceptance Criteria
- Returns comprehensive platform statistics
- User, event, revenue breakdowns accurate
- Revenue split by payment provider
- Recent activity shows latest 10 platform events
- Only ADMIN role can access (403 for others)
- Response time < 1s (use aggregations, caching)
Summary
Platform-wide dashboard for administrators showing key metrics: total revenue, user counts, event counts, recent activity, and platform health indicators.
Endpoint
Success Response (200)
{ "success": true, "data": { "users": { "total": 5420, "buyers": 5100, "organizers": 315, "admins": 5, "newThisMonth": 420 }, "events": { "total": 890, "draft": 45, "published": 120, "completed": 700, "cancelled": 25, "newThisMonth": 32 }, "revenue": { "totalPlatformRevenue": 12500000, "totalTicketsSold": 45000, "revenueThisMonth": 2100000, "ticketsSoldThisMonth": 3200, "byProvider": [ { "provider": "PAYSTACK", "amount": 9000000, "count": 35000 }, { "provider": "MONNIFY", "amount": 2500000, "count": 7000 }, { "provider": "BLOCKRADAR", "amount": 1000000, "count": 3000 } ] }, "payouts": { "totalPaid": 10000000, "pendingAmount": 1500000, "pendingCount": 12 }, "recentActivity": [ { "type": "event_published", "name": "Abuja Music Fest", "at": "2026-03-12T14:00:00Z" }, { "type": "payout_completed", "organizer": "John Doe", "amount": 450000, "at": "2026-03-12T13:30:00Z" }, { "type": "user_registered", "email": "new@user.com", "at": "2026-03-12T13:00:00Z" } ] } }Tasks
AdminService.getDashboard():GET /api/admin/dashboardtoAdminControllerwith@Roles(UserRole.ADMIN)Notes
Acceptance Criteria