Git Product home page Git Product logo

easyexit's People

Contributors

apricity24 avatar chhaviyadav1293 avatar mannxxx avatar nandinig24 avatar nupur513 avatar oshankiii12 avatar priyankasharma2823 avatar riri-2k3 avatar saanjh24 avatar saiushasree1 avatar shahswati098 avatar shrutikarathi6 avatar shweta-1902 avatar sindhu194 avatar tiyasa9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

easyexit's Issues

Write the controller function to update user's password

Request Structure :

{
  "oldPassword": "older One",
  "newPassword": "newer One"
}

Note

  • You'll have to check user's old password before setting new one.
  • You'll have to write the function in controllers > user.controller.js.
  • Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Creating a middleware for checking if user is authenticated as warden or not

In the middlewares > admin.middleware.js create a function with arguments: (req, res, next) and export as default export of the file.

Working of the function:

Check if there is an Authorization header present in the request. If there is, its format should be Bearer <token>.
Absence of this header means the request is unauthorized.
Extract the token from the Authorization header and verify this token if it is valid and has not expired yet.
If the token is verified and user role is set as Warden set req.isAuthenticated = true otherwise set req.isAuthenticated = false.
The User's details will be available in the payload, you will have to find the user in the database using these details and save it to req.user.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Design a logo for project EasyExit

OPEN TO ALL.
You don't need to claim this issue.

EasyExit is a project that aims to simplify the process of issuing, approving, and verification of GatePass for college students.
Enter your GitHub account and attach the Figma link in the design.json file.

Implement frontend of the verification page for Guard

Hello Contributors!!

In this task you are supposed to implement the frontend of the verification page for guard according to the UI design provided in the Figma link.

STEPS TO FOLLOW:

1. Fork this repository and clone it into your local system.
2. Go to client > component. Then create a new folder named "VP_Guard"
3. Add your code in that folder.

In case of any query feel free to reach out to us.

YOU HAVE 48HOURS TO COMPLETE THE TASK.

Screenshot of the page to be implemented has been attached for your reference.

For Guard(Outpass verification)

Create Student GatePass form page

Implement Student viewpage consisting of form to apply for new Gatepass according to the UI design provided in the linked Figma file.

Step to follow:

Fork this repository and clone it into your local system
Go to client > component > Student Gate Pass Form.
Then add your code in that folder
For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Implement Status page for Students

Hello Contributors!!

_In this task you are supposed to implement the page showing the Status of filled passes for students. The status will be shown as "Pending" until it get approval from the admin. After approval it will show "Accepted". Kindly follow the UI design provided in the Figma link._It is recommended to keep the UI design intact.

STEPS TO FOLLOW:

  1. Fork this repository and clone it into your local system.
  2. Go to client > component. Then create a new folder named "Status_students"
  3. Add your code in that folder.

In case of any query feel free to reach out to us.

DEADLINE: 28th Dec 2023 11:00 am

Happy Contributing!!

Write a function to configue nodemailer.

In the file controllers> admin.controller.js.
Configure nodemailer using environment variables

{
    user : process.env.EMAIL,
    pass : process.env.PASS

}

Also, complete the transporter.verify function which check for error and returns a success message otherwise.

For testing you will need to create an App Password for your Gmail account.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Write a function to hash user passwords

Write a function in utils > password.js that will convert a password string to a secured hash. You can use SECRET environment variable if required. Return type should be string.

For any doubts or difficulty, you can ping me on Discord, I'll try to help you out as soon as possible.

All the Best!

Implement OTP verification page for Guard

Hello Contributors!!

In this task you are supposed to implement the OTP verification page for guard according to the UI design provided in the Figma link.

STEPS TO FOLLOW:

1. Fork this repository and clone it into your local system.
2. Go to client > component. Then create a new folder named "OTP_Guard"
3. Add your code in that folder.

In case of any query feel free to reach out to us.

YOU HAVE 48HOURS TO COMPLETE THE TASK.

Screenshot of the page to be implemented has been attached for your reference.

For Guard(OTP verification)

Write the function for the user to get their profile.

Write the controller for the user to get his profile.

Request Structure :-

{
  "name": "User's name",
  "email": "[email protected]",
  "role": "Student"
}

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Write a function to configue nodemailer.

In the file controllers> admin.controller.js.
Configure nodemailer using environment variables

{
    user : process.env.EMAIL,
    pass : process.env.PASS

}

Also, complete the transporter.verify function which check for error and returns a success message otherwise.

For testing you will need to create an App Password for your Gmail account.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Create the signup functionality for the project

The entry point to every application is mostly Signup. The basic process of this functionality for a REST API is to first check the user details if they are valid to create an account or not, if they are, the account is created and the user is logged in.

The Task

The Signup functionality will be written in a function in the file controllers > auth.controller.js. The function attributes are the default attributes of a request handling function, i.e., (req, res).

The first task is to verify the details entered by the user, i.e., the name is valid or not, email is valid or not and the password's length is greater than 6 characters or not. If any of the following criteria is not matched an error response should be sent. Also check if a user does not already exist with the same email address.

