{"id":21049843,"url":"https://github.com/apurva313/email-auth-project","last_synced_at":"2026-04-13T19:31:51.186Z","repository":{"id":256830770,"uuid":"806007580","full_name":"apurva313/Email-auth-Project","owner":"apurva313","description":"This project is a simple email authentication system built with Node.js, Express, and MongoDB. It allows users to register and verify their email addresses.","archived":false,"fork":false,"pushed_at":"2025-07-14T10:11:53.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T17:55:27.273Z","etag":null,"topics":["email-authentication","email-sender","express-js","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apurva313.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-26T05:24:51.000Z","updated_at":"2025-07-14T10:11:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"6981758c-a9ae-48a6-b2ad-2d9490c5ab10","html_url":"https://github.com/apurva313/Email-auth-Project","commit_stats":null,"previous_names":["apurva313/email-auth-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apurva313/Email-auth-Project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apurva313%2FEmail-auth-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apurva313%2FEmail-auth-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apurva313%2FEmail-auth-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apurva313%2FEmail-auth-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apurva313","download_url":"https://codeload.github.com/apurva313/Email-auth-Project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apurva313%2FEmail-auth-Project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["email-authentication","email-sender","express-js","mongodb","nodejs"],"created_at":"2024-11-19T15:15:31.546Z","updated_at":"2026-04-13T19:31:51.161Z","avatar_url":"https://github.com/apurva313.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Email Authentication Project 📧🔒\n\nThis project is a simple email authentication system built with Node.js, Express, and MongoDB. It allows users to register and verify their email addresses.\n\n## 🚀 About Me\n\n[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/apurva313)\n[![github](https://img.shields.io/badge/github-181717?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/apurva313)\n\n## Project Structure 🗂️\n\n\u003cimg width=\"1500\" height=\"1500\" alt=\"diagram\" src=\"https://github.com/user-attachments/assets/b66929dd-fc9d-4fc5-a51b-0c89225e1f24\" /\u003e\n\n## Installation 🛠️\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/apurva313/Email-auth-Project\n    ```\n\n2. Navigate to the project directory:\n    ```sh\n    cd Email-auth-Project\n    ```\n\n3. Install the dependencies:\n    ```sh\n    npm install\n    ```\n\n4. Create a [`.env`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FD%3A%2FCode%2FEmail-auth-Project%2F.env%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%2C%22b5905f33-9e98-4c82-9582-923b1185c0cf%22%5D \"d:\\Code\\Email-auth-Project\\.env\") file in the root directory and add the following environment variables:\n    ```env\n    PORT=\n    MONGO_URI=\n    JWT_SECRET=\n    EMAIL_USER=\n    EMAIL_PASS=\n    ```\n\n## Running the Project 🚀\n\nTo start the project, run:\n```sh\nnpm start\n```\nThis will start the server on the port specified in the .env file (default is 3000).\n\n## API Endpoints 🌐\n\n### Register 📝\n\n- **URL:** `/api/auth/register`\n- **Method:** `POST`\n- **Description:** Registers a new user.\n- **Request Body:**\n    ```json\n    {\n        \"email\": \"apurvakumar@gmail.com\",\n        \"password\": \"password123\"\n    }\n    ```\n- **Response:**\n    - `201 Created` on success\n    - `400 Bad Request` if the email is already registered or if there are validation errors\n\n### Verify Email ✅\n\n- **URL:** `/api/auth/verify-email`\n- **Method:** `POST`\n- **Description:** Verifies the user's email address.\n- **Request Body:**\n    ```json\n    {\n        \"email\": \"apurva@gmail.com\",\n        \"token\": \"verification-token\"\n    }\n    ```\n- **Response:**\n    - `200 OK` on success\n    - `400 Bad Request` if the token is invalid or expired\n\n### Code Snippet\n\n```javascript\nconst express = require('express');\nconst { register, verifyEmail } = require('../controllers/authController');\nconst router = express.Router();\n\nrouter.post('/register', register);\nrouter.post('/verify-email', verifyEmail); \n\nmodule.exports = router;\n```\n\n\n## Dependencies 📦\n\n- [`express`](https://expressjs.com/): Web framework for Node.js\n- [`mongoose`](https://mongoosejs.com/): MongoDB object modeling tool\n- [`dotenv`](https://www.npmjs.com/package/dotenv): Loads environment variables from a `.env` file\n- [`body-parser`](https://www.npmjs.com/package/body-parser): Middleware for parsing request bodies\n- [`bcrypt`](https://www.npmjs.com/package/bcrypt): Library for hashing passwords\n- [`jsonwebtoken`](https://www.npmjs.com/package/jsonwebtoken): Library for working with JSON Web Tokens\n- [`nodemailer`](https://nodemailer.com/about/): Library for sending emails\n\n## Contributing 🤝\n\nWe welcome contributions to this project! If you would like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes.\n4. Commit your changes (`git commit -m 'Add some feature'`).\n5. Push to the branch (`git push origin feature-branch`).\n6. Open a pull request.\n\nPlease make sure to update tests as appropriate.\n\n\n## License 📄\n\nThis project is licensed under the ISC License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapurva313%2Femail-auth-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapurva313%2Femail-auth-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapurva313%2Femail-auth-project/lists"}