acto-test
This application is hosted in Heroku and you can access it here
Highlights
- Interface developed in Vue.js
- API Developed in Laravel 7
- Fully unit tested
System Requirements
This application was built on Laravel 7, so it's important to follow all the server requirements from this version.
Take a look on this link to see the full list: https://laravel.com/docs/7.x#server-requirements
Installation
Perform the following steps in order to run the application:
$ git clone https://github.com/dorianneto/acto-test.git && cd acto-test
$ composer install
$ cp .env.example .env
$ php artisan key:generate
$ php artisan migrate:install
$ php artisan migrate:fresh
$ php artisan serve
Don't forget to set the configurations (when it's needed) between the steps.
Enjoy it! ❤️
API
Route | Description |
---|---|
GET api/game/leadboard |
Get matches leaderboard |
POST api/game/play |
Evaluate a match based on inputted data |
GET
api/game/leadboard
Result:
[
{
"name": "dorian neto",
"total_matches": 1,
"total_wins": 1
},
{
"name": "beatriz",
"total_matches": 1,
"total_wins": 0
}
]
POST
api/game/play
Payload:
{
"name": "dorian neto",
"hand": [2, "A", 10, "Q", 6]
}
Result:
{
"name": "dorian neto",
"scores": {
"user": 3,
"opponent": 2
},
"hands": {
"user": ["2", "A", "10", "Q", "6"],
"opponent": ["3", "8", "9", "J", "K"]
},
"userWin": true
}