Skip to content

Admin Dashboard for NestJS SaaS — User Management & Analytics

An admin dashboard is essential for SaaS operations. Without one, you're running SQL queries to check MRR, manually editing database rows to suspend users, and guessing at churn trends. Every SaaS product needs a way to manage users, monitor subscriptions, and understand growth — and building one from scratch takes weeks.

The Cloudrix SaaS Starter Kit includes a full admin panel built with Angular and secured with NestJS role-based guards. You get user management, platform statistics, subscription overviews, audit logs, and search — all connected to your real data. The admin dashboard is protected by role-based access control, so only platform administrators can access it.

User Management

View, edit, suspend, and delete users. Filter by role, status, or registration date. Each user row shows their plan, organization, last login, and email verification status — everything you need at a glance without running a database query.

Platform Stats

Real-time metrics: total users, MRR, churn rate, active subscriptions, and signups over time. Stats are computed from live data and cached for performance. The dashboard loads in under 200ms even with thousands of users.

Audit Logs

Timestamped log of every admin action. Filterable by user, action type, and date range. Every user edit, role change, and suspension is recorded with the acting admin's ID — essential for compliance and debugging customer issues.

Role Management

Promote or demote users between roles. Bulk operations for efficient team management. Role changes take effect immediately — the user's next API call uses the updated permissions without requiring a re-login.

Pagination

Server-side pagination with configurable page sizes. Handles thousands of records smoothly. The API returns total count, page info, and sorted results — the Angular frontend renders pagination controls automatically.

Search

Full-text search across users, organizations, and subscriptions with debounced input. Results update as you type with highlighted matches. Search queries are indexed on the database side for sub-50ms response times.

How It Works in Code

Admin endpoints are protected by a role-based guard. Only users with the ADMIN role can access these routes:

// Admin-only endpoint with role guard
@UseGuards(JwtAuthGuard, RolesGuard)
@Roles(Role.ADMIN)
@Get('users')
async getUsers(@Query() query: PaginationDto) {
  return this.adminService.getUsers({
    page: query.page,
    limit: query.limit,
    search: query.search,
    sortBy: query.sortBy ?? 'createdAt',
  });
}

// Audit log decorator — auto-records admin actions
@AuditLog('USER_SUSPENDED')
@Patch('users/:id/suspend')
suspendUser(@Param('id') id: string) {
  return this.adminService.suspendUser(id);
}

What's Included

User management table with CRUD
Subscription overview per user
Plan distribution chart
Activity timeline
Admin role guard on all endpoints
Bulk actions (suspend, delete, export)
Search and filter across all entities
Export to CSV
New user registration stats
System health monitoring
Get SaaS Starter Pro — $249

One-time purchase. 14-day money-back guarantee.