Giter Club home page Giter Club logo

restaurantsreviews's Introduction

Restaurant Reviews (Mobile Web Specialist Certification Course)

This is the project made for Udacity's Mobile Web Specialist nanodegree. This project was divided into three stages, you can see the ending result of each stage in the corresponding branches:

The main purpose of this project is to learn/improve the skills at:

  • Building Offline Capable Web Applications
  • Building Performant Web Applications
  • Building Accessible and Responsive Web Applications

After finishing the course, I've refactor parts of the code and I've used this project to practise with other technologies like webpack and docker

About Restaurants Reviews

This is an application about restaurants, users can:

  • See information of restaurants

    • Weekly schedule
    • Location
    • Cuisine type
  • Mark restaurants as favorite

  • Search restaurants filtered by neighborhood and/or cuisine type

  • Post reviews of a restaurant

  • See other users reviews of a restaurant

All the restaurants and reviews data is retrieved from the data_api server via a REST API. This data is then stored on IndexedDB so users can access the application with some content while being offline. Also, the waiting time for the application to load after the first load is very small because we first load the cached content and then update the application if the user is online.

Users can send reviews and favorite restaurants while being offline, once they are online the requests will be sent to the remote database even if they leave the application, in this last case the data will be sent only when the users come back to the application

Download and prerequisites

First download the code from github

git clone --recurse-submodules https://github.com/carlosdg/RestaurantsReviews && cd RestaurantsReviews

Now you have to create a .env file in the webapp folder to store some environment variables needed for the application. The file should be like the following:

# MODE specifies whether webpack should build the public folder for production or development
# Values are "production" or "development" (without quotes)
MODE=development

# REMOTE_DB_BASE_URL specifies what is the base URL of the remote database server
# This is from where the application will try to fetch the restaurant and reviews data
# It has to include the URL scheme, host and port (if the port is different than the
# default one for the protocol)
REMOTE_DB_BASE_URL=http://localhost:1337

# MAPBOX_API_KEY specifies the API key for mapbox
MAPBOX_API_KEY=api_key

Run

Manually

Install the app dependencies, generate the app public folder and install the API server depedencies

cd webapp && npm install && npm run build && cd ../data_api && npm install

Now you can start the data server with npm start. Now, in a new terminal session, go to the webapp folder and run a web server to serve the public folder with npm start

Via docker-compose

docker-compose build
docker-compose up

Authors

  • Carlos Domínguez García

Important Note: this project was started off from the Udacity's mws-restaurant-stage-1 repository. They created that repository as a starting point for the nanodegree project.

restaurantsreviews's People

Contributors

carlosdg avatar forbiddenvoid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.