Sign in for the first time
Create the admin, find your password, and log into /admin — for any setup path (CLI, IDE agent, or a manual clone).
Your storefront is public, but /admin is locked. This page gets you signed in the first time — whichever way you set the project up.
TL;DR
npx create-cartwright@latest my-shop # scaffolds, installs, AND prepares the DB
cd my-shop && pnpm dev
# open http://localhost:3000/account/login → Password tab
# email = brand.emails.admin (from brand.config.ts); password = cat .admin-credentialsThe seed prints your admin email + password once and saves them to .admin-credentials (gitignored) in the project root. First login makes you set your own password, then the /admin/setup wizard opens.
Step by step
- Create the database + admin.
npx create-cartwright@latestdoes this for you through the engine's guarded setup command. If you cloned manually or used--no-install, use the same path from the project root:
pnpm install
pnpm db:setup # apply schema + seed admin/demo; prints the logindb:setup prints a banner with your admin email + password and writes them to .admin-credentials.
- Start the app.
pnpm dev # http://localhost:3000-
Sign in with the password. Open
/account/loginand use the Password tab:- Email —
brand.emails.adminfrombrand.config.ts. - Password — the value in
.admin-credentials(cat .admin-credentials), or thedb seedoutput.
- Email —
-
Set your own password. First login redirects to
/admin/kontoand requires a new password. After that you land in the/admin/setupwizard (brand → theme → keys → first category).
Why password, not magic-link?
A brand-new shop has no email provider, so the login page shows only the Password tab — magic-link can't deliver yet. Once you set RESEND_API_KEY, the magic-link tab appears; in local dev the link is written to .mail-previews/ instead of being sent. Password is the intended first-run path.
Choose your own password
Set ADMIN_PASSWORD before seeding and the admin is created with exactly that (and no forced change):
ADMIN_PASSWORD="your-strong-password" pnpm db:setupTroubleshooting
| Symptom | Fix |
|---|---|
| "Wrong email or password" / no admin exists | The setup did not finish. Run pnpm db:setup. |
| Can't find the password | cat .admin-credentials in the project root (it's gitignored), or re-read the db seed output. |
| Login page shows only Password (no magic-link) | Expected until RESEND_API_KEY is set. |
| Magic-link "sent" but no email arrives | In dev there's no real send — open the newest file in .mail-previews/. |
Boot error: Missing required env: AUTH_SECRET | Set AUTH_SECRET (openssl rand -hex 32) in .env.local. create-cartwright sets it; manual clones must. |
/admin/setup bounces you to /account/login | That's the auth gate — sign in first, then it opens. |
AI Agent Quick Start
Two measured, terminal-only paths for AI coding agents — a plain website (--profile site) in about a minute, or the 99-second path to a designed, database-backed homepage.
From code to live
The complete path from a scaffolded shop on your laptop to a live store on the internet — using GitHub and Vercel, the free stack you own.