Git Product home page Git Product logo

nameslol's Introduction

NamesLoL - Backend

๐Ÿ‘๏ธ Find upcoming and recently expired League of Legends summoner names.
๐Ÿ”Ž Search for summoner names to find out if they are available, or when they will become available.
๐Ÿ“’ View from a list of hundreds of thousands of summoner names across five regions to easily find unique and rare summoner names that are up for grabs.

Official Website

https://www.nameslol.com/

Architecture

architecture

There are three primary sections/processes of this application:

  1. A scheduler (1-6) which periodically refreshes summoner data stored in DynamoDB
  2. /{region}/summoner/{name} API (8-10), where the latest summoner information is fetched from Riot API, persisted to DynamoDB, and returned to the end user
  3. /{region}/summoners API (11-12), where expiring summoner names are queried from DynamoDB and returned to the end user

We dive deeper into each of these three sections below.

1. Scheduler to refresh data

  1. (1) A CRON scheduler triggers a Lambda function, SQSUpdateProducer
  2. (2) SQSUpdateProducer queries DynamoDB (SummonerNames) for names which are expired or have expired between a specified period
  3. (3) SQSUpdateProducer sends the names queried above to an SQS Queue (NameUpdateQueue.fifo)
  4. (4) The NameUpdateQueue.fifo triggers the SQSUpdateConsumer lambda function
  5. (5) SQSUpdateConsumer fetches the latest summoner data from Riot API
  6. (6) SQSUpdateConsumer updates the latest data fetched above into DynamoDB

2. Summoner API

  1. (7) An end user makes an API request that is routed via API Gateway
  2. (8) API Gateway routes the request and invokes the SummonerAPI lambda function
  3. (9) SummonerAPI fetches the latest summoner data from Riot API
  4. (10) SummonerAPI persists the data fetched above into DynamoDB.
  5. The data is then sent back to the user

3. Summoners API

  1. (7) An end user makes an API request that is routed via API Gateway
  2. (11) API Gateway routes this request and invokes the SummonersAPI lambda function
  3. (12) SummonersAPI fetches expiring summoner names from DynamoDB.
  4. The data is then sent back to the user

Tech Stack

  • Written in Typescript using NodeJS
  • Orchestrated using Serverless Framework and deployed into AWS
  • Summoner data stored in DynamoDB
  • Requests served behind API Gateway
  • Serverless computing done via Lambda functions

Bugs and Feature Requests

All bugs and feature requests should be submitted by opening a Github issue. These can be opened to request a new feature, or to report a current feature that is unavailable.

Installation

Create an AWS account,
Configure Serverless Framework by running npm install -g serverless and then running serverless login

To test locally, take a look at Serverless Local Development.
To deploy to test, run serverless deploy.
To deploy to production, run serverless deploy --stage prod.
That's it! Keep an eye out for output - you will receive links to your API in the console. You can also check AWS API Gateway to get the URLs for your API. You will need this when setting the .env in the front-end.

The first deployment may take a few minutes since AWS has to configure all the resources. Subsequent deployments will be much quicker.

Take a look at the frontend for running and deploying the UI.

Disclaimers

NamesLoL is not affiliated with Riot Games.
This service is and will always be free.
NamesLoL does not own, sell, or trade any summoner names.
NamesLoL is in accordance with Riot Games ToS.

nameslol's People

Contributors

bricefrisco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nameslol's Issues

Public API

Would you be open to providing a public API? It would make it so much easier to keep track of accounts via Google Sheets and you also handle the caching if I'm not mistaken from a brief skim through the code.

OCE not searching

Oh no! An error occurred: '{"error":"Service unavailable"}'
Please try again. If the issue persists, please let us know here.

Name expiry time

Do you know if names expire at exactly hh:mm:ss.00 for example? Or do you know if the milliseconds come into play aswell?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.