Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Frontend Coding Challenge

Notifications You must be signed in to change notification settings

faceit/frontend-coding-challenge

Repository files navigation

Frontend Coding Challenge v2.0

This project was bootstrapped with Create React App and has addtional libraries included:

Head over to the coding challenge here.

Available Scripts

In the project directory, you can run:

yarn start

Starts the fake REST API server on http://localhost:4000 and runs the app in development mode on http://localhost:3000.

Notes

  • The page will reload if you make edits.
  • You will also see any TypeScript or lint errors in the console.
  • You can re-run the script to reset/regenerate the data.

yarn start:web

yarn start:web

Runs the app in development mode on http://localhost:3000.

Notes

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

yarn start:api

yarn start:web

Starts the fake REST API server on http://localhost:4000.

Notes

  • You can re-run the script to reset/regenerate the data.

Fake REST API

Running on http://localhost:4000.

/tournaments

GET

Get a list of tournaments.

Query Parameters
q

Type: string

Search tournaments by any value

Response Example
[
  {
    "id": "79218e94-91fd-4420-8278-f453574b97c4",
    "name": "Veritatis Quam Facilis",
    "organizer": "Rerum Perspiciatis",
    "game": "Rocket League",
    "participants": {
      "current": 206,
      "max": 256
    },
    "startDate": "2020-02-27T11:28:02.233Z"
  },
  {
    "id": "042fddd8-882f-4dd3-9cf1-ff82a3c8be9f",
    "name": "Cum Eveniet Quibusdam",
    "organizer": "Id",
    "game": "Dota 2",
    "participants": {
      "current": 168,
      "max": 256
    },
    "startDate": "2020-02-27T11:28:02.233Z"
  },
  {
    "id": "2eb5d07a-8ce5-4b36-8c0f-76b55701d9cc",
    "name": "Numquam Fuga Totam",
    "organizer": "Quaerat Dolorem",
    "game": "Dota 2",
    "participants": {
      "current": 256,
      "max": 256
    },
    "startDate": "2020-02-27T11:28:02.233Z"
  }
]

POST

Create a tournament.

Request Example
{
  "name": "Foo"
}
Response Example
{
  "id": "2b86b928-a0b5-4dec-8b5a-5f3519790829",
  "name": "Foo",
  "organizer": "Voluptas",
  "game": "League of Legends",
  "participants": {
    "current": 204,
    "max": 256
  },
  "startDate": "2020-02-27T11:36:27.047Z"
}

/tournaments/:id

PATCH

Edit a tournament.

Request Example
{
  "name": "Bar"
}
Response Example
{
  "id": "2b86b928-a0b5-4dec-8b5a-5f3519790829",
  "name": "Bar",
  "organizer": "Voluptas",
  "game": "League of Legends",
  "participants": {
    "current": 204,
    "max": 256
  },
  "startDate": "2020-02-27T11:36:27.047Z"
}

DELETE

Delete a tournament.

Response Example
{}