How OrgSight uses Clerk
Key: Container Infrastructure. A dashed box is where its contents run.Components on screen
These come from Clerk’s React library,@clerk/react. Both apps use one set of colours for them, in
src/lib/clerkAppearance.ts.
The apps also read from Clerk directly:
From sign-in to access
- Clerk signs the person in and gives their browser a session token.
- The app sends the token with its requests to the backend.
- The backend checks that Clerk issued it, then reads these details from it.
name, email and org_features aren’t in Clerk’s standard token. They’re added in Clerk, under Sessions.
The back office works differently. Operators don’t need an organisation: the backend looks them up in its own operators
table.
Features
Calls from the backend
These use Clerk’s Backend API, with the secret key inCLERK_SECRET_KEY.
Worth knowing
- Clerk doesn’t tell OrgSight about changes. There are no webhooks yet, so the backend sees a new role or organisation when the person’s session token next refreshes.
- Hiding a feature isn’t what protects it. The web app hides what an organisation doesn’t have, and the backend checks too.
- Sign-in has its own addresses. They’re listed in DNS and security.

