Skip to content

fac-13/phac-kpnet-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phac-kpnet-autocomplete

Project

Autocomplete website/widget

Description

  • A website that enables users to quickly find and select dogs from a list of suggestions, as they type.
  • The list is dynamically generated from a list of dog breeds stored as a JSON file on the Heroku server.
  • Once the dog is selected, a random picture of the specimen is displayed. Every FETCH click will render a new random picture of this breed's specimen.
  • The subreeds, such as Yorkshire terrier are displyed in brackets, i.e. terrier (Yorkshire). To find Yorkshire terrier, select terrier.

The App structure

diagram

The server handles the search and stores the object with all the dog breeds available.

All other operations including the API call to DOG.CEO.API are handled from the client's side.

Testing

  1. Only pure functions are tested and there is only one pure function.

  2. Tape was used for testing pure function. DWYL guide for using tape.

  3. Nyc was used to check test coverage:

tests

API docs

  1. The photos and the original list of breeds come from DOG.CEO.API

  2. For more information on DOG CEO API: see resource.