Skip to content

Repository files navigation

LoL Match History Web App

This app lets you enter a Riot ID (gameName#tagLine), fetches match history from Riot's API, and caches the result in Firebase Firestore.

Stack

  • Backend: Node.js + Express
  • Frontend: Static HTML/CSS/JS
  • Cache: Firebase Firestore (via Firebase Admin SDK)

Setup

  1. Use the project Node version (with nvm):
nvm use
  1. Install dependencies:
npm install
  1. Copy environment template:
cp .env.example .env
  1. Fill .env with:
  • RIOT_API_KEY: your Riot developer API key
  • FIREBASE_SERVICE_ACCOUNT_KEY: Firebase service account JSON (single-line JSON or base64-encoded JSON)
  • FIREBASE_PROJECT_ID: your Firebase project ID
  1. Run:
npm run dev
  1. Open:

http://localhost:3000

API

GET /api/match-history?username=<gameName#tagLine>&region=americas&count=10

  • username is required in Riot ID format.
  • region defaults to americas (europe, asia, sea also valid for regional routing).
  • count is clamped to 1-20.

Response includes:

  • source: riot-api or firebase-cache
  • matches: array of match detail payloads
  • account and metadata fields

Cache behavior

  • Data is stored in Firestore collection: matchHistory
  • Documents are keyed by normalized region + riot id
  • Cached entries are reused until CACHE_TTL_MS expires

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages