Derby County API

1/4
Screenshot of Scalar docs showing endpoints of api

technologies & Frameworks

Java
ASP.NET 8
Nuxt.js
PostgreSQL
Azure
Github Actions
Python
Linux

A REST API personal project that exposes endpoints for retrieving data on all Derby County match history and also upcoming fixtures. The motivation for creating this project is that I am a huge Derby County fan and wanted to be able to access historical match data, upcoming fixtures and other types of data using a REST API service which then could be used for further applications such as creating a frontend application to keep up to date with Derby County games or to build and train machine learning models using the data. To obtain the data for this project I used Python to create various Python scripts to webscrape the data from the web and store the data in a PostgreSQL database. The first script obtained historical match data by scraping the 11vs11 website for all historical Derby County matches. The second script enables scraping the Sky Sports website for any scheduled Derby County fixtures and stores the key details of that fixture such as the date, the webpage where the final result will be produced, teams, etc. Finally, the third script checks the PostgreSQL database for any fixtures that have been played and if so uses the stored Sky Sports website link to scrape the match data for the game. To ensure the API is always up to date I have set up cronjobs on my Raspberry Pi 4 to run the second and third script to run daily to find any new match or fixture data and add it to the database. The backend Rest API for this project was created twice the first time using Java Spring Boot and the second C# ASP.NET 8 and connects to a PostgreSQL database to store and retrieve data, which can be filtered in many ways such as by season, team, competition, etc. A Nuxt.js frontend was created to display the data along with the Scalar API docs to test/try out the endpoints of the API. The whole project was deployed to Azure using a CI/CD pipeline using GitHub Actions and the Azure Services used to deploy this site were App Service, PostgreSQL flexible Server and Static Web Apps.

To see a live preview of the website check it out with this link here