Skip to content

mbnakaya/imdplay

Repository files navigation

IMDplay

API developed to attend a card game based in movie ratting with IMDb (Internet Movie Database).

⚠️ This is a MVP, so the code may have some bugs. If you found something wrong or to improve, please feel free to contribute!

About

Stack

The fallow stack was used to develop this project:

  • Java: 17
  • Groovy: 4.0
  • Spring Boot (Spring Data JPA and Spring Web): 3.0.0
  • MySQL: 8
  • Docker
  • Spock Framework: 2.3
  • Lombok
  • Jacoco

Architecture

This project was developed based in Hexagonal Architecture, specifically the Netflix Hexagonal Architecture. The main principle used in this project is the decoupling, making use of Port Adapter design pattern.

Usage

Until this moment, the project don't have any cloud environment. So, to run and test, it's necessary to build and launch the project using Docker.

Setup

This project requires a Database to run. So, the first thing is launch a MySQL Database. Run the fallowing command to create a MySQL8 container with docker-compose.yml:

docker-compose up

⚠️ You should run this command into the project folder!

Now, it's time to build and launch the project using the Dockerfile:

docker build -t imdplay .
docker run -p 8080:8080 imdplay

API

If you are running this project local, consider the '[host]' as localhost.

Registry User

POST [host]/v1/register

{
  "fullName": "Test User",
  "username": "TestUser1",
  "email": "[email protected]",
  "password": "1234"
}

Get User

GET [host]/v1/register (Authentication Required)

Login

POST [host]/v1/login

{
  "userName": "TestUser14",
  "password": "1234"
}

Start Match

POST [host]/v1/match (Authentication Required)

Respond Round

POST [host]/v1/match/{ID}?response={A,B} (Authentication Required)

Get Match

GET [host]/v1/match/{ID} (Authentication Required)

List Matches

GET [host]/v1/match (Authentication Required)

Finish Match

PATCH [host]/v1/match/{ID} (Authentication Required)

Get Ranking

GET [host]/v1/ranking (Authentication Required)

⚠️ All requests annotated with (Authentication Required) must be authenticated using Basic Auth (based in user/password).

OpenAPI

To get more details, check the OpenAPI documentation: [host]/v3/api-docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published