This app lets you enter a Riot ID (gameName#tagLine), fetches match history from Riot's API, and caches the result in Firebase Firestore.
- Backend: Node.js + Express
- Frontend: Static HTML/CSS/JS
- Cache: Firebase Firestore (via Firebase Admin SDK)
- Use the project Node version (with
nvm):
nvm use- Install dependencies:
npm install- Copy environment template:
cp .env.example .env- Fill
.envwith:
RIOT_API_KEY: your Riot developer API keyFIREBASE_SERVICE_ACCOUNT_KEY: Firebase service account JSON (single-line JSON or base64-encoded JSON)FIREBASE_PROJECT_ID: your Firebase project ID
- Run:
npm run dev- Open:
http://localhost:3000
GET /api/match-history?username=<gameName#tagLine>®ion=americas&count=10
usernameis required in Riot ID format.regiondefaults toamericas(europe,asia,seaalso valid for regional routing).countis clamped to 1-20.
Response includes:
source:riot-apiorfirebase-cachematches: array of match detail payloads- account and metadata fields
- Data is stored in Firestore collection:
matchHistory - Documents are keyed by normalized
region + riot id - Cached entries are reused until
CACHE_TTL_MSexpires