Admin panel for managing roles, permissions, and user access in a workspace.
- Create custom roles with granular permissions across projects, tasks, members, billing, and settings.
- Edit permissions through a visual matrix. Toggle individual actions per resource.
- Assign one or more roles to users and manage their activation status.
- Preview any user's effective permissions, resolved across all assigned roles.
| Technology | Purpose |
|---|---|
| Next.js 14 | App Router, API route handlers, server rendering |
| TypeScript | Type safety across components, API, and data layer |
| Tailwind CSS | Utility-first styling, no CSS modules |
| lucide-react | Icon set for UI controls and status indicators |
No database and no environment variables required. All data lives in memory.
- Clone the repo
git clone https://github.com/ksploitx/workbench-rbac.git cd workbench-rbac - Install dependencies
npm install - Start the dev server
npm run dev - Open http://localhost:3000
app/ # Pages (roles, users, permissions) and API route handlers
components/ # Shared UI — sidebar, header, search context
lib/ # Types, permission definitions, in-memory data store
README.md # This file
When a user has multiple roles, their effective permissions are the union of all permissions from every assigned role. If any role grants a permission, the user has it. Permissions are additive, never subtracted.
For example, if a user has the Member role (which grants projects.view, projects.create, projects.edit, tasks.view, tasks.create, tasks.edit, tasks.assign, and members.view) and the Contractor role (which grants projects.view, tasks.view, tasks.edit, and tasks.assign), their effective permissions include the combined set of both. The overlap is merged, not duplicated.