{"id":20346604,"url":"https://github.com/prity25-coder/authentication-backend-app","last_synced_at":"2025-08-02T08:08:31.026Z","repository":{"id":216940393,"uuid":"742725373","full_name":"Prity25-coder/Authentication-Backend-App","owner":"Prity25-coder","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-13T11:01:04.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T15:48:28.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://authentication-backend-app-sigma.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/Prity25-coder.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}},"created_at":"2024-01-13T07:10:55.000Z","updated_at":"2024-01-13T08:44:51.000Z","dependencies_parsed_at":"2024-01-13T19:42:25.178Z","dependency_job_id":"ce5e1e84-731c-4abf-a8c6-bf9d285a70a0","html_url":"https://github.com/Prity25-coder/Authentication-Backend-App","commit_stats":null,"previous_names":["prity25-coder/authentication-backend-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Prity25-coder/Authentication-Backend-App","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prity25-coder%2FAuthentication-Backend-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prity25-coder%2FAuthentication-Backend-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prity25-coder%2FAuthentication-Backend-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prity25-coder%2FAuthentication-Backend-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prity25-coder","download_url":"https://codeload.github.com/Prity25-coder/Authentication-Backend-App/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prity25-coder%2FAuthentication-Backend-App/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268351465,"owners_count":24236413,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-11-14T22:13:31.867Z","updated_at":"2025-08-02T08:08:31.004Z","avatar_url":"https://github.com/Prity25-coder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to Authentication API\n\n- built by using Node, express and MongoDB\n\n## Features\n\n- Authentication and Authorization using jwt token\n- Session management\n- Login\n- Register\n- Update Profile\n- Update Email\n- Update Password\n- Global Error Handling\n- Logging Request and errors\n- Extensible code flow and Folder structure\n- Best env variable setup\n\n## Code Flow\n\n- First browser sends the request to the server\n- Server points to our specific routes\n- before the controller, it may be that there will be middlewares or validators or maybe both\n- If no Middleware of the validator then the request goes to the specific controller\n- Controllers will send back the response, if no need to call services\n- Services are basically functions that help us to get data from DB (here is Mongo DB)\n- Service may use models to save data in some specific format\n\nNote:\nMiddleware/validators may or may not be there\nServices/models may or may not be there\n\nImage for better understanding\n\n![How-Node-code-works](https://github.com/pktherock/Habit-Tracker/assets/59223750/c8cdaadf-09ad-4c2a-9a24-c618859282e8)\n\n## Packages used in this project.\n\n1. bcrypt\n   -\u003e To hash and compare the hashed password\n2. compression\n   -\u003e To compress res bodies\n3. cookie-parser\n   -\u003e To interact with cookies\n4. dotenv\n   -\u003e To store sensitive configurations in a .env file\n5. express\n   -\u003e To create Servers (with minimal code)\n6. express-async-handler\n   -\u003e To wrap controller function so that if any error comes it will next function with the error automatically\n7. express-rate-limit\n   -\u003e To prevent or limit repeated requests to our APIs (a normal user can not send more than 60 requests per second)\n8. express-session\n   -\u003e To manage Sessions\n9. express-validator\n   -\u003e To validate request body data\n10. helmet\n    -\u003e Helmet helps secure Express apps by setting HTTP response headers.\n11. jsonwebtoken\n    -\u003e To create jwt token\n12. nodemailer\n    -\u003e To send email\n13. winston\n    -\u003e It helps us to log the req or res in a straightforward way\n14. mongoose\n    -\u003e to interact with mongodb\n15. connect-mongo\n    -\u003e to store all sessions in mongodb\n16. swagger-ui-express\n    -\u003e to show api docs for better usability of api end points\n\n## How to run this project locally\n\n- Clone this repository\n- create a .env file at the root of this project\n- create all env variable which is given in the .env.example file with proper info\n- then run npm install (to install all packages used in this project)\n- then run npm run start\n- go to the link shown in the terminal all api docs are there\n- you can use postman as well, i have attached one postman-collection (update soon)\n  import and change accordingly base on api docs\n- Now you are good to go\n- Thank YOU\n\nNote:\n\n- if you put mongoUri of atlas, then please store user and password in .env file and uncomment in db.config.js (user and pass) refer .env.example file\n- if you are using local mongodb and no user and password is required then comment user and password in db.config.js\n\n### Live Demo Link\n\n[Live Demo Link](https://authentication-backend-app.onrender.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprity25-coder%2Fauthentication-backend-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprity25-coder%2Fauthentication-backend-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprity25-coder%2Fauthentication-backend-app/lists"}