Skip to content

berkerdemirer/angular-login

Repository files navigation

Fobtask

This project was generated with Angular CLI version 7.3.6.

Installation

If you don't have node.js on your system download the stable version from this link: https://nodejs.org/en/,

Install angular-cli:

npm install -g @angular/cli

Clone the project and run npm install on terminal while you are in the project folder

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/.

Functionalities

-Register
-Login
-Log-out
-Route protection
-Validation with real Node.js backend using MongoDB

Structure of the App

Application is developed with one module per component approach. All modules are loaded lazily so that it improves the performance of the app. AuthGuard is implemented to the routes so that without valid JWT token, unauthorized user cannot access /details route of the app. For styling purposes angular material library is used.

REST Schema & Backend

Server is deployed to heroku so at first request server needs to bootup, there may be little delays because of that.

apiUrl: 'https://agile-peak-56363.herokuapp.com'
/users/register -> Register new user
/users/authenticate -> Log-in and authenticate

Node.JS backend is implemented by applying the steps at:
http://jasonwatmore.com/post/2018/06/14/nodejs-mongodb-simple-api-for-authentication-registration-and-user-management

Session Management

After successfully authorize the user, jwt token is stored in local storage using key,value map. Unless it is deleted by the user with log-out function, users stays logged in

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published