This project is a simple and secure login page application built with Node.js, MongoDB, HTML, and CSS. The application features user authentication, data validation, and secure password handling. It is designed to demonstrate basic full-stack development skills and can serve as a foundation for more complex projects.
- User Authentication: Secure user login and registration system.
- Database Integration: Utilizes MongoDB to store user credentials and other relevant data.
- Server-Side Logic: Built with Node.js for handling server-side operations.
- Frontend Interface: Clean and responsive interface using HTML and CSS.
- Data Validation: Ensures that all user inputs are properly validated.
- Password Security: Implements secure password hashing for safe storage.
- Node.js: For server-side scripting and handling backend operations.
- Express.js: To simplify routing and middleware integration.
- MongoDB: For database management and data storage.
- Mongoose: For object data modeling with MongoDB.
- HTML & CSS: For designing the frontend interface.
- bcrypt: For password hashing to enhance security.
-
Clone the repository:
git clone https://github.com/yourusername/login-page-app.git
-
Navigate to the project directory:
cd login-page-app
-
Install dependencies:
npm install
-
Set up MongoDB:
- Make sure you have MongoDB installed and running on your machine.
- Create a
.env
file in the root directory and add your MongoDB connection string:
MONGODB_URI=your_mongodb_connection_string
-
Start the server:
npm start
- Register: Create a new user account by providing a username and password.
- Login: Access your account using your credentials.
- Logout: Securely end your session.
login-page-app/
├── public/
│ ├── css/
│ │ └── styles.css
│ └── js/
│ └── script.js
├── views/
│ ├── login.html
│ ├── register.html
│ └── dashboard.html
├── .env
├── app.js
├── models/
│ └── User.js
├── routes/
│ └── auth.js
├── package.json
└── README.md
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.