{ "$schema": "https://context7.com/schema/context7.json", "projectTitle": "Accessly", "description": "Accessly is a frontend permissions / authorization layer for React and Next.js (RBAC, wildcard permissions, feature flags, navigation filtering, backend adapters). Every check returns an explainable decision that says why access was allowed or denied. Not an accessibility (a11y) library. Zero runtime dependencies, ~4 KB gzip.", "folders": [ "packages/accessly", "apps/website" ], "excludeFolders": [ "**/node_modules", "**/dist", "**/tests", "**/__tests__" ], "rules": [ "Wrap the app once with `` for the current user only.", "Permission strings are dot-separated, e.g. `users.create`. Wildcards are per segment: `users.*` matches `users.create` but not `users.profile.edit`; `*` matches everything.", "Expand roles with `rolePermissions={{ admin: [\"users.*\"], support: [\"tickets.*\"] }}` on the provider.", "Components: ``, ``, ``. `permission` accepts a string or `{ any: [...] }`, `{ all: [...] }`, `{ flag: \"...\" }`.", "Hooks: `usePermission(p): boolean`, `usePermissions({ key: p, ... })` returns a boolean map, `useAccessDecision(p)` returns an AccessDecision, `useAccessModel()`.", "`ProtectedRoute` never redirects. Put router redirects in the fallback.", "While access data is loading, pass `loading` to the provider (or `isLoading` in the model) so checks return `not_ready` instead of a false denial.", "The root `accessly` entry is a client module (React context). Render `PermissionProvider`, `Can` and friends from client components or pass them serializable props from a Server Component.", "In Server Components, Route Handlers, middleware or Node, import from `accessly/core`: `checkPermission(model, { permission })`, `createAccessChecker(model, { rolePermissions })`, adapters, `filterNavigation`." ] }