Code Monkey home page Code Monkey logo

new-front-end-developer's Introduction

New Front-End Developer

Host your version of this repository on Github, Bitbucket, Gitlab or another platform. Make sure it's publicly available. Share the link to the finished exercise.

This is an exercise to test your HTML, CSS, JavaScript and React knowledge. Limit the time you spend on this exercise to 3 hours. Don't worry if you're unable to finish in time. You should, however, be able to explain how you would finish the exercise — and why you would do it that way — if you're given more time. Remember, there is no correct solution. There will be plenty of time during the interview to give context to the shortcuts you made.

Introduction

To keep things light — and because the API is publicly available — you'll be working with Pokémon 🎉. The goal is to develop a single-page application (SPA) that allows you to:

Final image

Specifications

Select a Pokémon

Use the GraphQL API to get a list of all Pokémon. Add a text input to filter the list. Pokémon whose name match — or partially match — the input value remain visible. All other Pokémon have to be removed from the list. Clicking a Pokémon marks it as selected and displays it in the details section.

Select the moves

Use the GraphQL API to get the selected Pokémon's details: name, image, stats, abilities and type. Present the stats in a 2x3 grid. Divide the moves (abilities) by way of learning: level-up, tutor, egg and machine. Note that not all Pokémon have all 4 types of moves. Clicking a move adds it to the list of selected moves. Clicking an already selected move removes it from the list. Limit the number of moves to 4.

Add to squad

Add a "Save Pokémon" button. Clicking the button adds the selected Pokémon — with its selected moves — to your squad. Limit the squad to 6 Pokémon.

Technical details

The master branch is your starter kit for the exercise. Clone it and run yarn followed by yarn start. This should present you with a ready-to-go application. Use the src and public folder to edit or add code.

Note: the package.json includes a predefined set of dependencies. Feel free to add or remove packages as needed. Use as much open source components as you like. We recommend Downshift for the autocomplete UI. You can use Sass, CSS Modules or styled-components for styling. As long as you're able to justify your choices nothing is off limits.

Prerequisites

This exercise requires Node >= 12 and Yarn 1.

Commands

The build command will bundle all assets and output a static version of the website in the build folder. The start command will serve the website and watch for changes.

  • install: yarn
  • build: yarn build
  • start: yarn start

GraphQL API

The GraphQL endpoint URL is https://p5k91xxvoq.sse.codesandbox.io/. It's available in your application as process.env.REACT_APP_POKE_ENDPOINT. You can use the Graphql playground as a documentation resource or to get familiar with the API.

You'll need two queries to build your application: one for listing all Pokémons and one for getting a Pokémon's details:

Pokémon List

Pokemons(first: 151) {
  id
  name
}

Pokémon Details

Pokemon(name: "snorlax") {
  id
  name
  image
  abilities {
    name
  }
  stats {
    name
    value
  }
  types {
    name
  }
}

Design Details

The base colors are:

  • Blue: #3a5d9f
  • Yellow: #fdcc07
  • White: #ffffff
  • Grey: #c1c8ca

The Pokémon type colors are:

  • Normal Type: #a8a77a
  • Fire Type: #ee8130
  • Water Type: #6390f0
  • Electric Type: #f7d02c
  • Grass Type: #7ac74c
  • Ice Type: #96d9d6
  • Fighting Type: #c22e28
  • Poison Type: #a33ea1
  • Ground Type: #e2bf65
  • Flying Type: #a98ff3
  • Psychic Type: #f95587
  • Bug Type: #a6b91a
  • Rock Type: #b6a136
  • Ghost Type: #735797
  • Dragon Type: #6f35fc
  • Dark Type: #705746
  • Steel Type: #b7b7ce
  • Fairy Type: #d685ad

new-front-end-developer's People

Contributors

livain18 avatar stevenbenisek avatar

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.