Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/redjanvier/nodejs-mvc-bookstore
Bookstore with Node Js, EJS, Express-session, Postgres and so much more
https://github.com/redjanvier/nodejs-mvc-bookstore
bookstore ejs express-session knex login-system node postgres
Last synced: about 4 hours ago
JSON representation
Bookstore with Node Js, EJS, Express-session, Postgres and so much more
- Host: GitHub
- URL: https://github.com/redjanvier/nodejs-mvc-bookstore
- Owner: RedJanvier
- Created: 2019-11-11T08:53:28.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-24T01:57:24.000Z (almost 2 years ago)
- Last Synced: 2023-03-03T08:55:37.000Z (over 1 year ago)
- Topics: bookstore, ejs, express-session, knex, login-system, node, postgres
- Language: JavaScript
- Size: 6.77 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LOGIN SYSTEM BY redjanvier
[![DeepScan grade](https://deepscan.io/api/teams/6051/projects/7919/branches/88156/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=6051&pid=7919&bid=88156)
[![Maintainability](https://api.codeclimate.com/v1/badges/337605d4ffd06ad9890b/maintainability)](https://codeclimate.com/github/RedJanvier/nodejs-mvc-bookstore/maintainability)
[![Coverage Status](https://coveralls.io/repos/github/RedJanvier/nodejs-mvc-bookstore/badge.svg?branch=develop)](https://coveralls.io/github/RedJanvier/nodejs-mvc-bookstore?branch=develop)A lightweight nodejs based bookstore where users manage books and can sell them to other users.
## PREREQUISITES
- NodeJs installed. (find it)[https://nodejs.org/en/]
- Text Editor of your choice. (find it)[https://code.visualstudio.com/]
- PostgreSQL installed. (find it)[https://www.enterprisedb.com/downloads/postgres-postgresql-downloads]## 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](https://github.com/RedJanvier)
[Twitter](https://twitter.com/red_janvier)
[YouTube](https://www.youtube.com/channel/UCrQBNajZa-ibHBerJQ0kAiQ)
[Facebook](https://facebook.com/jan.h.red)