Quality code and lots of coffee

Tag: API

Stats Tracker API

The Stats Tracker API was a freelance project I undertook for a local browser-game development company.

To provide more in depth reporting to their customers they wanted a small client side library they could inject into their games that would track certain events; it would then send these events to an API which would present them to the end user via custom reports – so the project was broken down into 3 parts

API

An exposed API that would log the events from the game, this had to be versatile enough to accommodate data packets of various lengths and structures as the packet structure could not be identified until the event had begun to be processed

Administration Area

The owners of the Stats Tracker needed the ability to manage clients and games within the system. For this an administration area was created which would allow for the administrators to manage Clients, Games, Events for those games and define the parameters that those events would pass in. This would provide the foundation for the structure which the API packets would send.

Client Area

Clients using the system needed access to their own area with a locked down and limited view of their own products, but no more. As this was a multi-tenanted system it was vital that clients did not have access to other clients games or reporting.

The reporting section itself also needed to be able to provide custom views and timescales for the data collected and display it in a visual format. For this I made use of a charting library

Tech Stack

ASP .Net Core MVC

.Net Core as I’ve mentioned on this blog is incredibly versatile – and given the scope of the system I wanted more out the box than PHP provided. MVC provided a fantastic framework to build the API and accept packages and .Net Core Identity allowed the flexibility that was needed in order to build the Adminsitration and Clientside areas. Then because of the cross platform nature I knew that when the app was handed over it could be hosted anywhere. Razor syntax and view models also meant that web pages could be built with relative ease to serve the client facing system’s requirements.

Chart.Js

Chart JS is a free but powerful open source charting library making full use of HTML 5, although the documentation is lacking, Chart.Js can very easily be integrated into custom reporting to provide good looking visual graphs

Entity Framework

From the offset this project had very clear defined objects within the system. Entity Framework provides a fantastic interface between the database and the service layer of your system so that both the API and GUI can communicate with the database without needed to write the SQL yourself. However, in some cases with reporting I needed to write custom SQL in order to optimize queries, and EF allows this alongside it’s usual functionality.

MySQL

Not as bloated or expensive as SQL Server, MySQL provides a very clean straight forward and cheap alternative as a database provider; whats more is that there is Entity Framework support with MySQL so that it can be integrated easily into a Microsoft Tech Stack. Which means for the first time I was able to integrate MySQL with ASP .Net hosted on a Unix Server .

Nick Infinity Islands – API & Back End

I was approach by Peg Digital to help with a new project they were working on for Nickelodeon. The new project would be a series of games for the Infinity Islands. As part of this game there would be an option for players to upload an image as part of a “Scoreboard” and Nickelodeon requested that these images be saved to a database, and be retrieved at a later point and displayed at user request.

The approach I took was to build an API and incorporate their current use of JavaScript by giving them my own JavaScript Client library to hit the PHP API in the back end. The API had to handle various tasks, passing back relevant information to the front end for the site to use, such as saving and retrieving images, getting gallery’s and in later days, serving reports on user interaction with the API. As well as this I also had to set up the Amazon Web Services host which runs this back end. This all had to be done with regular communication to the client, keeping everything secure to adhere to data protection when using the API, and overcoming new challenges when requirements changed or were added in.

The project faced it’s own challenges, after the API was set up to handle image capturing the storage space on the host server starting to reach it’s limit, and after live release the RAM limitations of the server meant some quick refactoring and code redesign needed to be implemented in order to get the server running smoothly.

The project was delivered on time, with positive feedback from the client.

© 2025 Joe van de Bilt

Theme by Anders NorenUp ↑