This is a simple MERN stack application that allows users to authenticate with a username and password. The application uses React for the front end, Node.js and Express for the back end, and MongoDB for the database. The application uses JWT for authentication and bcrypt for password hashing.
- Clone the repository
git clone https://github.com/AbdurRaahimm/AuthInMERN.git
- Go to the project directory
cd AuthInMERN
- Install dependencies for server and client
npm install
cd client
npm install
- Create a .env file in the root directory and add the following environment variables
JWT_SECRET = jwt secret
DB_URI = mongodb uri
EMAIL = smtp email
PASSWORD = smtp password
- Start the application server and client
npm start
cd client
npm run dev
- Register a new user by clicking on the register link
- Login with the registered user
- Logout by clicking on the logout link
- View the profile page by clicking on the profile link
- Register a new user
- Login with a registered user
- Logout
- View the profile page
- Protected routes
- Password hashing
- JWT authentication
- Forgot password
- Reset password
- Profile picture upload
- React (vite)
- Node.js
- Express
- MongoDB
- JWT
- Bcrypt
- Nodemailer
- Tailwind CSS
- React Router
- react-toastify
- multer