Skip to content

An informative website about football matches and rankings

Notifications You must be signed in to change notification settings

queite/trybe-futebol-clube

Repository files navigation

TRYBE FUTEBOL CLUBE ⚽

Project developed in the Back-end Module at the Trybe course. The front-end app was provided by Trybe.

🎯

The Trybe Futebol Clube is an informative website about football matches and rankings.
The goal was to build an API and integrate — by docker-compose — the apps, so they can work consuming a database.
The API was tested using Sinon, Mocha and Chai.

🛠️ Tools:



Features

Feature Route Info
Login POST /login Uses JWT. { username: [email protected] password: secret_user }
Login info GET /login/validate Returns the user type
List teams GET /teams
Get team by ID GET /teams/:id
List matches GET /matches
Create a match POST /matches The match will be save as in progress. Login is required.
Finish a match PATCH /matches/:id/finish
Update in progress macth PATCH /matches/:id
Shows ranking of home teams GET /leaderboard/home
Shows ranking of away teams GET /leaderboard/away
Shows general ranking GET /leaderboard


⚙️ How to install the application:

Install and execute

Download the code:

git clone [email protected]:queite/trybe-futebol-clube.git

Enter the root folder:

cd trybe-futebol-clube

Install dependencies:

npm install

Run on docker:

npm run compose:up

Go to the localhost:3000 to see from the frontend or use the routes on Thunder Client to see the back-end.
Ex.: localhost:3001/leaderboard


Run the tests

Enter the backend folder:

cd ./app/backend/

Install dependencies:

npm install

Run the tests

npm run test:coverage

All Trybe projects use linters, Git and GitHub.