Skip to content

Instantly share code, notes, and snippets.

@bgreenacre
Last active March 27, 2023 13:29
Show Gist options
  • Save bgreenacre/890a63902dd5aa528157d1b079cdfe53 to your computer and use it in GitHub Desktop.
Save bgreenacre/890a63902dd5aa528157d1b079cdfe53 to your computer and use it in GitHub Desktop.
For Your Party Code Challenge

Products View Application

For Your Party Code Challenge Specifications

Document Objective

The purpose of this document is to provide detailed documentation that clearly defines the application that an applicant will create for the For Your Party Code Challenge.

Scope of Work Details

Application Description

For Your Party needs a way to track the interest in the products it sells. This application will display the categorized products currently sold. In addition, the user should be able to "favorite" a product.

End User Description

The end users of the application will be customers of For Your Party. The majority of these users use a modern version of Google Chrome browser and Firefox as well as mobile browsers.

Web Application Requirements

The details for this web application are defined below.

Import Products

The developer will import data from a csv file provided by this gist file products.csv into a structred database of their design. This database will then be used to render products display and also save favorites.

Display Products

The experience will adhere to these requirements:

  • Create a hierarchical menu displaying products by collapsible categories.
  • Clicking / tapping on any of the products should "Add to Favorites" by calling a json API endpoint using the fetch API.
  • This state will display a heart toggle (SVG) next to the product.
  • Hovering over a product name will reveal it’s sale price.

Favoriting a Product

When a user toggles a product as their favorite the User Interface should save that state in a database. Create an API that will receive a json payload containing the Name of the product and a flag signifying the product is favorited by the user. This will be stored in a structured database. This API endpoint should adhere to RESTful design practices.

Code Expectations and Deliverables

The developer is expected to adhere to the following parameters

Well Documented

The application code will be created with the assumption that other developers will work on it in the future, so it must be documented enough to make it easy for others to understand and maintain.

PHP Coding Style

The application code must be developed using Object‐Oriented methodologies. It must also be written in PHP 7+ and be E_STRICT‐compliant. The use of third party libraries and packages (ie. packagist.org) is allowed.

Error Handling

All application errors must be handled gracefully and display user‐friendly error messages if necessary.

HTML Coding Style

The quality of the site design will not be judged, but the HTML must be semantic and valid.

CSS Coding Style

While the overall design of the site will not be judged there are some CSS expectations.

  • Design must be responsive in order to work well on mobile devices.
  • Use of third party css frameworks and libraries are prohibited.
  • Use BEM naming.
  • Use CSS Grid instead of Flexbox.
  • Use of !important is prohibited.

Delivery

The developer will provide a url to a github (or similar git hosting service) repository. Instructions on how to run the application will be provided within the README.md file.

Tips:

If you cannot finish simply do the best you can and explain your thought process in the comments. Work at your own pace. We prefer quality over speed.

Category Title Price Sale Price
napkins Cocktail 1 0.6
cups + plates Shot Glasses 3.4 2.53
napkins Luncheon 1 0.57
napkins Napkin Rings 1 0.56
masks + wellness Disposable Masks 6.8 3.5
matches Classic 2.2 1.5
invitations Business Cards 6 2.51
matches Mini 2.2 1.5
barware Stir Sticks 1 0.5
matches Candle 2.2 1.5
invitations A7 6 2.51
matches Exploding 2.2 1.5
cups + plates Frost Flex 3.4 2.5
cups + plates Colored Frost Flex 3.4 2.5
gifts Holiday 3.44 2.6
cups + plates Styrofoam 3.4 2.505
bags, tags + favors Cake Boxes 9.1 5.5
cups + plates Stadium 3.4 2.54
cups + plates Can Coolers 3.4 2.52
masks + wellness Hand Sanitizer 6.8 3.5
masks + wellness Social Distancing 6.8 3.5
bags, tags + favors Favor Bags 9.1 5.5
bags, tags + favors Gift Bags 9.1 5.5
gifts Poker Box 3.44 2.53
bags, tags + favors Satin Ribbon 9.1 5.5
bags, tags + favors Tea Favors 9.1 5.5
napkins Photo 1 0.58
barware Classic Coasters 1 0.5
barware Leather Coasters 1 0.5
matches Cigar 2.2 1.5
barware Tabletop Signs 1 0.5
gifts Party Favors 3.44 2.5
gifts Grab and Go 3.48 2.5
gifts Gift Cards 3.44 2.44
invitations Stationery 6 2.51
barware Roller Coasters 1 0.5
invitations Recipe Cards 6 2.51
invitations RSVP 6.08 2.51
napkins Dinner 1 0.59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment