Giter Club home page Giter Club logo

frontend-technical-test's Introduction

Addison Global Frontend Technical Assesement

Introduction

Welcome to Addison Global Frontend Tech test.

The primary goal of this exercise is to assess how you reason about your ability to write clean, well tested and reusable code. There's no hard rules or tricky questions.

We hope you have fun.

Glossary

  • Event - A sports event. A football match between Real Madrid and Barcelona for instance. An event has 0 or more markets.
  • Market - A betting opportunity available for a specific event. "Team to win" or "Player to Score First" are possible examples of a market.
  • Selection - A possible outcome for the market which has a price associated with it. Example: "Real Madrid to win at 1.25" or "Ronaldo to score first at 1.15".
  • Betslip - The list of selections added by the user. You can think of this as the shopping cart.

Brief

This exercise is comprised of two views:

  • Event List - a list of events, markets and selections
  • Betslip - List of selections that the user is betting on

When the page loads, you should fetch the data to render the event list. Each event must contain the event name and a list of markets associated with that event. For each of those markets, its name should be displayed alongside a button for each associated selection. Please see the screens section for more details.

Please be aware that an event may have 0 markets and in that case, the event should be ignored (not displayed). For the purpose of this exercise, you can consider that every market has at least one selection.

When a selection on the event list is clicked, it should change its color to green. Also, you should add it on the betslip by displaying its name, price and a remove button.

When the remove button for a selection in the betslip is clicked, the selection should be removed from the betslip, and the corresponding button on the event list should switch to its default color. The same behaviour should apply when a user clicks on a previously added selection (green button) on the event list.

Data

We've provided an endpoint that can be accessed in the following URL: http://www.mocky.io/v2/59f08692310000b4130e9f71

Data Diagram

Although our endpoint provides hierarchical data, we suggest you normalize the data in a way that's more convenient for your application. Please provide justification for your choice.

You can also find a sample of the data data.json

Types

/** The response type of the API call */
type ResponseType = EventsType[];

/** Event Entity */
type EventType = {
    id: string,
    name: string,
    markets: MarketType[],
};

/** Market Entity */
type MarketType = {
    id: string,
    name: string,
    markets: SelectionType[],
}

/** Selection Entity */
type SelectionType = {
    id: string,
    name: string,
    price: number,
}

Technology

At Addison Global, we're big fans of React and React Native. Our stack consists of React, Redux, Redux-Saga, Flow, Ramda.js, Reselect, and Jest. we encourage you to solve the task in this stack, if you're comfortable with it. Solutions using React Native are preferred. If you choose to use web platform to implement your solution then create-react-app is a standard way of starting the project.

You're also free to use a component library to get you started and any other package that you find required.

Static type checking is a great way to introduce additional level of safety into your code and we welcome both solutions written using Flow or TypeScript.

Despite the above stack, we accept answers using different choices of libraries as long as you keep React.js.

We like to write clean code using proper programming patterns and JavaScript best practices and expect you to strive to do the same.

Screens

You can find a prototype outlining the basic functionality here: Prototype

The provided screens are a wireframe, not a final design for the application. You are expected to implement the user interface by yourself. The use of component libraries, like Material UI, Native Base, might make this easier for you and is encouraged.

Event List View

  • Initial View

Event List initial view

  • After a selection has been added

Event List - Selection Added

Betslip View

  • Empty

Betslip - Empty

  • With Selections

Betslip - With Selection

Tests

We expect you to provide tests alongside your code. The minimum requirement is that the code will be unit tested. End to end tests are a big plus. From our experience Cypress.js works very well for web tests and Detox is a great library for React Native application testing, but you're free to pick your favourite.

The Deliverable

  • A bundled/archived repository showing your commit history or a link to an accessible private repository with your work in (Github can host private repositories at a cost; there is no charge for doing so with Bitbucket). Git example for sending us a standalone bundle:

      git bundle create <yourname>.bundle --all --branches
    
  • A Readme.md file explaining the decisions you've made solving this task including technology and library choices.

  • Any instructions required to run your solution and tests in a Linux environment.

frontend-technical-test's People

Contributors

jribeiro avatar xeed 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.