Milestone 2: Personal Contribution Page (Yiğit Şekerci) - bounswe/bounswe2023group4 GitHub Wiki

Yiğit Şekerci

Important Roles

I was firstly responsible for finding my own API function to introduce. I have chosen an API called api-sports as you can track from issue #79. The details of the API and functionality I have introduced will be described later in this section.

My second responsibility was to help the team choose the frameworks to use as can be tracked from issue #81. I took initiative as a more experienced team member and led the discussion around the framework selection. I have researched the frameworks that I was not familiar with and introduced them to the team. At last, we have decided to use Django and React for backend and frontend, respectively.

Moreover, since I was more familiar with backend development, I taught other team members what postman is and how to use it. It can be tracked from issue #82. I prepared a tutorial for the team. In addition, I have prepared the docker environment for team to be in sync as can be tracked from issue #87. Lastly, I took part in frontend development and created UIs for the backend as can be tracked from issue #112.

Frontend

  • I have initialized the react project according to the tutorials in the internet.
  • I have watched comparison videos about React and NextJS and decided to continue with NextJS
  • I have learned basics of NextJS from their official documentation.
  • I have created main page i.e landing page.
  • I have created Batuhan's country api page.
  • In order to do Batuhan's page I had to learn making http request so I have researched about it in the internet. I have found that react-query is well-known library so I choose it to be my fetch library.
  • I have learned react-hook-form library to use it for forms in jsx. I have examined official documentation and watched tutorial videos.
  • I have developed my own API's page sports API.
  • I have developed hooks for my friends with Selin in front-end since I know how to make request easily.
  • I have tried many times but couldn't manage to deploy frontend

Backend

  • I have initialized the Django project and requirements.
  • I have watched Django tutorial and asked Batuhan to learn how to code in Django.
  • I have researched tutorials for path naming conventions to make good url names.
  • I have developed SportSuggestions model and corresponding code in backend.
  • I have helped the development in backend project by looking to pull requests.
  • I have directed my teammates for good documentation.
  • I have solved many conflicts since I am experienced in that situation.
  • I have debugged others codes for smooth production.
  • I have deployed backend.

Utilized third party API (Sports API)

the API I have chosen is API-Sports. This api is a sports API which provides data about various sports such as basketball, football, handball, etc.. I have chosen the football endpoint for my own use whose documentation can be found here. There are several endpoints.

  • Timezones: Information about different time zones.
  • Seasons: Information about different football seasons.
  • Countries: Information about different countries where football is played.
  • Leagues: Information about different football leagues.
  • Teams: Information about different football teams.
  • Standings: Information about the standings of different teams in different leagues.
  • Fixtures: Information about scheduled football matches.
  • Events: Information about specific events in football matches.

I have decided to use standings endpoint to fetch and display the different standings in different countries.

Route

Only route I have used is: https://v3.football.api-sports.io/standings?season=2022&league=39 You need api key for this call but I am not going to expose my own since it has low amount of limit.

Explanation

This route fetches standings in 2022 season in league with 39 id(Premier League). I have used this route with different leagues(5 league, 1 season).

API functions

Get sport suggestions

http://13.50.100.28:8000/api/sport_suggestions

Explanation

Gives sports suggestions list

Post sport suggestions

http://13.50.100.28:8000/api/sport_suggestions

Explanation

Creates new sports suggestion in db.

Third Party API calls league and standings

I have worked in pair with Batuhan for API. We made league and standings in backend with him to for me to learn how to do it. In exchange, I have worked as pair with him in his frontend page to teach him frontend.

Tests

Get all suggestion test

Tests whether get suggestions can return all the suggestions

Post suggestion test

Tests whether we can create suggestions can create suggestion

Other significant works

I have prepared docker files and docker compose for dockerization of our project.

Challenges

  • Late branches: Some of teammates finished their works very late so I couldn't managed the finish their work on last day.
  • PR's without tests: Some features pushed to the development without being tested so it blocked our process when we found out they didn't work.