Quickstart: local Admin
New generated CF and Sites apps include Admin by default. To leave it out, select smaller features explicitly. This tutorial shows the existing direct-authored Worker integration with local email OTP; use it when you own the Worker entry. Project layout and CLI describes the new generated path.
The procedural source of truth is the official example:
docs/examples/host-local-admin-otp/README.md
Copy that directory outside the SDK checkout (or author the same files from it). Interview the human for one value before writing files: the bootstrap owner email. The example uses owner@example.com. Then:
pnpm install && pnpm generate && pnpm devOpen the wrangler Ready-on URL (http://127.0.0.1:8787/admin/sign-in), submit the owner email, and read the OTP from wrangler logs. mantle generate syncs the prebuilt Admin SPA; do not Vite-build Admin.
Traps (documented on the example):
- Prefer
127.0.0.1overlocalhost(INVALID_ORIGIN). pnpm check/ smoke rewrites.dev.varsto a smoke-only port — restore it from.dev.vars.examplebeforepnpm dev.
Pin every selected @aotter/mantle* package to the same exact version; see Versions. Admin needs both @aotter/mantle-admin and @aotter/mantle-admin-ui, wrangler ASSETS on ./public, and createAuth email-otp + ConsoleEmailSender.
Next steps
- Project layout and the CLI loop — the files you own, every CLI flag, the daily check loop, ASSETS as a hard Admin requirement.
- Authentication — production senders, GitHub / hosted modes, roles.
- The conventional Worker — handlers and extra routes.
- Quickstart: a minimal Worker — API-only embed without Admin.