Coder Social home page Coder Social logo

marketgoo-code_test_front_senior's Introduction

This is a refactor exercise and his goal is to overall improve the proposed app. It shows a list of players with data about their team and their league score and we want you to propose solutions and implement them in order to improve the architecture, testability and UX. It's intentionally crappy so you can shine bright :)

Requirements

There are some mandatory constraints you have to attend:

  • Update the management of the state using REDUX and use a library for the management of the requests (like redux thunk or sagas)
  • Use our component library Ola to build the interface https://github.com/marketgoo/Ola
  • Improve how the user interacts with the form in the way you like. Feel free to add improvements.
  • Add a testing library of your choice and use it to test what you think it's relevant.

Notes

  • The app contains an api that allows you to get the players, add new ones and delete them.
  • The score of every player is updated every 5 seconds.
  • A socket channel emits a message with the players and their updated scores.
  • Any request to the api will always take an average of 2 seconds to respond.
  • You can install any extra library that is needed without making api changes. (ex: Postcss libraries or for testing)

Install

  • Donwload repository
  • npm i ( node v12 required )

โš ๏ธ In case you get the message Please install sqlite3 package manually try to install sqlite3 globally. Then delete the node_modules folder and reinstall again. See here for more help: sequelize/sequelize#11174

Run app locally

  • webpack -p
  • npm start
  • go to localhost:3000

API REST

  • GET /players return all players saved
{
    "status": "ok",
    "data": [
        {
            "id":1,
            "name":"Peter",
            "team":"Pandas",
            "score":5,
            "createdAt":"2020-05-28 11:32:54.506 +00:00",
            "updatedAt":"2020-05-28 11:32:54.506 +00:00"
        },
        {
            "id":2,
            "name":"Jhon",
            "team":"Cobrakay",
            "score":8,
            "createdAt":"2020-05-28 11:32:54.507 +00:00",
            "updatedAt":"2020-05-28 11:32:54.507 +00:00"
        }
    ]
}
  • POST /players Save player data and return player saved
{
    "status": "ok",
    "data": {
        "name": "saved-name",
        "team": "saved-team",
        "score": "saved-score"
    }
}
  • DELETE /players/{id} Delete a player.
{
    "status": "ok"
}

How to deliver the test

To submit your solution to the proposed test, send us an email to [email protected] with a link to your repository with your solution. Use that email to tell us anything you want about your solution (proposed solution, reasoning...).

You can also use that same email ([email protected]) for any doubt or problem you may have, do not hesitate to ask whatever you want.

marketgoo-code_test_front_senior's People

Contributors

jaimemmp avatar nobuti avatar pedroparra avatar

Watchers

 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.