Skip to content

the-nuggets/restaurant-reviews

Repository files navigation

Project Name

A recreation of the frontend for Zagat's reviews page (example: https://www.zagat.com/r/benu-san-francisco.)

This JavaScript app serves static HTML files through an Express server using a Webpack bundle that transpiles a React & jQuery frontend populated with MySQL data.

Related Projects

Repo link for the photo module at the top of Zagat's page:

Repo link for the map module at the side of Zagat's page:

Repo link for the Google Reviews module at the bottom of Zagat's page:

Repo link for the Zagat reviews module in the middle of Zagat's page:

Table of Contents

  1. Usage
  2. Requirements
  3. Development
  4. API
  5. Dependencies
  6. Authors
  7. License
  8. Acknowledgments

Usage

1.) To seed the database:

[ npm run seed ]

2.) To start the server:

[ npm run start ]

3.) To make webpack watch files:

[ npm run react-dev ]

4.) To run Jest & Enzyme tests:

[ npm run test ]

Requirements

An nvmrc file is included if using nvm.

  • Node 6.13.0 — Express — Webpack — React — jQuery — Jest — Enzyme

Development

API

The on-splash /GET requests for the 100 random data records that dataGenerator.js stores in a MySQL database 'restaurants' are routed to:

http://localhost:3001/api/restaurants/:id/reviews

This app's development port number was 3001.

Request objects get returned in the following form:

result[0] = { rest_id: 1, name: "CAFE BEAUJOLAIS", type: "Japanese", price: "$$$$", location: "Tenderloin", description: "Museum's bistro for star chef's recipes", foodScore: "2.7", decorScore: "2.4", serviceScore: "0.2", review: "Iure modi eos et expedita. Itaque est cupiditate similique laborum dolorem voluptatum quos. Placeat autem ut exercitationem et. Porro culpa rerum et debitis in voluptates sit sit perferendis. Velit deleniti nostrum ut sunt maxime animi quia sit. Beatae itaque tempora sed quo et ut." },

Dependencies

From within the root directory:

General Set-up:

npm init
npm install webpack
npm install babel
npm install jquery
npm install react
npm install react-dom
npm install react-scripts

Tests:

npm install jest
npm install enzyme
npm install enzyme-adapter-react-16

Database and Data:

npm install faker
npm install mysql

Linting:

npm install husky
npm install eslint
npm install lint-staged

Authors

Martin Connor (mepc36@gmail.com)

License

MIT

Acknowledgements

Sang Park, Nick Vincent-Hill, Destiny Walker, Connor Homan, Roger Dunn, Eugenia Ong, Rafe Autie, Eric Soderholm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published