Auth Starter (Better Auth)
The free starter. Sign in, sessions, password reset, email verification, and a profile page, powered by
Better Auth on your own Postgres. This is the starter-auth-betterauth pack. No
organizations to manage, no invitations, no onboarding, no admin app.
npx @hype-stack/cli compose --packs starter-auth-betterauth,layout-basicFor session flow, middleware, and route guards, see Authentication.
What you get
- Email/password and Google sign-in, with the same callback handling as the SaaS starters
- Server-side sessions in signed cookies, refresh and validation middleware
- Password reset and email verification through Resend
- A settings page with a profile tab (name, avatar), and the settings-tabs registry feature packs extend
- The same
/users/mecontract, CASL permission layer, andhasAccessmiddleware the SaaS starters ship - Mobile and browser-extension slots with the auth screens and the profile screen
The personal workspace
Every account gets an organization named Personal workspace the moment it is created, and every session opens inside
it. You never see it: there is no switcher, no members page, no invitations. It exists because every feature pack scopes
its data to the active organization, and it is what makes them install on this starter exactly as they do on a SaaS
one. Billing, projects, calendar, whiteboard, teams, newsletter, and cookies all work here.
Two packs need more than the free starter provides and refuse to install on it by name: pack-notifications (it ships
an invitations section) and anything that needs the admin app. The install output says which capability is missing.
Growing into a SaaS starter
When you need teams, invitations, or the admin app, swap the starter:
npx @hype-stack/cli compose --packs starter-saas-betterauthThe schema is the SaaS starters' schema, so there is no migration: the personal workspace becomes the user's first
team. The CLI replaces the files both starters ship, removes the ones only the free starter had, registers the
apps/admin directory again, and leaves your own files alone. The WorkOS starter is the same swap with
starter-saas-workos.
What you need
- A Google OAuth web app, if you want Google sign-in. Optional; without the keys the button is not offered.
- Resend for transactional email (password reset, email verification). Uses the base template's
RESEND_API_KEY. - Postgres and Valkey (base services).
Environment variables
| Variable | Purpose |
|---|---|
BETTER_AUTH_URL | Origin Better Auth runs on (e.g. http://localhost:3000) |
BETTER_AUTH_SECRET | Auth secret. The CLI generates one at install time |
GOOGLE_CLIENT_ID | Google OAuth client ID (optional) |
GOOGLE_CLIENT_SECRET | Google OAuth client secret (optional) |
RESEND_API_KEY | Transactional email (password reset, verification) |
The Google callback is /api/auth/callback/google appended to your BETTER_AUTH_URL, the same as for the SaaS
starter. See SaaS Starter (Better Auth) for the Google Cloud
Console steps.
The admin app
The base template ships apps/admin, and this starter ships nothing into it. The CLI leaves the directory on disk but
unregisters it in stack.json, so feature packs skip their admin widgets and nothing installs into an app with no
login. Upgrading to a SaaS starter registers it again.
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!
