Quickstart
Run Webrizen SSO and the demo Restaurant app locally, then sign in to the demo with your Webrizen account. You need Node.js 20+ and pnpm. Docker isn't required.
Install dependencies
pnpm installStart the local database
A real PostgreSQL server runs from npm, with data kept in apps/accounts/.data.
Leave this terminal open.
pnpm --filter @webrizen/accounts db:localCreate the tables
pnpm db:migrateStart the SSO server
pnpm devOpen http://localhost:3000 and create an account. Until you configure SMTP, verification codes are printed in this terminal instead of emailed.
Make yourself a platform admin
Platform admins can register apps and manage all users.
pnpm --filter @webrizen/accounts make-admin you@company.comAlternatively, put your email in PLATFORM_ADMIN_EMAILS before you sign up.
Register the demo app
Go to Platform → Applications → Register application and use:
| Field | Value |
|---|---|
| Application type | Web app (server) |
| Redirect URI | http://127.0.0.1:4000/api/auth/webrizen/callback |
| Sign-out redirect URI | http://127.0.0.1:4000 |
| First-party | ✓ |
Copy the credentials shown after registering. The secret is only shown once.
Run the demo
APP_URL=http://127.0.0.1:4000
WEBRIZEN_SSO_ISSUER=http://localhost:3000/api/auth
WEBRIZEN_SSO_CLIENT_ID=paste-client-id
WEBRIZEN_SSO_CLIENT_SECRET=paste-client-secret
WEBRIZEN_SSO_SESSION_SECRET=any-random-string-of-32-plus-characterspnpm dev:demoOpen http://127.0.0.1:4000 and click Sign in with Webrizen. Because you're already signed in to Webrizen, you'll land back in the demo without typing anything.
Browsers share cookies between ports on the same host. Serving the demo from 127.0.0.1
and the SSO server from localhost keeps their sessions separate, just like different
domains in production.
Try the permissions
- In Roles & permissions, pick the cashier template and create it.
- Invite a second email address as
cashier. The invitation link appears in the terminal. - Sign up as that person, accept the invite, then sign in to the demo.
The demo unlocks Take order and locks everything else. That's the role you just built, travelling inside the token.