GithubHelp home page GithubHelp logo

dmitryt / js-task Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 276 KB

Created with CodeSandbox

Home Page: https://codesandbox.io/s/github/dmitryt/js-task2

HTML 0.37% TypeScript 99.48% JavaScript 0.15%

js-task's Introduction

Design

https://github.com/squirreljuror/api-design-and-styles/blob/master/design-and-style-guide.pdf

Task for Frontend Engineer

The following document describes the requirements, resources and expectations related to the task for the JavaScript Engineer role.

Please read it carefully to better understand what we are asking for and what we expect from you. After you done please share the codesandbox link to whom in may concern. Should you have any question after reading this document, please do not hesitate to contact us.

Requirements

The application must meet the following requirements:

  • Fetch all available cars
  • Implement pagination with limit of 10
  • Allow the user to filter the cars by manufacturer or color
  • Allow the user to sort the car by mileage
  • Show the details of a selected car
  • Add/Remove a car to/from the favorites collection using local storage

Technical requirements

  • Create a SPA using ReactJS
  • Use redux for application state (optional)
  • Use react-router-dom to manage routing
  • Make tests green
  • Use TypeScript, any types are not allowed
  • Use react-testing-library for component tests

Resources

For the UI, please use the design and style guide as a visual guide for your application and implement the styles yourself from scratch instead of using a library like Bootstrap or Material UI.

https://github.com/squirreljuror/api-design-and-styles/blob/master/design-and-style-guide.pdf

For the application data, please use following methods:

axios({ url: '/api/cars?page=1&sort=desc&manufacturer=Audi&color=red' }) to fetch cars

{
  cars: [{
    stockNumber: 12345,
    manufacturerName: 'Audi',
    modelName: 'A5',
    color: 'red',
    mileage: {
      number: 223;
      unit: 1;
    },
    fuelType: 'Benzin',
    pictureUrl: '/images/car.svg'
  }],
  totalPageCount: 20,
  totalCarsCount: 100
}

axios({ url: '/api/cars/1' }) to fetch one car by stockNumber

{
  stockNumber: 12345,
  manufacturerName: 'Audi',
  modelName: 'A5',
  color: 'red',
  mileage: {
    number: 223;
    unit: 1;
  },
  fuelType: 'Benzin',
  pictureUrl: '/images/car.svg'
}

axios({ url: '/api/colors' }) to fetch colors

['red', 'green'];

axios({ url: '/api/manufacturers' }) to fetch manufacturers

{
  uuid: '123-231',
  name: 'BMW',
  models: [{
    uuid: '234-1222',
    name: 'A5'
  }]
}

Note: Using of axios or other xhr based library is mandatory. (fetch api is not supported)

Our expectations

The most important things for us when evaluating your solution are:

  • Make all tests green
  • Use best practices
  • Clear code organization and project structure
  • A well developed UI/UX

Feel free to choose the techniques you feel more comfortable with and the most important thing: Have fun!

js-task's People

Contributors

dmitryt 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.