{"id":23312353,"url":"https://github.com/elyse502/mern-auth","last_synced_at":"2026-04-11T03:04:01.130Z","repository":{"id":268945323,"uuid":"902709329","full_name":"elyse502/mern-auth","owner":"elyse502","description":"MERN Authentication System With Password Reset, Email Verification, JWT auth","archived":false,"fork":false,"pushed_at":"2024-12-21T07:48:29.000Z","size":245,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T02:32:26.540Z","etag":null,"topics":["api","authentication-backend","backend","cloudinary","express","frontend","full-stack","mern-stack","mongodb","node","nodemailer","otp","otp-applications","otp-generator","otp-verification","react","smtp"],"latest_commit_sha":null,"homepage":"https://mern-auth-client-seven.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elyse502.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-13T05:37:09.000Z","updated_at":"2025-02-27T10:01:06.000Z","dependencies_parsed_at":"2024-12-19T21:34:12.946Z","dependency_job_id":"448b2f56-4a48-4015-be55-10e68b5145cf","html_url":"https://github.com/elyse502/mern-auth","commit_stats":null,"previous_names":["elyse502/mern-auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elyse502/mern-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fmern-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fmern-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fmern-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fmern-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elyse502","download_url":"https://codeload.github.com/elyse502/mern-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elyse502%2Fmern-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31667034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","authentication-backend","backend","cloudinary","express","frontend","full-stack","mern-stack","mongodb","node","nodemailer","otp","otp-applications","otp-generator","otp-verification","react","smtp"],"created_at":"2024-12-20T14:28:43.116Z","updated_at":"2026-04-11T03:04:01.092Z","avatar_url":"https://github.com/elyse502.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# MERN AUTH 🔐\nA complete Authentication system that includes Email Verification and Password Reset Feature using a secure 6 digit OTP sent directly to user's email address.\n\n\u003c/div\u003e\u003cbr /\u003e\u003chr /\u003e\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n## LIVE - DEMO 🌐\n  \n**UI** 👉 [LINK](https://mern-auth-client-seven.vercel.app/)\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003chr/\u003e\u003cbr/\u003e\n\n## Project Overview\nThis project is a **complete Authentication System** that includes the following features:\n- **Email Verification**: Securely verify user email addresses.\n- **Password Reset**: Allow users to reset their passwords using a secure 6-digit OTP sent directly to their email.\n\nThe system is built using the **MERN Stack (MongoDB, Express, React, Node.js)** and incorporates **JWT (JsonWebToken)** for secure authentication. \n\n## Features\n1. **Backend Server**:\n   - APIs to handle user authentication requests.\n   - **Email Verification** using OTP.\n   - **Password Reset** functionality with OTP.\n   - Secure user authentication and authorization using **JWT**.\n\n2. **Frontend Application**:\n   - **React** and **Tailwind CSS** for a responsive and user-friendly interface.\n   - Forms for:\n     - Login\n     - Registration\n     - Password Reset with OTP input.\n   - Integration with backend APIs for full-stack functionality.\n\n---\n\n## Tech Stack\n- **Backend**:\n  - **Node.js**: Server-side runtime.\n  - **Express.js**: Framework for building APIs.\n  - **MongoDB**: NoSQL database for storing user data.\n  - **JWT**: Token-based authentication.\n  \n- **Frontend**:\n  - **React**: JavaScript library for building user interfaces.\n  - **Tailwind CSS**: Utility-first CSS framework for styling.\n\n---\n\n## Installation and Setup\n\n### Prerequisites\n- Node.js installed\n- MongoDB database setup\n- A valid email address for testing email verification (e.g., Gmail SMTP or other services)\n\n### Backend Setup\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   ```\n2. Navigate to the backend directory:\n   ```bash\n   cd server\n   ```\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n4. Configure environment variables:\n   Create a `.env` file in the backend directory and add:\n   ```env\n   PORT=4000\n   MONGO_URI=\u003cyour-mongodb-uri\u003e\n   JWT_SECRET=\u003cyour-jwt-secret\u003e\n   SMTP_EMAIL=\u003cyour-email\u003e\n   SMTP_PASSWORD=\u003cyour-email-password\u003e\n   ```\n5. Start the backend server:\n   ```bash\n   npm run server\n   ```\n   The backend server will run on `http://localhost:4000`.\n\n### Frontend Setup\n1. Navigate to the frontend directory:\n   ```bash\n   cd client\n   ```\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Start the frontend application:\n   ```bash\n   npm run dev\n   ```\n   The frontend app will run on `http://localhost:5173`.\n\n---\n\n## Project Structure\n\n### Backend\n```\nbackend/\n├── models/             # Mongoose models\n├── routes/             # Express routes\n├── controllers/        # Logic for handling requests\n├── utils/              # Utility functions (e.g., email sender)\n├── middleware/         # Middleware for authentication\n├── config/             # Configuration files\n└── server.js           # Entry point\n```\n\n### Frontend\n```\nfrontend/\n├── src/\n│   ├── assets/         # Static assets (e.g., images, templates)\n│   │   ├── arrow_icon.svg\n│   │   ├── bg_img.png\n│   │   ├── emailTemplates.js\n│   │   ├── favicon.svg\n│   │   ├── hand_wave.png\n│   │   ├── header_img.png\n│   │   ├── lock_icon.svg\n│   │   ├── logo.svg\n│   │   ├── mail_icon.svg\n│   │   ├── person_icon.svg\n│   │   └── react.svg\n│   ├── components/     # Reusable UI components\n│   │   ├── Header.jsx\n│   │   └── Navbar.jsx\n│   ├── context/        # App context and state management\n│   │   └── AppContext.jsx\n│   ├── pages/          # Page components\n│   │   ├── EmailVerify.jsx\n│   │   ├── Home.jsx\n│   │   ├── Login.jsx\n│   │   └── ResetPassword.jsx\n│   ├── App.jsx         # Main App component\n│   ├── index.css       # Global styles\n│   └── main.jsx        # Application entry point\n```\n\n---\n\n## Usage\n- **Register**: Create a new account by filling out the registration form. A 6-digit OTP will be sent to the provided email for verification.\n- **Login**: Authenticate using your email and password.\n- **Password Reset**: Request a password reset by entering your email. Verify your identity using the OTP sent to your email.\n\n---\n\n## Future Enhancements\n- Add multi-factor authentication (MFA).\n- Enhance security with rate limiting and captcha.\n- Add support for social login (e.g., Google, Facebook).\n\n---\n\n## License\nThis project is licensed under the [MIT License](https://github.com/elyse502/mern-auth/blob/main/LICENSE).\n\n---\n\n## Contact\nFor any questions or support, please contact:\n- [**NIYIBIZI Elysée**](https://linktr.ee/niyibizi_elysee)👨🏿‍💻 | [Github](https://github.com/elyse502) | [Linkedin](https://www.linkedin.com/in/niyibizi-elys%C3%A9e/) | [Twitter](https://twitter.com/Niyibizi_Elyse).\n- **Email**: \u003celyseniyibizi502@gmail.com\u003e\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/niyibizi-elys%C3%A9e/) [![@phenrysay](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/Niyibizi_Elyse) [![pH-7](https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/elyse502)\n\n\u003cbr /\u003e\u003chr /\u003e\u003cbr /\u003e\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felyse502%2Fmern-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felyse502%2Fmern-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felyse502%2Fmern-auth/lists"}