Hype StackHype Stack
Docs

Admin app

The SaaS starters ship a separate admin app into your monorepo at apps/admin. It's a third surface next to apps/frontend and apps/backend, built for operators (you and your team), not your end users. Both starters ship the same admin, so you get it whether you pick WorkOS or Better Auth.

What's inside

The admin app has its own login and a set of private, role-gated screens:

  • Dashboard - a platform overview with signup trends and headline stats.
  • Users - browse, search, and manage every user across all organizations.
  • Organizations - inspect orgs, their members, and details.
  • Settings - super-admin-only screen to manage who else has admin access.

On the backend, the starter adds /admin API routes, admin-only auth, and an admin Prisma model to store admin records.

Access control

Admin access is governed by an AdminRole (super_admin or admin). There are two ways someone becomes an admin:

  1. Bootstrap super admins via the SUPER_ADMIN_EMAIL env var. It's a comma-separated list of emails. Anyone signing in with one of these emails is always a super admin, with no row in the admin table required. Use this to get your first admin in.
  2. Admin records stored in the admin table. Super admins add and manage these from the admin Settings screen.

Set the bootstrap list in apps/backend/.env:

bash
SUPER_ADMIN_EMAIL=you@example.com,teammate@example.com

How feature packs extend the admin

Feature packs don't ship their own admin app. They plug into the one the starter provides:

  • Billing (Stripe) adds a revenue row to the admin dashboard and a billing card to the organization details page. No extra admin route, it composes into the existing screens.
  • Notifications ships its own admin route and a Notifications nav entry so you can send campaigns to users from the admin.

Install any of these on top of a starter and the widgets and routes show up in the admin automatically.

Running it

The admin app runs alongside the frontend and backend. From the project root:

bash
pnpm dev

Nx starts all three apps with hot reload. Open the admin app, sign in with a SUPER_ADMIN_EMAIL account, and you're in.

Environment variables

VariablePurpose
SUPER_ADMIN_EMAILComma-separated bootstrap super admin emails. Optional but you need at least one to sign in the first time.
Sponsor open source

Every purchase and sponsorship funds my 8+ years of work on open source given freely to the community. It keeps the lights on, funds new packs, and keeps the ecosystem alive. Even a small tier means a lot. Thank you!

Sponsor on GitHub