-
In MERN stack development, the login and registration system typically refers to the implementation of user authentication and authorization functionalities using MongoDB, Express.js, React.js, and Node.js. Here's a brief overview of how it's typically done:
-
MongoDB: MongoDB is used as the database to store user information such as usernames, passwords (usually hashed for security), email addresses, and any other relevant data.
-
Express.js: Express.js is used to create the server-side logic and APIs (Application Programming Interfaces) for handling user authentication and registration requests. It's common to use libraries like Passport.js for implementing authentication strategies such as local authentication (using username and password) or OAuth (for social media authentication).
-
React.js: React.js is used to create the user interface (UI) for the login and registration forms. These forms typically collect user input such as username, email, and password and send requests to the server for authentication or registration. Node.js: Node.js is used as the server runtime environment to handle HTTP requests from the frontend (React.js) and interact with the database (MongoDB). It runs the Express.js application and serves as the backend logic for user authentication and registration.
-
Tools:
- Front-End:
- Reduxjs/toolkit
- Antd
- Axios
- BcryptJS
- JSONwebToken
- NodeMailer
- React-Redux
- React-Router-DOM
- Back-End:
- React ReduxJS/Toolkit
- BcryptJS
- Dotenv
- JSONwebToken
- Mongoose
- Nodemon
- Front-End:
- 1. Terminal-> npm i
- nodemon server
- 2. Terminal->cd client -> npm i
- npm start
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
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.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify