/searchspring

Interview Coding Assignment for SearchSpring: Create a product card gallery and populate the product data with its Search API. Includes Pagination.

Primary LanguageJavaScript

SearchSpring Interview Assigment

Made with create-react-app. Read more on how to run the app here.
See the live demo here.

Objective: Build a Search Page with Pagination with SearchSpring's Search API.

Sample Request URL for the Search API:
http://scmq7n.a.searchspring.io/api/search/search.json?siteId=scmq7n&q=jeans&resultsFormat=native&page=2

Request Query Parameters to Use: "siteId", "q", "resultsFormat", and "page"

Note:

  • Look at full-integration sample here
  • Filter and sorting features not required.
  • Use "resultFormat=native" query parameter to get response body as JSON.

UI Requirements

Components

  • TextInput Box w/ a Search button next to it
  • Grid Container of Product Cards
  • Each Product Card Contains the following Elements:
    • Product Name
    • Product ThumnailImage
    • Product Price
    • Product MSRP
  • Pagination
    • Previous Page Button
    • 1,2,3...N Pages Buttons
    • Next Page Button

Logic

  • If on the first page, then hide or disable the previous-page button
  • If on the last page, then hide or disable the next-page button.
  • When N-Page is clicked, then make a request with "page" parameter for the desired page.
  • Display product results when someone types into searchbar and click the search button

Wireframe

Made with Inkscape software.