Skip to content

M.E.A.N stack application for 3rd year web development, CIT

Notifications You must be signed in to change notification settings

jackdgerrard/restaurant-reviews-demo

Repository files navigation

MEAN STACK application for Server Side Web Frameworks module

Technologies Used

MongoDB

ExpressJS

Angular

NodeJS

NPM

Nodemon

Cors.js

jsonwebtoken

body-parser

Postman

passport - Authenticates http requests and is used to protect express routes. Had issue with this following tutorial, found solution here

passport-jwt An authentication strategy for Passport using web tokens

bcrypt - hashing algorithm designed to be slow for security purposes; slows down dictionary attacks.

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Had issue with this following tutorial, found solution here

Specification from lecturer Jing Hua Ye

Design, develop and implement a web App for Restaurant Reviewers

Jing Hua Ye, CIT 13/09/2018

1 Introduction

In this project, you’ll build a Restaurant Reviews App that meets accessibility standards and provides a responsive user experience. The application must include:

  1. restaurant names,

  2. a photograph,

  3. address,

  4. operating hours for each restaurant,

  5. reviews (including the name of the reviewer, 5-star rating system and comments, date of review),

The application must include:

  1. an application header,

  2. a menu providing multiple ways to filter the restaurants.

  3. When viewing a specific restaurant current reviews must be displayed along with a form for the user to submit their own review.

2 Requirements

  1. Users are able to sign up for an account to log in the application.
  2. Users are able to sign in before start the application.
  3. The application should contain a home section and an about section
  4. The "Restaurants" section displays all the restaurants in the catalog.
    • User can use search to filter the catalog.
    • User can filter by type, clicking on one of the filters.
    • User can filter by neighborhood and cuisine type.
    • Sort the list using designated buttons.
    • Click on each restaurant in the list to see more details.
  5. In restaurant details user can see picture, address and reviews. Review can be added and will be saved.
  6. It allows users to submit a restaurant review via a new review form online and offline.
  7. It allows users to mark a restaurant as a favourite.
  8. All content-related images include appropriate alternate text.
  9. Uses MongoDB to cache JSON responses from a Node.js server. There maybe a small variation in MySQL version. 10.Try to meet the above requirements as much as you can.

3 Submission

Submit the source code of the game through Blackboard. You need to give a quick presentation on your final product.

security considerations

This app uses bcryptjs to ecncrypt user's passwords, regex to validate emails in angular

update possibilities

I have included the ability to validate email address at sign up using regex in Angular if feature is to be implemented in future.

The newData Functions in Node and Angular will permit the addition of a new restaurant to be added in the future if that feature is requested. This could be achieved with a front end form in Angular easily enough.

running the application

install middleware and dependancies.

$npm install

to compile angular to public folder (when in Angular-src folder).

$ng build --prod

launch mongoDB on Linux

$sudo service mongo start

launch mongoDB on windows in cmd as admin

$net start MongoDB

launches nodemon, and Express application

$npm start

To compile angular app in production mode and start server

$npm run quickstart

Mongo Commands

cheat sheet

command for importing restaurants after converting json to json array

$mongoimport -d restaurants -c restaurantsCollection --drop  --file "restaurants.json"

in Windows the mongoimport script isn't added to path, if using default installation settings open cmd as admin and go to:

$cd C:\Program\Files\MongoDB\Server\4.0\bin

Learning Resources

Mongo Documentation

Express Generator documentation

coursetro YouTube course on angular

Coursetro Angular course written version

Node.JS documentation

Brad Traversy's Youtube tutorial for creating a MEAN Application

About

M.E.A.N stack application for 3rd year web development, CIT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published