Skip to content

DirkGaston/soft-jobs-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soft Jobs

GitHub repo size GitHub stars GitHub forks Twitter Follow

HTML5 Bootstrap JavaScript NPM Node.js Express.js React

Soft Jobs is a platform that aims to help Junior developers get freelance jobs in order to gain experience.

This project was developed as the JWT User Authentication and Authorization assignment in the Backend with Node and Express course for Desafio LATAM's Full Stack with JavaScript bootcamp

Assignment Background 📖

The company Soft Jobs has initiated the development of a platform that seeks to support the junior developer community to get short and simple jobs to accumulate work experience and improve their opportunities.

In this challenge you will be a backend developer of the company and you will have to create a server for user authentication and authorization using JWT.

You will have to use a client application developed with React ready to consume the routes from your server.

A few images of the client side application:









The server will need to:

● Allow registration of new users through a POST /users path.
● Provide the POST /login route that receives a user's credentials and returns a token generated with JWT. The token payload must include the email of the registered user.
● Provide a GET /users path to return a user's data in case he/she is authenticated. In order to do this:
○ Extract a token available in the Authorization property of the headers.
○ Verify the validity of the token using the same secret key used in your signature.
○ Decode the token to get the user's email to look up in your payload.
○ Obtain and return the user's record.

Getting Started with Create React App

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can't go back!

If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.

You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Code Splitting

This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

Analyzing the Bundle Size

This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

Making a Progressive Web App

This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

Advanced Configuration

This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

Deployment

This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

Tools 🛠️

Soft Jobs is a backend implementation that was built over an existing pre-defined REACT frontend using:

Dependencies 🚧

Used dependencies include:

  • Dotenv - Zero-dependency module to manage environment variables.
  • Morgan - HTTP request logger middleware for node.js.
  • Nodemon - Automatically restarting the node application when file changes in the directory are detected.
  • BCryptJS - Optimized bcrypt in JavaScript with zero dependencies.
  • JSONWebToken - An implementation of JSON Web Tokens.
  • Yup - Schema builder for server-side data validation

Contact 📫

If you want to contact me you can reach me at [email protected].

About

JWT authentication in Node / Express app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published