User Authentication System

User Authentication System is a simple project built with the MERN stack, featuring three major functionalities: User Registration, User Login, and Reset Password.

Installation

Front-End App

  1. Create a new folder for the front-end application:

    mkdir Front-End-App
    
  2. Initialize a new Vite project:

    npm init vite@latest

Enter your project name. Select React as the framework. Choose JavaScript as the language.

  1. Navigate to the project folder:

    cd Front-End-App
    
  2. Install dependencies:

    npm install
    npm install axios bootstrap
    npm install @fortawesome/react-fontawesome @fortawesome/free-solid-svg-icons
    npm install react-toastify
  3. Start the client :

    npm run dev    

Server Side App

  1. Create a new folder for the server-side application:
 cd server-End-App
  1. Navigate to the project folder:

    cd server-End-App
  2. Install dependencies:

    npm install
    npm install express mongoose cors nodemon cookie-parser bcrypt jsonwebtoken
  3. Load the Nodemon for start the server:

    Under the package.json , go to "scripts" , fill the "start" as "nodemon index.js"

  4. Start the server:

    npm start
  5. Create models folder for creating the database schema

    Use the User.js for databse schema

Screenshot

Registration Page

alt text

Login Page

alt text

Forget Password Page

alt text

Reset Password Page

alt text

Database Schema

alt text

Sample code

alt text

alt text