This project is a robust Authentication System built with a full-stack approach, utilizing modern technologies to ensure security, scalability, and ease of use. The backend is built using Node.js, Express, and MongoDB, while the frontend leverages React, Vite, and TailwindCSS to provide a responsive and user-friendly interface.
Authentication_System/
|-- backend/
| |-- config/
| |-- controllers/
| |-- mailtrap/
| |-- middleware/
| |-- models/
| |-- routes/
| |-- utils/
| |-- server.js
|
|-- frontend/
|-- node_modules/
|-- public/
|-- src/
|-- components/
|-- pages/
|-- store/
|-- utils/
|-- App.jsx
|-- index.css
|-- main.jsx
|-- index.html
|-- package.json
|-- tailwind.config.js
|-- vite.config.js
- User Authentication: Secure login and signup functionality.
- Password Encryption: Utilizes bcrypt for secure password storage.
- JWT Integration: Secure and scalable session handling with JSON Web Tokens.
- Email Verification: Integration with Mailtrap for sending and verifying emails.
- Forgot Password: Allows users to reset their passwords securely via email.
- Responsive Design: A user-friendly interface powered by TailwindCSS.
- Environment Configuration: Sensitive data securely managed using environment variables.
Before you begin, ensure you have the following installed:
-
Navigate to the root directory and install dependencies:
npm install
-
Create a
.envfile in the root directory and add the required environment variables:MONGO_URI=your_mongo_connection_string PORT=5000 JWT_SECRET=your_jwt_secret NODE_ENV=development MAILTRAP_TOKEN=your_mailtrap_token MAILTRAP_ENDPOINT=your_mailtrap_endpoint CLIENT_URL=your_client_url
-
Start the backend server:
npm run dev
-
Navigate to the
frontendfolder:cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
- Visit the frontend URL (e.g.,
http://localhost:3000) in your browser. - Use the authentication features such as login and signup.
- Node.js: JavaScript runtime for building the server-side application.
- Express.js: Web framework for Node.js.
- MongoDB: NoSQL database for data storage.
- Mailtrap: Email testing platform.
- JSON Web Tokens (JWT): Secure session handling.
- React.js: JavaScript library for building user interfaces.
- TailwindCSS: Utility-first CSS framework for styling.
- Vite: Fast build tool for modern web projects.
Contributions are welcome! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-name
- Open a pull request.
For any inquiries or feedback, feel free to reach out at [email protected].
