rosalina saige
@catgirl
she/her
it/its
trans catgirl
πŸ’– sponsor me! quirks about me
disorders!!
autism
adhd
Splashcat stats

building a splatoon stats tracker

recently, i've been working on my little splatoon stats tracker. it's a little static site built with eleventy.

uploader

everything starts with the uploader. right now, i just have the uploader running on my macbook, but i eventually want to move it to another server and trigger it over http so i can trigger an upload from my phone. the uploader uses nxapi. it starts by downloading the most recently uplaoded data file from backblaze b2 to find the last uploaded battle id and then retrieves all the new battles from splatnet 3. it uploads the raw splatnet 3 json back to my backblaze b2 bucket and then sends the new battles to stat.ink. i use stat.ink for some deeper analytics sometimes and so that my battles can be included in the public data.

the uploader also handles uploading stage data (used for showing stage images) and uploading album images.

site

after the uploader uploads anything, it triggers a rebuild on netlify. this usually takes about a minute or two. it generates pages for each battle, a list of all battles, pages for each export group, the album page, and a lot of opengraph pages! currently, each battle has an opengraph image, each export group has an opengraph image, and the album and the overall summary recieve an opengraph image. open graph images i just host at /opengraph/ and then use the eleventy screenshot service to render. this provides beautiful images for sharing a good battle i had or something.

opengraph image for a battle battle link

at build time, any assets from splatnet 3 are downloaded and uploaded to another backblaze b2 bucket. any links on the frontend are replaced by cdn links.

the site, asset bucket, and album bucket are behind bunny.net cdn. so far the performance seems pretty good and i like the service.

recently uploaded battle posts

whenever new data is uploaded to the site, posts are made to my twitter and to my fediverse bot @splatoon3@catgirlin.space. this is done by a netlify function being ran after a new deploy. it checks for if there's any new data uploaded (to prevent commits from triggering a post) and then posts to twitter and to my akkoma instance. for stats on the export it just fetches a little json file that's generated at build time.

future?

i'm not sure what exactly i'm going to do with this in the future. i'm definitely going to continue uploading my data, but as far as new features i'm not sure. i want to build something for deeper statistics i think, but i'm still not sure how. i've also thought about adding support for salmon run, but it's not a mode i really play a lot so it's been pretty low priority. i do occasionally save my salmon run jobs though so that they're ready for when i do implement it.

posted
0 likes
0 reposts
0 bookmarks
did you write a response to this? send a webmention!
0 replies
Other Mentions