airi/apps/ui-server-auth
2026-06-11 22:26:39 +08:00
..
public feat(admin-ui): update admin UI URLs to remove trailing slashes and adjust redirects 2026-06-09 17:46:58 +08:00
src feat(auth): enhance trusted admin redirect handling and add local patterns 2026-06-11 22:26:39 +08:00
index.html refactor(ui-server-auth,server): use better design of signin page 2026-04-10 16:25:11 +08:00
package.json chore: update package dependencies and remove specific catalog references 2026-06-07 19:45:28 +08:00
README.md feat(auth): update AUTH_UI_URL to point to accounts.airi.build 2026-06-09 18:01:34 +08:00
tsconfig.json fix(stage-pages,stage-ui): plugin host update 2026-04-22 14:23:45 +08:00
uno.config.ts feat(ui-server-auth): init server auth page 2026-04-03 01:26:38 +08:00
vite-env.d.ts feat(ui-server-auth): init server auth page 2026-04-03 01:26:38 +08:00
vite.config.ts feat(auth): migrate auth ui to unique domain 2026-06-09 00:15:34 +08:00
vitest.config.ts wip(ui-server-auth): basic ui, not yet finalized 2026-04-03 15:43:28 +08:00
wrangler.toml feat(auth): migrate auth ui to unique domain 2026-06-09 00:15:34 +08:00

AIRI Server Auth UI

Auth UI for the hosted AIRI server. It is a Vue/Vite app deployed separately from apps/server and used for Better Auth sign-in, email verification, password reset, profile, and Electron OIDC callback relay flows.

Use When

  • Building user-facing auth pages backed by server /api/auth/* endpoints.
  • Updating login, sign-up, verification, reset-password, account profile, or Electron auth relay UX.
  • Deploying the auth surface to Cloudflare Workers Static Assets.

Do Not Use When

  • Building the main stage app sign-in callback pages that consume OIDC tokens.
  • Adding admin-only operational pages. Those belong in apps/ui-admin.

Commands

pnpm -F @proj-airi/ui-server-auth dev
pnpm -F @proj-airi/ui-server-auth typecheck
pnpm -F @proj-airi/ui-server-auth build

Deployment

pnpm -F @proj-airi/ui-server-auth build writes to apps/ui-server-auth/dist. Vue Router owns /ui/*, while Vite assets are served from root /assets/* so Cloudflare Pages can serve static files without rewriting nested asset paths. Cloudflare Pages uses public/_redirects to route /ui/* back to the SPA HTML.

The production GitHub Actions workflow deploys this app to the Cloudflare Pages project moeru-ai-airi-auth with separate auth-account credentials:

AUTH_CLOUDFLARE_ACCOUNT_ID=...
AUTH_CLOUDFLARE_API_TOKEN=...

apps/ui-server-auth/wrangler.toml remains available for Workers Static Assets deployments, but production CI uses Cloudflare Pages direct upload.

Production expects:

VITE_SERVER_URL=https://api.airi.build

The server redirects historical /auth/* URLs to AUTH_UI_URL, which defaults to https://accounts.airi.build/ui.

The server-dev workflow deploys a Cloudflare Pages branch build at https://server-dev.moeru-ai-airi-auth.pages.dev/ui/ with VITE_SERVER_URL=https://airi-server-dev.up.railway.app. Set the server-dev API environment variable AUTH_UI_URL=https://server-dev.moeru-ai-airi-auth.pages.dev/ui when the full dev auth redirect chain should stay on server-dev.