The Role Management System is a React-based application designed to manage users and roles. It allows administrators to create, update, delete, and assign roles to users seamlessly. The interface is user-friendly, making it easy to manage permissions and maintain organizational hierarchy. It is serverless and uses local storage.
- Role Management: Add, edit, delete, and view roles with predefined permissions.
- User Management: Assign roles to users and manage their details.
- Dynamic Updates: Reflect changes in roles and users instantly (requires page refresh in current implementation).
- Responsive Design: Fully responsive and optimized for different screen sizes.
Ensure you have the following installed:
- Node.js (v14 or later)
- Git (for cloning the repository)
- Netlify CLI (optional, for hosting on Netlify)
-
Clone the Repository
git clone https://github.com/Rohith2517/Role_system.git cd Role_system -
Install Dependencies
npm install
-
Run the Development Server
npm start
The application will be accessible at http://localhost:3000.
-
Build for Production
To create a production-ready build, run:
npm run build
This generates a
build/folder that can be deployed.
-
Build the project:
npm run build
-
Drag and drop the
build/folder into your Netlify dashboard, or use the Netlify CLI:netlify deploy --prod
-
Install the GitHub Pages package:
npm install gh-pages --save-dev
-
Add the following to your
package.json:"homepage": "https://yourusername.github.io/Role_system", "scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build" }
-
Deploy using:
npm run deploy
src/: Contains all source files.components/: Includes reusable UI components likeRoleTable,UserTable, andRoleForm.App.js: The main application file.public/: Contains static assets.build/: Generated after runningnpm run build, used for deployment.
- Add roles with predefined permissions (e.g., Read, Write, Delete).
- Edit or delete roles dynamically.
- Assign roles to users from a dropdown list.
- Users can be updated or removed.
- The application features a responsive navigation bar with a Dashboard title and buttons for navigating between Role Management and User Management sections.
Currently, changes to roles are visible only after refreshing the page.
To implement real-time updates, you can use React Context or a state management library like Redux.
- Add backend integration for persistent data storage.
- Implement role-based access control for users.