Skip to content

RedJanvier/nodejs-mvc-bookstore

Repository files navigation

LOGIN SYSTEM BY redjanvier

DeepScan grade Maintainability Coverage Status

A lightweight nodejs based bookstore where users manage books and can sell them to other users.

PREREQUISITES

Features to implement

  • ✔ Anyone should be able to register
  • ✔ Anyone should be able to see all books on the page
  • ✔ Anyone should be able to get all details of any User
  • ✔ User(any) should be able to login into his/her account
  • ✔ User(logged in) should be able to see all users on the app
  • ✔ User(logged in) should be able to logout of his/her account
  • ❌ User(logged in) should be able to create/publish a book in the store
  • ❌ User(logged in) should be able to edit/re-publish a book to the store
  • ❌ User(logged in) should be able to delete/unpublish a book from the store

Initial setup

To setup the project you must run the terminal command npm run reset:db and create a .env file in project root folder based on .example.env

Then install project dependecies using the command npm install

To start the project in development mode run npm run dev and in production mode npm start

Routes

Welcome screen

[GET] /

:body: none

:result: Welcome screen with login and register links

User login

[GET] /users/login

:body: none

:result: Login screen with a register link

----------------------------------------------

[POST] /users/login

:body: {
  email "STRING",
  password "STRING"
}

:result: Dashboard screen with a logout link & users list

User register

[GET] /users/register

:body: none

:result: Register screen with a login link

[POST] /users/register

:body: {
    name "STRING",
    password "STRING",
    email "STRING",
    age "INTEGER",
    gender "STRING",
}

:result: Login screen with register success message

Tech stack

  • bcrypt
  • Node JS
  • Express JS
  • mocha & chai
  • jsonwebtokens
  • PostgreSQL with knex
  • express ejs (template engine)

Author

RedJanvier

Contacts

Github Twitter YouTube Facebook

About

Bookstore with Node Js, EJS, Express-session, Postgres and so much more

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •