https://github.com/developerwilliams/mern-auth-system
This is a simple MERN User Registration, and Login System.
https://github.com/developerwilliams/mern-auth-system
express-js mongodb nodejs react
Last synced: 3 months ago
JSON representation
This is a simple MERN User Registration, and Login System.
- Host: GitHub
- URL: https://github.com/developerwilliams/mern-auth-system
- Owner: DeveloperWilliams
- Created: 2024-04-26T20:04:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-31T20:19:37.000Z (over 1 year ago)
- Last Synced: 2024-05-31T21:37:22.444Z (over 1 year ago)
- Topics: express-js, mongodb, nodejs, react
- Language: JavaScript
- Homepage:
- Size: 4.86 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fullstack MERN Login System
This is a simple login system implemented using Express.js and MongoDB, with password hashing for security.
## Features
- **Signup:** Allows users to create new accounts by providing their name, email, and password.
- **Login:** Enables registered users to log in using their email and password.
- **Password Hashing:** Securely hashes passwords using bcrypt before storing them in the database.
- **Validation:** Validates user input for signup and login forms.
- **Error Handling:** Provides error messages for incorrect login attempts and internal server errors.
## Technologies Used
- **Express.js:** Fast, unopinionated, minimalist web framework for Node.js.
- **MongoDB:** NoSQL database used for storing user data.
- **Mongoose:** MongoDB object modeling tool for Node.js.
- **bcrypt:** Library for hashing passwords.
- **express-validator:** Middleware for input validation in Express.js.
## Setup
1. **Clone the Repository:**
```bash
git clone https://github.com/your-username/login-system.git
```
2. **Install Dependencies:**
```bash
cd login-system
npm install
```
3. **Configure MongoDB:**
- Make sure MongoDB is installed and running on your system.
- Update the connection string in `app.js` to point to your MongoDB instance.
4. **Run the Application:**
```bash
npm start
```
The application should now be running on `http://localhost:8080`.
## Usage
- **Signup:**
- Navigate to `http://localhost:8080/signup`.
- Fill in the signup form with your name, email, and password.
- Click the "Register" button to create your account.
- **Login:**
- Navigate to `http://localhost:8080/login`.
- Enter your email and password in the login form.
- Click the "Login" button to log in.
## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvements.
## License
This project is licensed under the [MIT License](LICENSE).