{"id":14967596,"url":"https://github.com/manzil-infinity180/login","last_synced_at":"2025-10-25T20:31:56.908Z","repository":{"id":197531740,"uuid":"698834624","full_name":"manzil-infinity180/Login","owner":"manzil-infinity180","description":"doing some experiment to learn more like ci/cd , docker","archived":false,"fork":false,"pushed_at":"2024-07-21T14:40:12.000Z","size":8349,"stargazers_count":4,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T10:25:39.300Z","etag":null,"topics":["express","good-first-issue","jwt","jwt-authentication","mailtrap","mongodb","mongoose","nodejs","nodemailer","open-source","pugjs"],"latest_commit_sha":null,"homepage":"https://user-authenication-nu.vercel.app","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/manzil-infinity180.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}},"created_at":"2023-10-01T05:32:25.000Z","updated_at":"2025-01-09T20:00:20.000Z","dependencies_parsed_at":"2023-11-19T15:31:04.482Z","dependency_job_id":"7094c00b-93d6-4ea0-86a1-a320acd10088","html_url":"https://github.com/manzil-infinity180/Login","commit_stats":null,"previous_names":["manzil-infinity180/login"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzil-infinity180%2FLogin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzil-infinity180%2FLogin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzil-infinity180%2FLogin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manzil-infinity180%2FLogin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manzil-infinity180","download_url":"https://codeload.github.com/manzil-infinity180/Login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238207646,"owners_count":19434095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["express","good-first-issue","jwt","jwt-authentication","mailtrap","mongodb","mongoose","nodejs","nodemailer","open-source","pugjs"],"created_at":"2024-09-24T13:38:20.028Z","updated_at":"2025-10-25T20:31:49.602Z","avatar_url":"https://github.com/manzil-infinity180.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Login\n\u003ch1\u003e I will refractor and will create frontend later (Current frontend is too simple )\u003c/h1\u003e\n- Install it locally (take a help of package.json)\n\n[![GitHub issues](https://img.shields.io/github/issues/manzil-infinity180/Login)](https://github.com/manzil-infinity180/Login/issues)\n[![GitHub stars](https://img.shields.io/github/stars/manzil-infinity180/Login)](https://github.com/manzil-infinity180/Login/stargazers)\n\n\u003ch3\u003eLanguage/Tools/Other\u003c/h3\u003e \n\n- HTML/CSS/JS\n- NodeJs\n- ExpressJs\n- MongodB\n- Mongoose\n- PugJs\n- Axios\n- PostManAPI\n- Mailtrap\n- Nodemailer\n- Multer npm package \n  \n  \n\n```\n# User Schema \n\nThis repository includes a MongoDB schema for user data in Node.js applications. The schema comprises the following fields:\n\n- **email:**\n  - Type: String\n  - Required: true\n  - Unique: true\n  - Lowercase: true\n  - Validation: Email format\n  - Custom Error Messages: \"User cannot register without an email address\" and \"User already exists with this email\"\n\n- **password:**\n  - Type: String\n  - Required: true\n  - Custom Error Message: \"Password is required for signup/login\"\n\n- **confirmPassword:**\n  - Type: String\n  - Required: true\n  - Validation: Must match the password field\n  - Custom Error Message: \"Confirm Password must be the same as Password\"\n\n- **photo:**\n  - Type: String\n  - Description: URL or file path for the user's profile photo (optional)\n\n- **resetPasswordToken:**\n  - Type: String\n  - Description: Token for password reset functionality (optional)\n\nFeel free to integrate this user schema into your Node.js project for managing user data. Adjust it according to your specific requirements.\n\n```\n\n\n```\n// User Routes\n\n// Get all users\nrouter.route('/').get(userController.getAll);\n\n// Forgot password route\nrouter.post('/forgotPassword', userController.forgotPassword);\n\n// Login route\nrouter.post('/login', userController.login);\n\n// Signup route\nrouter.post('/signup', userController.signup);\n\n// Reset password route\nrouter.patch('/resetPassword/:token', userController.resetPassword);\n\n// User registration route\nrouter.post('/registration', userController.registration);\n\n// Update user profile route with photo upload\nrouter.patch('/updateMe', userController.uploadUserPhoto, userController.updateMe);\n\n```\n\n\n```\n# User Registration Schema\n\nThis repository contains a MongoDB schema for user registration, designed for use in Node.js applications. The schema includes the following fields:\n\n- **email:**\n  - Type: String\n  - Required: true\n  - Unique: true\n  - Lowercase: true\n  - Validation: Email format\n  - Custom Error Messages: \"User cannot register without an email address\" and \"User already exists with this email\"\n\n- **password:**\n  - Type: String\n  - Required: true\n  - Custom Error Message: \"Password is required for signup/login\"\n\n- **confirmPassword:**\n  - Type: String\n  - Required: true\n  - Validation: Must match the password field\n  - Custom Error Message: \"Confirm Password must be the same as Password\"\n\n- **name:**\n  - Type: String\n  - Required: true\n  - Custom Error Message: \"User cannot be without a NAME!!!\"\n\n- **job:**\n  - Type: String\n  - Required: true\n  - Custom Error Message: \"User must mention their working profession!\"\n\n- **language:**\n  - Type: String\n  - Required: true\n  - Custom Error Message: \"Mention at least one skill!\"\n\nFeel free to use this schema in your Node.js project for user registration and customize it as needed.\n\n```\n\n\n```\n// View Routes\n\n// Overview page\nrouter.get('/', viewController.getOverView);\n\n// Login form page\nrouter.get('/login', viewController.getLoginForm);\n\n// Signup page\nrouter.get('/signup', viewController.createAccount);\n\n// Forgot password page\nrouter.get('/forgotPassword', viewController.forgotPassword);\n\n// Update password page\nrouter.get('/updateMyPassword', viewController.updateMyPassword);\n\n// Registration page\nrouter.get('/registration', viewController.registration);\n\n// Reset password page with token parameter\nrouter.get('/reset-password/:resetToken', viewController.resetPasswod);\n\n// Update user profile page\nrouter.get('/updateMe', viewController.updateMe);\n\n```\n\n\n```\n# Mailtrap \u0026 Nodemailer\n\nCreate your account on Mailtrap - https://mailtrap.io/\n\n- Use these settings to send messages directly from your email client or mail transfer agent.\n// Replace the credentials with your\nEMAIL_HOST = sandbox.smtp.mailtrap.io\nEMAIL_PORT = 25\nEMAIL_USERNAME= *****\nEMAIL_PASSWORD = ****\n\nUse nodemailer npm package - https://www.npmjs.com/package/nodemailer (Documentation)\nTransporter to setup Nodemailer \n  const transporter = nodemailer.createTransport({\n    host : process.env.EMAIL_HOST,\n    port : process.env.EMAIL_PORT,\n    auth:{\n      user: process.env.EMAIL_USERNAME,\n      pass : process.env.EMAIL_PASSWORD\n    }\n  })\n\n```\n# Note \n- Delete config_example.env with congig.env\n- Replace the credential in config.env file with your own credentials \n\n\n```\nHere's a breakdown of the packages and technologies you used, based on your dependencies:\n\n- axios (^1.5.1): Promise-based HTTP client for making requests.\n\n- bcryptjs (^2.4.3): Library for hashing passwords.\n\n- body-parser (^1.20.2): Node.js body parsing middleware, used to parse incoming request bodies.\n\n- cookie-parser (^1.4.6): Middleware for parsing cookies in Express.\n\n- crypto (^1.0.1): Node.js core module for cryptographic functionality.\n\n- cryptojs (^2.5.3): Library for cryptographic functions in JavaScript.\n\n- dotenv (^16.3.1): Module for loading environment variables from a .env file into process.env.\n\n- express (^4.18.2): Web application framework for Node.js.\n\n- jade (^1.11.0): Template engine for Node.js (now known as Pug).\n\n- jsonwebtoken (^9.0.2): Implementation of JSON Web Tokens (JWT) for Node.js.\n\n- mongoose (^7.5.3): MongoDB object modeling for Node.js.\n\n- multer (^1.4.5-lts.1): Middleware for handling multipart/form-data, used for file uploads.\n\n- nodemailer (^6.9.5): Module for sending emails with Node.js.\n\n- nodemon (^3.0.1): Utility that monitors for changes in your source code and automatically restarts your server.\n\n- path (^0.12.7): Node.js core module for working with file paths.\n\n- pug (^3.0.2): View engine for Node.js (formerly known as Jade).\n\n- sass (^1.68.0): Syntactically Awesome Stylesheets, a popular CSS preprocessor.\n\n- validator (^13.11.0): Library for string validation and sanitation.\n\n\n\n```\n\n\u003cimg width=\"1623\" alt=\"Screenshot 2023-10-02 at 11 21 13 AM\" src=\"https://github.com/manzil-infinity180/Login/assets/119070053/003ed33b-7cb7-4856-a3c9-f524914eb1b1\"\u003e\n\n\n- \u003ch2\u003ePreview ( I am working on that , will update this repo soon)\u003c/h2\u003e\n\n  [Video Link](https://x.com/manzil_rahul/status/1708930631479198059?s=20)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanzil-infinity180%2Flogin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanzil-infinity180%2Flogin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanzil-infinity180%2Flogin/lists"}