Cover photo by Glenn Carstens-Peters
I wrote a lot on the last couple of posts and I realize this beginning will be more verbose because I'm not expressing any code: just thoughts and feelings. Anyway...
In summary, for every match, I want to check the odds from the betting sites (initially, just from bet365) and be able to make a guess of match outcome until the match starts or give up guessing a particular game. I should be able to check the history of my guesses, see how much money I would have earned (or lost), and be remembered of upcoming matches to "bet".
In order to not lose interest in the process, I selected topics that I am passionate about and connected them to real things. Two things that I enjoy a lot are soccer and mathematics. I had my time on betting websites trying to predict the outcome of lots of matches and in the end, I believe I broke even (or lost/won a little). I am a very competitive person too. With these three things in mind, the idea formed as creating an application that displays the next games in my favorite leagues (that is, Champions League, English Premier League, and Brazilian Séries A and B).
After that, I list the stack I chose and where they fit in the application:
Gatsby - A React-based framework to build static websites, which offers 2000+ plugins to integrate lots of different services. Here, I chose it for the possibility of building a PWA, the integration with GraphQL, and the easiness of integrating the plugins;
GraphQL - A query language for APIs, which makes possible requesting from the database only the data we want;
RapidAPI - A marketplace of APIs with lots of free and freemium options. After some research, I decided to use API-FOOTBALL, which lets me make 100 requests per day. More than enough to prefetch the matches of the day and their odds;
MongoDB - A NoSQL database to store the prefetched data from the API;
Serverless Framework - A framework that allows programmers to use Serverless services from AWS, Azure, GCP, etc. with easy YAML + CLI development. I'll use AWS Lambdas to schedule API calls and save responses to MongoDB, as well as providing an API to the queries we'll send from the frontend.
For the next step, I'll sketch a wireframe to see how the application is going to flow and decide the API calls I'll have to make in order to not exceed the 100 quota.
See you then :D