Role-Based Access Control (RBAC) UI
A modern, responsive Role-Based Access Control system built with React Tailwind CSS, featuring granular permissions management, user administration, and role-based access controls.
š Features
User Management
- š„ View and manage users in a lexically sorted table
- ā Add new users with role assignment
- āļø Edit user roles and status
- šļø Delete users (admin only)
- š User status tracking (Active/Inactive)
Role Management
- š Pre-configured roles (Admin, Moderator, User)
- š Role-based access control
- š Edit role permissions
- šÆ Granular permission management
Permissions System
- šļø Granular permission controls
- š Category-based permission organization
- š Dynamic permission inheritance
- š”ļø Secure access control
Data Management
- š¾ Local storage persistence
- š Automatic data caching
- š Efficient state management
š ļø Technical Stack
- Framework: React 18 + Vite
- Styling: Tailwind CSS
- Data Persistence: localStorage
š Getting Started
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Installation
- Clone the repository
git clone https://github.com/yourusername/rbac-ui.git
- Install dependencies
cd rbac-ui
npm install
- Start the development server
npm run dev
- Build for production
npm run build
š Role Hierarchy & Permissions
Admin
- Full system access
- Manage users and roles
- Delete users
- Modify any role
- Access all features
Moderator
- Create users (limited to User/Moderator roles)
- View users
- Edit basic user info
- Cannot delete users
- Cannot modify Admin roles
User
- View users only
- No management capabilities
- Basic access only
š Security Features
- Role-based access control
- Permission-based feature access
- Input validation
- Secure state management
- Protected routes
- Error handling
š” Key Features
Caching System
The application implements a custom caching system using localStorage:
- First-time data fetch from source
- Subsequent fetches from cache
- Automatic cache updates
- Persistent data storage
User Management
- Add, edit, and delete users
- Assign and modify roles
- Toggle user status
- Sort users alphabetically
- Drag-and-drop reordering (admin only)
Permission Management
- Granular permission control
- Role-based access
- Feature-level restrictions
- Dynamic permission updates
š ļø Development
Project Structure
rbac-ui/
āāā src/
ā āāā components/
ā ā āāā UsersTable.jsx
ā ā āāā EditRoleModal.jsx
ā ā āāā AddUserModal.jsx
ā āāā store/
ā ā āāā Data.js
ā āāā App.jsx
āāā public/
āāā package.json
š License
This project is licensed under the MIT License - see the LICENSE file for details.
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project Link: https://github.com/kriti-raj/rbac-ui