Permix — check, frontend, server
Assumes a permix instance already exists (see permix-getting-started). Load the reference file that matches the task instead of reading everything:
| Task | Reference |
|---|---|
permix.check() paths, callbacks, ~all/~any, ReBAC/ABAC with entity data, isReady |
references/check.md |
React, Vue, Solid, or Svelte UI — PermixProvider, usePermix, createComponents, SSR dehydrate/hydrate for Next.js / TanStack Start |
references/frontend.md |
Protecting Express, Hono, Fastify, NestJS, tRPC, oRPC, Node, or Elysia routes — setupMiddleware, checkMiddleware, or Nest guard / @Check |
references/server.md |
Rules that apply everywhere
- Authorization must run on the server. Client-side
check(React/Vue/Solid/Svelte) is UX only — mirror every path withcheckMiddlewarein references/server.md. - Use the same schema and path strings (
post.update, not ad-hoc strings) across client hooks and server middleware, or types and behavior drift apart. checkbeforeisReadythrowsPermixNotReadyError— gate UI withisReady/isReadyAsync, and callsetupMiddlewarebeforecheckMiddlewareon the server.- SSR
hydratealone is not enough. It only restores booleans; callsetupagain on the client for function-based/ReBAC rules — see the SSR section of references/frontend.md.