Admin Dashboard 🚀 </>
An Admin Dashboard Application for Role-Based Access Control (RBAC). It empowers administrators to manage users, roles, and permissions with ease. Built with React, Node.js, and MongoDB for efficient user and role management.
-
User Management
- View user details such as name, email, role, and status.
- Add new users and assign roles dynamically.
- Edit user details and status.
- Delete user accounts with a single click.
-
Role Management
- Create new roles with custom permissions.
- Edit existing roles and update their permissions.
- Delete roles while ensuring system integrity.
-
Authentication
- Secure login system for admin access.
-
Security
- Jwt based login and session management.
- Bcrypt hashed password for user privacy.
-
Dashboard Analytics
- Total users, active users, and role statistics at a glance.
- React.js: Dynamic UI for managing users and roles.
- CSS: Custom styling for an elegant and responsive design.
- Toastify: For real-time notifications.
- Node.js: RESTful API for handling requests.
- Express.js: Backend framework for rapid API development.
- MongoDB: NoSQL database for storing user and role data.
- Axios: Handling API calls.
- React Router: Smooth navigation within the app.
- Bcrypt & JWT: Secure authentication.
Ensure the following tools are installed:
-
Clone the repository:
git clone https://github.com/ThakurSaAbhay/Admin-Dashboard.git cd Admin-Dashboard/rbac-ui
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Build for production:
npm run build
-
Navigate to the backend directory:
cd ../backend
-
Install dependencies:
npm install
-
Set up environment variables: Create a
.env
file with the following content:MONGO_URI=mongodb://localhost:27017/admin-dashboard JWT_SECRET=your_secret_key PORT=5000
-
Start the backend server:
node server.js
GET /api/users
: Fetch all users.POST /api/users
: Create a new user.PUT /api/users/:id
: Update user details.DELETE /api/users/:id
: Delete a user.
GET /api/roles
: Fetch all roles.POST /api/roles
: Create a new role.PUT /api/roles/:id
: Update role details.DELETE /api/roles/:id
: Delete a role.
We welcome contributions! Follow these steps to get started:
-
Fork this repository.
-
Create a new branch for your feature:
git checkout -b feature-name
-
Commit and push your changes:
git commit -m "Add new feature" git push origin feature-name
-
Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to the open-source community for their tools and libraries.