SuperAdmin Panel

Platform-level management for user administration, analytics, and content moderation.

The SuperAdmin panel gives platform operators full visibility and control over the entire application. It is only accessible to users with the SUPERADMIN role.

Accessing SuperAdmin

1

Create your first account

Sign up at /signup with any email and password.

2

Promote yourself to SUPERADMIN

pnpm make-superadmin your@email.com

This runs scripts/make-superadmin.ts which updates your role in the database.

3

Access the panel

Log in and navigate to /dashboard/superadmin. The Platform section appears in the sidebar.

The make-superadmin script requires DATABASE_URL to be set. It runs with --env-file=.env automatically when called via pnpm make-superadmin.

Routes and Access Control

All SuperAdmin routes call getSuperAdminSession() which throws a 403 if the user's role is not SUPERADMIN:

export default async function SuperAdminPage() {
  await getSuperAdminSession() // blocks non-SUPERADMIN users
  return <SuperAdminDashboard />
}

Navigation items for the Platform group are hidden from non-SUPERADMIN users via getFilteredNav() in lib/config/navigation.ts.

Platform Overview

Route: /dashboard/superadmin

Displays platform-wide statistics:

  • Total users, organizations, revenue
  • Signups over time (chart)
  • Recent activity feed
  • Plan distribution breakdown

User Management

Route: /dashboard/superadmin/users

Features:

  • Paginated table of all users (20 per page)
  • Search by name or email
  • Filter by plan (FREE, STARTER, PRO, ENTERPRISE)
  • Filter by role (USER, ADMIN, SUPERADMIN)
  • Delete users
  • Plan and role badges

API endpoint: GET /api/superadmin/users

Organization Management

Route: /dashboard/superadmin/organizations

Features:

  • Paginated table of all organizations
  • Shows organization name, slug, owner, and member count
  • Delete organizations (removes all members and data)

API endpoint: GET /api/superadmin/organizations

Contact Submissions

Route: /dashboard/superadmin/contacts

Features:

  • View all contact form submissions
  • Filter by read/unread status
  • Mark messages as read
  • Delete submissions
  • Unread messages highlighted with "New" badge

API endpoint: GET /api/superadmin/contacts

Newsletter Subscribers

Route: /dashboard/superadmin/newsletter

Features:

  • Paginated table of all newsletter subscribers
  • Shows email, subscription status (Active/Unsubscribed), and date
  • Active vs. unsubscribed badge

API endpoint: GET /api/superadmin/newsletter

Feedback

Route: /dashboard/superadmin/feedback

Features:

  • View all user feedback submissions
  • Star ratings (1–5)
  • Category badges
  • Linked to submitting user (name/email)

API endpoint: GET /api/superadmin/feedback

Admin Panel (ADMIN role)

Route: /dashboard/admin

Separate from SuperAdmin, the admin panel is accessible to both ADMIN and SUPERADMIN roles. It provides a subset of management capabilities suited for moderators and support staff.

Access is controlled by getAdminSession() which allows both ADMIN and SUPERADMIN.

Promoting Users

To promote a user to SUPERADMIN using the built-in script:

pnpm make-superadmin your@email.com
# or: npx tsx scripts/make-superadmin.ts your@email.com

To change a user's role to ADMIN (via Prisma Studio or direct update):

pnpm db:studio

Or through the SuperAdmin users page at /dashboard/superadmin/users — use the role dropdown on any user row.

Demo Mode — Explore freely. Some actions are restricted. demo@launchfst.dev / demo1234

Get LaunchFst →