Login System | LogSyS | Nodejs | MongoDB | Bootstrap | PUG

file: README.md

#About system

It is a simple login and Registration system. First you have to register yourself with a valid email address
by fill uping a registration form, after that you will be redirected to login page if the registration is successful.
If the registration is not successful it will show msg. after that user can login with the following email and password.
Password hashing and passport authentication is used to secure the login system . If you have already registered then you can not register again.
your pssword must be atleast in 5 characters. after a successfull login you will be redirected to home page.

#Languages

It is built with nodeJs express and mongoDB (Database) and in the forntend html css and bootstrap.


------------------------------------Plannings for simple login-system-------------------------------------
#1 Create server.
#2 Make mongodb connection, create DB  and connect to the project.
#3 Set view engine , routes, index page and others like flash body parser on the basis of need.
#4 Create template(very simple), set name and url with methode POST. [ Frontend ]
#5 Create router.get request to get the tamplate page.
#6 Create router.post to get the respond from the client to the console pannel.
#7 Create mongoDB schema for the response of the client.
#8 Make a function to save the data from the client to Database.
#9 Now check whether data is saving in the database or not.
#10 If data is saved, then create register, login and home page.
#11 In register template page create input email password and confirm password with submit button.
#12 In Login template page create inputs email and password with submit button.
#13 In Home/index template page, the email of the user must be shown/rendered.
#14 Now make the rule of login system by creating functions
     Rule:
          1. New user will signup first then login.
          2. To signup, password and confirm password during registration must be same.
          3. Redirect/Goto login page and login with correct email and password to get acess to the website.
          4. If the user trying to enter in the home/index page without login then redirect him to login page.
          5. If the user is trying to login without signup then show him the respective messages(flash).
          6. User can not login/signup if he missed any of the required inputs in the login/signup form(flash will be used to show the messages).

#15 Now create session for user so that user can acess his account when he came back to the website. if user logged out himself from the then
delete the session(email/password) and if he want to get acess of the website then he will have to login again with existing email and password.
#16 Use passpot js  for the authentication.
#17 Set validation to password(length).
#18 Use password hashing for the security/privacy purpose.

#Command : npm install bcryptjs bcrypt body-parser connect-flash ejs express express-ejs-layouts express-messages express-session html mongodb
mongoose nodemon passport passport-local pug express-validator

#Problems: - why expressvalidator is not working, and how to use it correctly
           - During form validation, if put error.push(errors.msg) and printing it on console pannel as "errors.msg" then console
             pannel shows "undefined", why?
           - During form submission when we put wrong password then message show that issue without removing email how to do that in login system
-If user is entering wrong password then i have to show him message that he has entered wrong password many times he has been blocked for some time, how to do that?.

Comments

Popular posts from this blog

edistrict

richTextEditor

CSS-position property