A learning path for explainable permissions.
The Accessly docs should help a React developer understand the model, install the package, build the first permission check, and find any API without digging through generated reference pages.
Install first
Installation stays short and direct. The default package manager is npm, with other package managers available as secondary tabs in implementation pages.
Build one permission check
Quick Start should get to visible behavior quickly: provide an access model, render with Can, then explain the decision model only after the user has seen it work.
import { PermissionProvider, Can } from "accessly";
export function App() {
return (
<PermissionProvider
access={{ permissions: ["users.create"] }}
>
<Can permission="users.create">
<CreateUserButton />
</Can>
</PermissionProvider>
);
}Complete documentation architecture
The structure separates learning, workflow, debugging, and reference material. That keeps beginner pages calm while still making each API searchable and directly addressable.
Start
4 pagesOverview
Getting Started
Installation
Quick Start
Learn
5 pagesCore Concepts
React APIs
Backend Adapters
Navigation
Debugging
Guides
2 pagesUse Cases
AI Prompts
Reference
3 pagesAPI Reference
FAQ
Known Limitations
What is Accessly?
Accessly is a small React permission layer for rendering UI from an explainable access model.
Why Accessly?
Accessly exists to make frontend permission logic consistent, inspectable, and easier to teach.
AccessModel
AccessModel is the normalized shape Accessly reads when evaluating permissions.
PermissionProvider
The provider is the boundary that places the current access model into React context.
Permission Engine
The engine evaluates roles, permissions, and flags into one explainable result.
AccessDecision
An AccessDecision is the result object that powers UI states and debugging.
Backend Adapters
Adapters let teams keep their backend shape while giving Accessly a consistent model.
PermissionProvider
The React PermissionProvider wires a current AccessModel into the component tree.
Can
Can renders children when a permission, role, or feature flag is allowed.
Cannot
Cannot renders inverse access states without making product code harder to read.
ProtectedRoute
ProtectedRoute gates route-level UI while keeping the decision model inspectable.
usePermission
usePermission gives custom components a small boolean permission check.
useAccessDecision
useAccessDecision returns the full explainable decision for a single check.
useAccessModel
useAccessModel exposes the current normalized model for advanced UI composition.
createAdapter
createAdapter normalizes backend-specific permission payloads into an AccessModel.
Built-in adapters
Built-in adapters should cover common backend response shapes without hiding the model.
Adapter patterns
Adapter patterns are small task guides for common backend integration problems.
Decision explanations
Decision explanations help developers understand why a permission passed or failed.
formatDecision
formatDecision turns a raw decision object into a readable developer message.
inspectAccess
inspectAccess should help developers inspect a model before debugging individual checks.
API Reference
The API Reference should be the fastest way to find exact names, signatures, and related pages.
FAQ
The FAQ should answer practical Accessly questions without becoming the primary docs.
Known Limitations
Known limitations should be direct, specific, and paired with recommended approaches.
Navigation flow
The main path is intentionally linear. It gives new readers a fast mental model before sending them into individual React APIs or backend adapter details.
Core architecture
Diagrams should show how backend data becomes a decision. Each core concept page should teach one stage of this pipeline.
Backend response -> createAdapter() -> AccessModel -> PermissionProvider -> Permission Engine -> AccessDecision -> Can / hooks / navigation
The normalized shape Accessly evaluates.
The matching layer that evaluates roles, flags, and permissions.
The explainable result used by UI, hooks, and debugging tools.
The boundary that lets each app keep its own backend shape.
Every docs page follows one shape
The template should make pages predictable without forcing every page to become long. Short reference pages can compress sections; learning pages can expand them.
Page types
Accessly needs three repeatable page patterns: concept pages for mental models, API pages for exact usage, and workflow pages for task completion.
Concept pages
Teach one mental model, show where it sits in the pipeline, then link to the APIs that use it.
API pages
Lead with usage, keep parameters scannable, then explain edge cases and debugging behavior.
Workflow pages
Guide developers through a task from setup to a working result, with Lab links where behavior is inspectable.
URL structure
Search depends on stable titles and predictable paths. These URLs are the current documentation routes for the release-ready docs set.
/docsDocumentation home/docs/getting-startedGetting Started/docs/installationInstallation/docs/quick-startQuick Start/docs/core-conceptsCore Concepts/docs/react-apisReact APIs/docs/backend-adaptersBackend Adapters/docs/navigationNavigation/docs/debuggingDebugging/docs/use-casesUse Cases/docs/aiAI Prompts/docs/api-referenceAPI Reference/docs/faqFAQ/docs/known-limitationsKnown LimitationsDocumentation UI recommendations
The docs should feel like a premium developer product: quiet, readable, precise, and fast to scan.
