Skip to content
/ tfc Public

The TFC project is an application that displays data from a 'football cup.' The front end is built with react.js, while the back end is built with TypeScript, Node.js, Docker, Express, MySQL, Sequelize, JWT and Mocha / Chai. TDD was used as a development tool for the API.

Notifications You must be signed in to change notification settings

calvitoria/tfc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

TFC - Trybe football club

The project's goal was to create a restful API that connects to a mySQL database via Sequelize in order to read, create, filter, update, the data and so on. The following routes were created: login, matches, teams, and leaderboard.

Technologies used:

⚠️ Front: React.js and RTL. (Because the front-end was done by trybe staff, I did not write any of the code in the application's front-end. Therefore, will not be included in this repository

Back: TypeScript, Node.js, Docker, Express, MySQL, Sequelize, JWT, bcrypt, and Mocha / Chai serve as the backend. TDD was used as an API development tool. Since I created the backend, you can find everything in the SRC folder.

Final result:

We begin by logging in: The validation is made by using jwt and bcrypt to encript the password when sending to the database. Then, we are able to search for matches, teams, and the ranking. As an admin, we are also allowed to update and create data.

capa
capa

Tasks developed:

task status
1 - Develop in /app/backend/src/database in the corresponding masses, a migration and a model the table of users ✔️
2 - Develop tests that cover at least 5 percent of the backend files in /src with a minimum of 7 lines covered ✔️
3 - Develop the /login endpoint on the backend in a way that allows access with valid data on the frontend ✔️
4 - Develop tests that cover at least 10 percent of the backend files in /src with a minimum of 19 lines covered ✔️
5 - Develop the /login endpoint on the backend so that it does not allow access without providing an email on the frontend ✔️
6 - Develop tests that cover at least 10 percent of the backend files in /src with a minimum of 19 lines covered ✔️
7 - Develop the /login endpoint on the backend so it doesn't allow access without a password on the frontend ✔️
8 - Develop tests that cover at least 20 percent of the backend files in /src with a minimum of 35 lines covered ✔️
9 - Develop the /login endpoint on the backend so that it does not allow access with an invalid email on the frontend ✔️
10 - Develop tests that cover at least 30 percent of the backend files in /src with a minimum of 45 lines covered ✔️
11 - Develop the /login endpoint on the backend so that it does not allow access with an invalid password on the frontend ✔️
12 - Develop the /login/validate endpoint on the backend so it pays data correctly on the frontend ✔️
13 - Develop tests that cover at least 45 percent of the backend files in /src with a minimum of 70 lines covered ✔️
14 - Develop in /app/backend/src/database in the corresponding masses, a migration and a template for the team table ✔️
15 - Develop the /teams endpoint in the backend so that it can return all teams correctly ✔️
16 - Develop the /teams/:id endpoint in the backend so that it can return data from a specific team ✔️
17 - Develop tests that cover at least 60 percent of the backend files in /src with a minimum of 80 lines covered ✔️
18 - Develop in /app/backend/src/database in the corresponding folders, a migration and a model for the matches table ✔️
19 - Develop the /matches endpoint so that the data appears correctly on the matches screen in the frontend ✔️
20 - Develop the /matches endpoint so that it is possible to filter the matches in progress in the frontend matches screen ✔️
21 - Develop the /matches endpoint so that it is possible to filter the finished matches in the frontend matches screen ✔️
22 - Develop tests that cover at least 80 percent of the backend files in /src with a minimum of 100 lines covered ✔️
23 - Develop the /matches endpoint so that you can save a match with the inProgress status as true in the database ✔️
24 - Develop the /matches/:id/finish endpoint so that you can change the inProgress status of a match to false in the database ✔️
25 - Develop the /matches endpoint so that it is not possible to enter a match with equal teams ✔️
26 - Develop the /matches endpoint so that it is not possible to enter a match with a team that does not exist in the teams table ✔️
27 - Develop the /matches endpoint so that it is not possible to enter a match without a valid token ✔️
28 - Develop the /matches endpoint so that you can update matches in progress ✔️
29 - Develop the /leaderboard/home endpoint so that it is possible to filter the rankings of the teams when sending in the frontend ranking screen with the initial data from the database ✔️
30 - Develop the /leaderboard/home endpoint so that it is possible to filter the rankings of the teams when they are home in the frontend ranking screen and when entering the match Corinthians 2 X 1 Internacional the table will be updated ✔️

capa

About

The TFC project is an application that displays data from a 'football cup.' The front end is built with react.js, while the back end is built with TypeScript, Node.js, Docker, Express, MySQL, Sequelize, JWT and Mocha / Chai. TDD was used as a development tool for the API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published