tianyihuang01 / frontend-challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend Challenge

Updates from Candidate

(last update: 7/03/2023)

The following functionalities are implemented

  • Shows a list of all Pokémon
  • Allows a user to filter the list of Pokémon by their type(s)
  • Pokémon stats over 90 are shown in red

Supplement

  • The following packages are installed.
    • styled-components
    • @types/styled-components
  • Unit tests are added for each component using Jest.
  • Pagination are added to improve user experience.

File structure

$PROJECT_ROOT
├── public
│
├── src
│   │   # React component files
│   ├── components
│       # Top navigation bar component
│       ├── Header
│       # The filter buttons and table
│       ├── PokemonDetails
│           ├── components
│               # A styled-component for all filter buttons
│               ├── ButtonFilter
│               # Divide a list into several pages
│               ├── Pagination
│               # Each row in the table
│               ├── PokemonItem
│               # A button group with filter options
│               ├── TypeFilter
│       # Title component
│       ├── Title
│
│   │   # Reusable variables
│   ├── constants
│   │   # Sample data file
│   ├── data
│   │   # Sample image file
│   ├── img
│   │   # Interfaces files
│   ├── interfaces

Original Introduction

This is the original introduction that was already in the README file. It will remain unchanged below the new information.

Prerequisites

  1. Git should be installed and used to clone this repository
  2. Node.js should be installed
  3. A GitHub account

Quickstart

  1. Fork this repository and clone the fork to your machine
  2. Install the dependencies npm install
  3. Start the application npm start

Overview

Challenge

Build a basic single-page application from the provided design to help look for Pokémon with the following features:

  1. Shows a list of all Pokémon
  2. Allows a user to filter the list of Pokémon by their type(s)
  3. Pokémon stats over 90 are shown in red

What's provided

  1. A slightly modified Create React App template project using the TypeScript template, a CSS reset, and the Pokémon logo image.
    You are free to use any other boilerplate or React framework that uses TypeScript if you'd prefer.
  2. A .json file in ./src/data/ containing all the Pokémon data from the first generation.
    An import is already provided in ./src/App.tsx to use this data too!
  3. Ready-to-use TypeScript interfaces in ./src/types.ts for the provided .json data.
  4. Figma design files as guidance for the look-and-feel of the application (see below).
Figma design files

Constraints

  • 2–4 hours over ~5 days
  • Use React and TypeScript

Expectations

We do not expect you to spend more than 2–4 hours on the challenge, and we understand that it's unrealistic to implement a complete and polished solution in this time frame.

If you feel there was more you could do to improve it by the end of this time, please add some notes about what you'd change. We'll discuss these with you in person (or video call).

Submission

Once you've finished you can send us the URL to your repository via email. If your repository is private let us know and we'll send you the GitHub accounts that will need access to review the submission.

You are free to open source your work if you like.

Create React App Readme

This project was bootstrapped with Create React App.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About


Languages

Language:TypeScript 89.0%Language:CSS 6.0%Language:HTML 5.0%