permix-ssr
Installation
SKILL.md
Permix — SSR and hydration
Docs: https://permix.letstri.dev/docs/guide/hydration
Why dehydrate?
Send a JSON snapshot of booleans to the browser so the first paint can respect permissions without re-fetching policy on the client.
Server
permix.setup(serverRules)
const state = permix.dehydrate()
// { post: { create: true, read: false } } — functions evaluated once without data
Pass state to the client (embed in HTML, RSC payload, loader data, etc.).