Remove SuperAdmin

Remove the SuperAdmin panel and role.

Steps

  1. Delete directories and files:

    • app/api/superadmin/ (SuperAdmin API routes)
    • app/(dashboard)/dashboard/superadmin/ (SuperAdmin panel pages)
    • hooks/core/use-superadmin.ts (client-side SuperAdmin hooks)
  2. Update Prisma schema (prisma/schema.prisma):

    • Remove SUPERADMIN from the Role enum (keep USER and ADMIN)
  3. Update auth helpers:

    • Remove getSuperAdminSession() from your auth helpers (or leave it as a no-op)
    • Update any guards that check for SUPERADMIN role
  4. Clean up navigation: Remove SuperAdmin links from the dashboard sidebar.

  5. Run pnpm db:push to sync the schema.

Note: The regular Admin panel (ADMIN role) is independent and will continue to work.

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

Get LaunchFst →