This project implements a robust MERN-stack user authentication system featuring login, registration, and profile management functionalities. It provides a comprehensive solution for handling user authentication and data management with a modern UI.
Follow these steps to set up and run the application:
Clone the repository using the command below or download it directly:
git clone https://github.com/AnubhavChaturvedi-GitHub/MERN-Stack-User-Authentication-Login-Sign-in-Sign-Up.git
Change into the project directory:
cd MERN-Stack-User-Authentication-Login-Sign-in-Sign-Up
Update the MongoDB URL in the server.js
file. Replace the placeholder with your MongoDB connection string:
// In server.js
mongoose.connect('mongodb://localhost:XXXXX/UserData', {
useNewUrlParser: true,
useUnifiedTopology: true,
})
// Replace with your MongoDB connection string
Install the required npm packages:
npm install
Ensure MongoDB is running. Open a terminal and start the MongoDB server. The output should resemble:
Open a new terminal, navigate to the project directory, and start the server:
npm start
The application will be available at http://localhost:3000.
- User Registration: Secure registration process with input validation.
- User Login: Authentication with error handling and password visibility toggle.
- User Profile Management: View and manage user profile information.
-
Ensure MongoDB is installed and running properly.
-
Verify the MongoDB connection string in
server.js
. -
Confirm all dependencies are installed by running
npm install
.
This project is licensed under the MIT License. See the LICENSE file for details.