{"id":17816675,"url":"https://github.com/saurabhdaware/login-page-mean-stack","last_synced_at":"2025-07-18T03:03:10.983Z","repository":{"id":98520176,"uuid":"133176041","full_name":"saurabhdaware/login-page-MEAN-stack","owner":"saurabhdaware","description":"Simple Login page made with MEAN stack","archived":false,"fork":false,"pushed_at":"2018-06-12T10:25:14.000Z","size":138,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-27T17:35:59.351Z","etag":null,"topics":["angular","expressjs","login-page","login-system","mean-stack","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/saurabhdaware.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":"2018-05-12T19:11:53.000Z","updated_at":"2023-04-23T09:14:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"25f3082f-0b26-40fe-b03f-d8f1faf45589","html_url":"https://github.com/saurabhdaware/login-page-MEAN-stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saurabhdaware%2Flogin-page-MEAN-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saurabhdaware%2Flogin-page-MEAN-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saurabhdaware%2Flogin-page-MEAN-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saurabhdaware%2Flogin-page-MEAN-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saurabhdaware","download_url":"https://codeload.github.com/saurabhdaware/login-page-MEAN-stack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229770433,"owners_count":18121596,"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":["angular","expressjs","login-page","login-system","mean-stack","mongodb","nodejs"],"created_at":"2024-10-27T16:38:57.307Z","updated_at":"2024-12-15T01:16:35.335Z","avatar_url":"https://github.com/saurabhdaware.png","language":"TypeScript","readme":"# LoginPageMEANStack\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli).\n\nThis is a simple login page made with MEAN stack (MongoDB, ExpressJS, Angular 6, NodeJS).\n## This project includes:\n- User registration.\n- User login.\n- User Authorization.\n\n## Basic working of login page\n1. When user enters email and password and when both of them are correct we return an access token (generated with jwt)\n2. This access token is stored in localstorage of the browser.\n3. Now if user leaves the page and opens the same site again we check to see if there is any access token present in user's localstorage.\n4. if access token is present - \u003e we verify that access token and redirect user to the profile page.\n5. if access token is not present - \u003e we keep user on the same page.\n\n## About Directories\n- NodeJS and ExpressJS is inside `restApi/`\n- MongoDB database is in `user_db/`\n- Angular Components are in `src/app`\n\n## Prerequisites to understand the project\n- MEAN stack (Angular 2+)\n- ES6 Javascript (specially promises)\n- JWT: Json Web Token it is a libray to generate random token it has 2 function jwt.sign() to create token and jwt.verify() to verify\n- bcrypt - Library to hash passwords, I've used two functions in this project bcrypt.hash() to hash password and bcrypt.compare to compare string with hashed password.\n\n## Tools / Libraries / Softwares required.\n1. Install [npm](https://nodejs.org/) and Angular Client `npm install @angular/cli` (ignore if already installed)\n2. In command prompt type `npm install` to download starter packages.\n3. `cd restApi` and type `npm install bcrypt,jsonwebtoken,mongoose,express`\n4. Install [MongoDB](http://www.mongodb.com/)\n5. Go to bin folder in your mongodb directory, Mine is in `c:/program files/mongodb/server/3.6/bin` and type `mongostore \u003cpath of user_db folder\u003e`\n\n## How to Run\n1. Change directory to your project and `ng serve` to start angular server\n2. Change directory to bin folder of your mongodb installation folder, Mine is `c:/program files/mongodb/server/3.6/bin` and type `mongod` then open new command prompt and type `mongo`\n3. Change directory to `restApi/` and type `node index.js` to start Node Server\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaurabhdaware%2Flogin-page-mean-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaurabhdaware%2Flogin-page-mean-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaurabhdaware%2Flogin-page-mean-stack/lists"}