Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mansi1309/vrv-security-s-backend-developer-intern-assignment
https://github.com/mansi1309/vrv-security-s-backend-developer-intern-assignment
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mansi1309/vrv-security-s-backend-developer-intern-assignment
- Owner: mansi1309
- Created: 2024-11-29T07:02:17.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-29T07:31:15.000Z (about 1 month ago)
- Last Synced: 2024-11-29T08:32:33.980Z (about 1 month ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Role-Based Access Control (RBAC) UI
VRV Security’s Backend Developer Intern Assignment
## Deployment
-> To deploy this project run
```bash
npm install
```-> Database Used Mongodb|| so start Mongodb service and import admin db using STUDIO 3T
#### OR CREATE
| DB NAME | ADMIN COLLECTION
| :-------- | :------- |
| `RBAC` | `admin` |#### in admin Collection insert this data or create Like
```
{
"name" : "admin",
"email" : "[email protected]",
"password" : "$2b$10$Q4RBLd86dgJO1sFJjDxJa.jpahPgftOIuPzqX4DI1G2KY3AoSyjeC",
"role" : "admin"
}
```
### (GIVEN PASSWORD HASH VALUE IS 1 )## Environment Variables
To run this project, you will need to add the following environment variables to your .env file (and manually added to this repo if unable to clone .env use this)
```
DB_URL=mongodb://localhost:27017/
DB_NAME=RBAC
USER_COLLECTION=users
ADMIN_COLLECTION=admin
MODERATOR_COLLECTION=moderators
JWT_SECRET=this-is-my-secret-key
SALT_ROUND=10`
```-> TO RUN PROJECT
```
npm start```
-> URL```
http://localhost:3000/```
## Reference#### Methods
#### User Methods```
GET / [root]seted as login
``````
POST /
```
```
GET /signup
```
```
POST /signup
```
```
GET /dashboard
```
```
GET /logout
```
#### Admin Methods```
GET /admin
```
```
POST /admin
``````
GET /admin/dashboard
```
```
GET /admin/updateUser?
```## Features
- USER PASSWORD HASHING AND AUTHENTICATION
- JWT AUTHERISETION
- MANAGE USER ROLES
- ROLE DASED ACCESS## Tech Stack
**Client:** HandleBars, Bootstrap, TailwindCSS
**Server:** Node, Express,Mongodb,ExpreessGenartor,Bcript,JWT,
## Screenshorts
![image](https://github.com/user-attachments/assets/deb934fb-c7c1-4ed2-9f6d-942e84dc4fe0)#### WHY OTHER REST API METHOD NOT USED ?
This is UI BASED ASSESSMENT SO OTHER METHODS NOT AVAILABLE IN MOST OF BROWSERS
#### Is Additionally can use OTHER METHODS?
Yes, by adding NEEDED ROUTES on project Routes wecan use other REST methods and also pass jwt token as barear Token for verify autherisation and authentication