I pulled the latest changes from v0/collinsmwambazi88-9412-d387790b in aurastay-pms-build.
T[Pasted 20 lines]
image.png
image.png
Image 1: The Property Portal — a post-login screen showing Mwambazi's staff access card for "Collos palace, New York" with a Front Desk badge and a purple "Manage" button. Image 2: The Innward landing page dark hero — the "Launch Property" nav button is the CTA I need to transform into the Judge Demo Access entry point.
Let me gather all the relevant files in parallel.
Now I need to look up the Collos Palace property ID from the DB and read the middleware to understand the public routes:
Good. I need to look up the actual Collos Palace property ID from the DB:
I'll query the DB via the app's own lib/db.ts pattern using a Node script with the env vars:
I have everything I need. Here is the precise architecture:
app/api/auth/judge/route.ts — a public GET route that sets the innward_property cookie to the Collos Palace property ID (looked up by name), sets Clerk publicMetadata to full superadmin permissions, then redirects to /dashboardcomponents/landing/landing-nav.tsx — transform the "Launch Property" button into a glowing "Judge Demo Access" button linking to /api/auth/judgeapp/dashboard/page.tsx — detect the ?judge=1 query param and show a "Welcome Judge" toast bannermiddleware.ts — add /api/auth/judge to the public routes so it doesn't require authLet me build these now:
Now add the judge route to public routes in middleware so it works even when the judge is not signed in yet:
Also add it to isPropertyFreeRoute:
Now update the landing nav to transform the "Launch Property" button into the glowing "Judge Demo Access" button:
Also update the mobile menu version:
Now add the "Welcome Judge" toast banner to the dashboard page:
Now add the JudgeBanner render inside the dashboard JSX:
Now write the JudgeBanner component:
Now type-check and commit:
Zero errors. Commit and push:
Committed and pushed — 6 files, zero type errors. Here is what was built:
/api/auth/judge is a public GET route that looks up Collos Palace by name in Aurora, writes the innward_property cookie (24h TTL), upgrades the judge's Clerk publicMetadata to full superadmin (all 15 permissions true, role: "admin", is_judge: true), and redirects to /dashboard?judge=1. The middleware marks it public so judges land there cleanly with no auth loop. The landing nav "Launch Property" button is replaced by a glowing Judge Demo Access button (indigo-to-violet gradient, 20px glow, H0 badge) that points directly at that route. On landing, a dismissible indigo JudgeBanner greets the judge: "Welcome, Judge — Accessing Collos Palace as Superadmin."