Git Product home page Git Product logo

catastic's Introduction

Task Interview (catastic)

Pair programming for front-end candidates

The Rules ๐Ÿ“

  • You will have 90 min to get as much done as you can
  • Searching online is allowed
  • Asking questions is allowed and encouraged
  • Best coding practices are encouraged
  • Using Javascript libraries is allowed, ask to your interviewer first
  • Using UI libraries is not allowed
  • We recommend to follow specs in the given order
  • Remember Perfection is always the best option, but isn't strongly required..

Prepare your environment ๐Ÿ’ป

Make sure your system meets the following requirements:

Launch the application ๐Ÿš€

Install required packages:

$ npm install

Use the following command to run the app:

$ npm start

HTML & CSS

The layout is pretty simple. You don't need any css library, right? ๐Ÿ˜‰

Remember that we should not be able to distinguish between the mock and your final result.

Spec

  1. A navigation menu displaying two links: Home, Favs. (Home has the "current" state).

navigation

  1. Homepage:

    1. It should display a big image horizontally centered. Don't forget the shadow!
    2. Below the image, a couple of rounded buttons. The graphics are these characters: "โค", "๐—ซ". Feel free to copy-paste them.

homepage

  1. Favs:

    The required markup to display few images as a grid. We don't care about the grid dimensions, however:

    1. The grid should display perfectly aligned images.
    2. Try to fill each row with as much images as possible ๐Ÿ‘€.
    3. Each image should have its own delete button.

favs

๐Ÿ’ก Note: The API will not return perfect square images, take care of the proportion with css!

JS

Let's start adding functionality to our app!

Our first functional requirement is pretty obvious: we need to change the page rendered ๐Ÿ“บ.

  1. By default Homepage should be displayed.
  2. When "Favs" link is clicked, Favs section should be displayed.
  3. The same for "Homepage" link, when clicked display Homepage section.

๐Ÿ’ก Note: Updating the url is not required, but nice to have.

AJAX

Now our app should interact with the API service.

Spec

  1. Homepage:

    1. Use the service provided to get and display a random image.
    2. "Dismiss" button should retrieve and display another random image.
    3. "Like" button should register the fav in the service, and then, to retrieve and display another random image.

๐Ÿ’ก Note: Earn bonus points by adding a "Loading" message!

  1. Favs:

    1. Use the service provided to retrieve and display all favorited images.
    2. When "Delete" button in clicked, inform to the service that the image should be removed from favs and update the list accordingly.

The API is pretty simple, when running the server you can check the details here: http://localhost:8080/docs/.

Unit Testing

Shouldn't all code be tested it? ๐Ÿ”จ

Show us how you test your code. Here functionality examples you can test:

  1. Buttons callbacks.
  2. Ajax methods with a stub for the api service.

Easy Peasy huh? Good luck and feel free to ask any questions! ๐Ÿ‘พ

Cat tax:

kitty animation

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.