The password should not be saved directly in the database, instead, it should be converted into hash and the hash should be stored in the database, the hash_password function present in the utils > password.js should help in converting password into hash.

Once the user is successfully created, you will have to create a User Secret, which is actually a JWT token. For creating this JWT token, you have to use the getJwt function present in the utils > password.js and the structure of payload object for this function is this:

To make returning a response easier, some pre-defined response functions according to the status code of the response are written in utils > responseCodes.js. It is recommended to use them for returning successful or error response. The message passed to this function should be something related to the response, as they are for developer reference, the data passed to this function is the same as present in the Response structure present in this file.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Creating a middleware for checking if user is authenticated as student or not

In the middlewares > student.middleware.js create a function with arguments: (req, res, next) and export as default export of the file.

Working of the function:

Check if there is an Authorization header present in the request. If there is, its format should be Bearer <token>.
Absence of this header means the request is unauthorized.
Extract the token from the Authorization header and verify this token if it is valid and has not expired yet.
If the token is verified and user role is set as Student set req.isAuthenticated = true otherwise set req.isAuthenticated = false.
The User's details will be available in the payload, you will have to find the user in the database using these details and save it to req.user.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Creating a middleware for checking if user is authenticated as guard or not

In the middlewares > guard.middleware.js create a function with arguments: (req, res, next) and export as default export of the file.

Working of the function:

Check if there is an Authorization header present in the request. If there is, its format should be Bearer <token>.
Absence of this header means the request is unauthorized.
Extract the token from the Authorization header and verify this token if it is valid and has not expired yet.
If the token is verified and user role is set as Guard set req.isAuthenticated = true otherwise set req.isAuthenticated = false.
The User's details will be available in the payload, you will have to find the user in the database using these details and save it to req.user.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Create the Login functionality for the project.

Like every other application, this also requires login functionality. The basic process of this functionality for a REST API is to first check the user credentials and return an error response if they are wrong. On successful verification of the user's credentials, the server should return a secret (JWT token in this case) to the User. The same secret will same be used in the future to verify which user is raising a request to the server.

The Task

The Login functionality will be written in a function in the file controllers > auth.controller.js. The function attributes are the default attributes of a request handling function, i.e., (req, res).

Request Parameters:

{
  "email": "[email protected]",
  "password": "mY-pAsSwOrD",
  "role": "Student"
}

Response Data:

{
  "name": "User Name",
  "email": "[email protected]",
  "role": "Student",
  "secret": "JWT Token"
}

For checking the password, you will have to first convert the password into hash, the hash_password function present in the utils > password.js should help in converting password into hash. Now you will have to match this hash to the password stored in the database.

Once the user is successfully verified, you will have to create a User Secret, which is actually a JWT token. For creating this JWT token, you have to use the getJwt function present in the utils > password.js

To make returning a response easier, some pre-defined response functions according to the status code of the response are written in utils > responseCodes.js. It is recommended to use them for returning successful or error response.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Implement the pending passes page for admin

Hello Contributors!!

In this task you are supposed to implement the pending passes page for admin according to the UI design provided in the Figma link.

STEPS TO FOLLOW:

1. Fork this repository and clone it into your local system.
2. Go to client > component. Then create a new folder named "PendingPasses_Admin"
3. Add your code in that folder.

In case of any query feel free to reach out to us.

YOU HAVE 48HOURS TO COMPLETE THE TASK.

Screenshot of the page to be implemented has been attached for your reference.
For Admin(To accept pending passes)
For Admin(To accept pending passes)-1

Write the function for the admin to get all pending passes.

Write the controller for the admin to get all pending outpasses, accepted outpasses and rejected outpasses in controllers> admin.controller.js.

Note :

  • For Pending outpasses, search for forms with isAccepted : null in the database and return the result.
  • For Accepted outpasses, search for forms with isAccepted : true in the database and return the result.
  • For Rejected outpasses, search for forms with isAccepted : false in the database and return the result.

Make sure to pull before starting your work.

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Implement Landing, Signup, and Login Pages

Implement Landing, Signup, and Login Pages according to the UI design provided in the linked Figma file. Image used in the webpage is provided in "image" folder.

Step to follow:

  1. Fork this repository and clone it into your local system
  2. Go to client > component > Landing , Sign up, Login page folder.
  3. Then add your code in that folder

For any doubts or difficulty, you can ping me on discord, I'll try to help you out as soon as possible.

All the Best!!

Implement Profile page

Hola Contributors!!

In this task, you are supposed to implement the Profile page of EasyExit website as per the UI Design in the figma link. But this time, you can also show your creativity, you may add new features to the page(keeping the basic structure and profile form intact), add new styles etc.

Step to follow:

  1. Fork this repository and clone it into your local system
  2. Go to client > component > Profile page folder.
  3. Then add your code in that Profile page folder

For any queries feel free to reach out to us.

THIS IS A COMPETITIVE ISSUE. NO NEED TO CLAIM. SUBMISSIONS WILL BE ACCEPTED TILL 17 DEC 2023 11:49am.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.