Skip to content

CodersCamp group project 4 built with Bootstrap, Node, Express, MongoDB, Pug

Notifications You must be signed in to change notification settings

natkalia/BookStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 BooksApp 📚

Version Status: In progress License: ISC

Check demo at ✨ Heroku and source code at 🏠 GitHub project homepage

This app was created as a part of the CodersCamp project (2019, Warsaw group) - fourth project - backend JavaScript, introduction to Node.js.

We created an app (with books database) in which you are able to add / edit / delete books as editor (authorization) and add comment and rating after registration and login (authentication).

📘 Getting Started

Prerequisites

To run project on your local machine for development and testing purposes you need to install the following software:

Install & usage (bash)

  1. Clone repository
git clone git@github.com:dobrzyckahanna/BookStore.git
  1. Install required project dependencies
cd BookStore
npm i
  1. Create your database on MongoDB Atlas and add .env file to your repository (main folder)
.env:
DB_USER=your Atlas database user name (not user name to Mongo account)
DB_PASSWORD=your Atlas database password (not password to Mongo account)
DB_DATABASE_ADDRESS=your Atlas database address
DB_DATABASE_NAME=your Atlas database name
NODE_ENV=development
DEBUG=app:startup,app:db
DEBUG_COLORS=true
DEBUG_FD=1
JWT_PRIVATEKEY=your secret jwt key
SESSION_SECRET=your secret session key
  1. Run developer server
npm start
  1. To see and test app open on localhost:3000

📙 Technologies:

Project requirements:

  • database (relational or non-relational), its maintenance & input validation
  • client/server communication, HTTP request handling
  • template engine & CSS framework
  • environment variables
  • authorization & authentication

Used technologies:

  • JavaScript (including ES6+)
  • MongoDB, mongoose, joi
  • Express.js, jQuery - AJAX
  • Pug, Bootstrap
  • dotenv, config
  • bcryptjs, jsonwebtoken
  • cookies handling: cookie-parser
  • errors handling: connect-flash, express-messages, express-session

Main features:

  • MongoDB Atlas cloud database handling
  • debug with use morgan & debugger package
  • CRUD for books
  • user registration and login (authentication)
  • editor with additional permissions (authorization)
  • form handling (book: add, edit, add rate & review, user: registration & login)
  • delete book handling
  • top 10 books (key: descending ratings)
  • search engine (key: author or book title)
  • heroku deployment

👥 Authors

📓 To improve

  • errors handling related to id not found (status: 404)

📗 Credits