Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jet app

This project fetches and displays restaurant data from the Just Eat API based on a given UK postcode. It focuses on displaying restaurant information, such as name, cuisines, rating, and address. The data is displayed in a simple web interface using React.

Setup Instructions

  1. Make sure you have the following installed on your machine:

Node.js

npm

  • this can be checked by running the following commands
node -v
npm -v

If Node.js and npm are not installed downlaod here, (https://nodejs.org/en).

  1. Clone the Repository

First, clone the repository to your local machine:

git clone git@github.com:your-username/Jet-app.git
  1. Install Dependencies

Navigate into the project directory and install the required dependencies:

npm install
  1. Start the Proxy Sever

Before starting the application, ensure you have the proxy server running. In a separate terminal window, navigate to the project directory and run the following command:

node server.js
  1. Start the Application

Once the proxy server is running, you can start the development server with the following command:

npm start

Assumptions

  • I assumed that the structure of the API response would remain consistent, specifically that the data.restaurants array would always be present, and that the fields name, cuisines, rating, and address would exist for each restaurant.

  • I assumed that the requirement to display only 10 restaurants meant limiting the display to the first 10 results provided by the API, regardless of any specific ordering or filtering criteria.

  • The app previously relied on a CORS proxy (cors-anywhere) to bypass CORS restrictions when making API requests. However, this is no longer necessary as I have implemnet a proxy server (server.js) to handle requests and avoid CORS issues.

Improvments

  • Currently, the application does not validate the user-provided postcode before making the API request. An improvement would be to add postcode validation to ensure that only valid postcodes trigger API requests. This would prevent unnecessary requests to the API with incorrect or incomplete postcodes, enhancing the user experience and preventing potential errors.

  • Instead of simply slicing the first 10 results, apply filtering based on API fields—such as star rating, delivery cost, open-now status or cuisine type—to surface more relevant listings.

  • The UI is functional but can be improved for a more engaging experience.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages