cnguy / onetricks.net

(WIP) kayn-powered (typescript node.js) ReasonReact app presenting you a dashboard of high ELO one trick ponies in League of Legends
http://onetricks.net
14 stars 2 forks source link
javascript league-of-legends node-js nodejs react reason-react reasonml recompose redux typescript typescript-node

Source for http://onetricks.net

A web application displaying a list of high ELO one trick ponies in League of Legends, using kayn.

Status: WIP

The master branch is not necessarily indicative of its current state in release.

In the future, there will be a CHANGELOG for production releases.

Preview:

Alt text

Note that this codebase is also very old, and my main goal now that I finished building up some stats is to clean up the code.

Development

make run # docker-compose up --build

Deployment

Server

# Make sure that you're pointing to your own droplet IP address!
sudo make prep-digital-ocean

In DigitalOcean console:

# Make sure that you fill out the docker-compose.prod.yml file!
sudo make run-prod

Frontend

yarn build && yarn deploy

Overview

This web application is now comprised of 5 components: 1) Site API (stats, one tricks) 2) React Client in ReasonML that is deployed to surge.sh 3) MongoDB (via mlab) for storing One Tricks and Stats 4) Redis (via redislabs) for caching Riot League of Legends API requests as well as my own site API calls in production. node-lru-cache or Redis can be used for development caching 5) AWS S3/CloudFlare for asset caching

The scripts build up two important datasets (currently you can run them by just uncommenting the respective index.js main function calls):

1) Statistics 2) One Tricks

Problems

There are two problems with this web application right now:

Firstly, the stats-building service isn't autonomous, but I hope to change that soon. This should be isolated from onetricks.net which can essentially just be a static website.

Secondly, the One Tricks algorithm isn't an algorithm. It simply just determines the highest played champion of a player, and then just checks if the number of games on that champion is >= {some percentage} of the player's total games.

So basically grade school division.

However, I found that this heuristic only really worked well when there are accurate stats (only then did 45% worked really well). This can also be outdated because a player may have switched to one trick a different champion recently.

I used my eyes to judge the results and overall, it seemed fine (I used to be a Challenger player for multiple seasons).

As of April 2018, I'm planning to add a match history checker to confirm that the player still plays the champion that is their overall most played.

Reddit Description

reddit op