Installation
What you'll have afterwards:
- A Nuxt 4 app running on
http://localhost:3000, with sign-up, sign-in and account pages. - You, signed in with the
adminrole, so the admin area at/adminis open to you. - A local database with every table the app needs.
Every new app starts from a starter: a ready-made project you copy instead of wiring the
modules yourself. This page uses the workspace starter, a web app with sign-in, account pages and user management. For
a mobile app, see Other starters.
Requirements
| Tool | Version |
|---|---|
| Node.js | 24 (the starter pins 24.22.1 in .nvmrc) |
| pnpm | 12.10.0 (pinned in the starter's package.json, use corepack enable) |
This is the only requirements table in these docs. Other pages list only the extra tools they need.
1. Create the project
The starters live in .starters/ of the Frigear
repository. Copy one with the CLI or with giget. Either way
you get a pnpm workspace that uses the published @frigear-nu modules and builds on its own.
GIGET_AUTH to a GitHub token that can read it, for example
GIGET_AUTH=$(gh auth token). Both commands below need it.corepack enable
pnpm create frigear-app my-app --platform web
cd my-app
git init
pnpx giget@latest gh:Frigear-nu/frigear-nu/.starters/workspace my-app
cd my-app
git init
corepack enable
pnpm install
pnpm create frigear-app runs the CLI's init command. It also names the root package after the folder. It then runs
pnpm install and pnpm prepare:env for you.
--platform mobile for the mobile starter, or --platform web,mobile for
mobile-standalone. Other starters compares them.2. Run it for the first time
Create apps/web/.env from the example file:
pnpm prepare:env
scripts/prepare-env.mjs copies every apps/*/.env.example to .env. It fills in empty secrets, here
NUXT_APP_SECRET, which seals the session cookie. It never overwrites a value, so it is safe to run again.
Then set the one variable that is yours in apps/web/.env:
| Variable | What it is |
|---|---|
NUXT_ACL_ADMINS | The access control list (ACL) of admins: comma separated emails that always get the admin role, once the address is verified. Put your own email here. |
NUXT_ACL_ADMINS before you start the app. The list is read when the server starts, and applies to every request
once the address is verified, so an email added later counts after a restart of pnpm dev.Start the app:
pnpm dev
On the first start, NuxtHub creates a local SQLite database in apps/web/.data/. It applies
the committed migrations to it.
3. Sign in
- Open
http://localhost:3000and choose Create account. Sign up with the email you put inNUXT_ACL_ADMINS. - Verify the address. The starter has
verifyEmailon, so signing up sends a verification email instead of signing you in. Thelogdriver prints it in the terminal that runspnpm dev: open its link and press Continue. The list only counts for a verified address, so nobody else can claim your admin role by signing up with it first. - You land on
/account, with Profile, Security and API tokens pages. An Admin badge shows that the list matched. - Open
/adminfor the admin dashboard. Users (/admin/users) lists, creates and edits users.
/account with the Admin badge, and /admin/users listing your own user.log driver of Notify prints them in
the terminal that runs pnpm dev. Configure a real driver before you deploy.Other starters
| You want | Starter | Guide |
|---|---|---|
| A web app with sign-in, account pages and user management | workspace | Workspace starter |
| An iOS and Android app that signs in at an existing issuer (frigear.nu, your own Frigear server, Keycloak, ...) | mobile | Mobile starter |
| A mobile app with its own users and API, and nothing else to run | mobile-standalone | Standalone mobile starter |
A mobile app next to a web app you already made from workspace | mobile's apps/mobile only | Add apps/mobile to an existing workspace |
workspace for a website, or mobile-standalone for an app. Both run without any outside service,
and you can split them up later.Compare the starters
workspace | mobile | mobile-standalone | |
|---|---|---|---|
| Apps | apps/web | apps/mobile | apps/web + apps/mobile |
| Users and sign-in | In apps/web (Auth, Users), cookie sessions | At a remote issuer, as a public OAuth application (Auth in client mode), with guards from Authorization | In apps/web. The app signs in there through OAuth Server |
| Database | SQLite through NuxtHub, with committed migrations | None | Same as workspace, plus the oauth_* tables |
| API | apps/web/server | The issuer's or your own, called with bearer tokens | apps/web/server, open to the app through cors.paths |
| Needs before the first run | Nothing. Set NUXT_ACL_ADMINS to your email to get the admin role | An issuer with a registered OAuth application, set in apps/mobile/.env (own OAuth server) | Nothing. Set NUXT_ACL_ADMINS to your email to get the admin role |
| Native builds | No | iOS and Android through Capacitor (Mobile) | iOS and Android through Capacitor |
Each guide has its own create and first-run steps. The rest of Get Started follows the workspace starter.
mobile does not run on its own after those steps. Its .env points at http://localhost:3000. Set
NUXT_PUBLIC_AUTHENTICATION_CLIENT_ISSUER and NUXT_PUBLIC_AUTHENTICATION_CLIENT_API_BASE to your issuer first. Or
run mobile-standalone, which provides that server at localhost:3000.Use an existing Nuxt 4 app
To add the modules to a host app you already have, instead of starting from a starter:
- Install the modules and their peers:
pnpm add @frigear-nu/users @frigear-nu/authorization @frigear-nu/account @frigear-nu/menu \ @nuxthub/core @nuxt/ui @libsql/client drizzle-orm drizzle-kit tailwindcss \ @simplewebauthn/browser @simplewebauthn/server - Add the modules and options from Configuration to your
nuxt.config.ts. - Load Nuxt UI's styles in your CSS (
@import "tailwindcss"; @import "@nuxt/ui";). Wrap the app in<UApp>. - Set
NUXT_APP_SECRETin production (32+ characters; Nuxt generates one in development). For the first admin, copyserver/plugins/authorization-roles.tsfrom the starter and defineauthorization.roles. - Run
nuxt db generateand commitserver/db/migrations.
Next steps
- Project structure – find your way around the files the starter created.
- Authentication – turn on more sign-in methods and protect your own routes.
- Adding modules – add forms, payments, events and the rest.