https://github.com/mkornajcik/leaguele
Leaguele is a Wordle-like guessing game for League of Legends champions, based on Loldle.
https://github.com/mkornajcik/leaguele
docker ejs expressjs gitlab javascript nodejs redis tailwind typescript
Last synced: 3 months ago
JSON representation
Leaguele is a Wordle-like guessing game for League of Legends champions, based on Loldle.
- Host: GitHub
- URL: https://github.com/mkornajcik/leaguele
- Owner: mkornajcik
- Created: 2025-06-17T10:47:22.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-17T15:49:46.000Z (about 1 year ago)
- Last Synced: 2025-06-17T16:36:28.356Z (about 1 year ago)
- Topics: docker, ejs, expressjs, gitlab, javascript, nodejs, redis, tailwind, typescript
- Language: EJS
- Homepage: https://leaguele.up.railway.app/
- Size: 5.74 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leaguele
**Live Demo:** [https://leaguele.up.railway.app/](https://leaguele.up.railway.app/)
Leaguele is a Wordle-like guessing game for League of Legends champions, based on Loldle. It offers multiple modes (classic, quote, ability, emoji, splash) where players guess the champion based on varying clues each day.
---
## Table of Contents
- [Features](#features)
- [Demo / Screenshots](#demo--screenshots)
- [Tech Stack](#tech-stack)
- [Prerequisites](#prerequisites)
- [Running in Development](#running-in-development)
- [Building & Production](#building--production)
- [Testing](#testing)
- [CI/CD (GitLab)](#cicd-gitlab)
- [Security & Rate Limiting](#security--rate-limiting)
- [Disclaimer & Legal](#disclaimer--legal)
- [License](#license)
- [Acknowledgments](#acknowledgments)
---
## Features
- Five game modes:
- **Classic**: Guess the champion by comparing attributes and deducing the champion that fits all criteria.
- **Quote**: Guess the champion from a random in-game quote or voice line.
- **Ability**: Guess the champion based on an ability image.
- **Emoji**: Decode an emoji sequence representing the champion.
- **Splash**: Guess from a zoomed-in portion of the official splash art.
- Built with TypeScript, Express, EJS templates, Tailwind CSS.
- Session management with `express-session` and Redis (via `connect-redis` and `redis`).
- Daily champion assignment at midnight (Europe/Paris timezone) for each mode.
- Data stored in JSON files (included in the repo for free use).
- Tests for all endpoints using Jest and SuperTest.
- GitLab CI/CD pipeline: building Docker image, compiling TypeScript, building assets, running tests.
- Dockerized for easy local and production deployment.
- Rate limiting, input validation/sanitization, security headers via Helmet.
- Deployed on Railway with a linked Redis database.
---
## Demo / Screenshots
Show Game Mode Screenshots
### Home

### Classic

### Quote

### Ability


### Emoji

### Splash

---
## Tech Stack
- **Language & Runtime:** Node.js (TypeScript)
- **Web Framework:** Express
- **Templating:** EJS
- **Styling:** Tailwind CSS, PostCSS
- **Session & Storage:** express-session, redis, ioredis
- **Scheduling / Date Handling:** Luxon
- **Testing:** Jest, SuperTest
- **Utilities:** express-validator, helmet, express-rate-limit, dotenv
- **CI/CD:** GitLab CI with Docker-in-Docker
- **Deployment:** Docker, Railway
- **Data Fetching (scripts):** node-fetch, cheerio, puppeteer, shelljs
---
## Prerequisites
- **Node.js**: version >= 18 (adjust if different).
- **npm** (scripts assume npm).
- **Docker**: for local Redis instance (optional but recommended) and building the app image.
- **Redis**: Used for session storage. For local development, run Redis in Docker:
```bash
docker run -d --name leaguele-redis -p 6379:6379 redis
```
---
## Running in Development
- Start Redis locally (e.g., via Docker as above).
- Run the dev server with hot reload:
```bash
npm run dev
```
- CSS changes: in another terminal, watch Tailwind CSS:
```bash
npm run watch:css
```
- The server listens on `http://localhost:3000` (or your `PORT`).
---
## Building & Production
1. **Prebuild** (copy assets):
```bash
npm run prebuild
```
2. **Compile TypeScript**:
```bash
npm run build
```
3. **Build CSS**:
```bash
npm run build:css
```
4. **Start**:
```bash
npm start
```
Ensure `NODE_ENV=production`, environment variables set, and Redis is accessible.
---
## Testing
- **Run tests**:
```bash
npm run test
```
- For experimental VM modules in Jest:
```bash
npm run test:exp
```
- Tests may require a running Redis instance or mocks depending on setup.
---
## CI/CD (GitLab)
The project includes `.gitlab-ci.yml` with stages:
1. **build_docker**: Build Docker image and save artifact.
2. **build_typescript**: Install dependencies and compile TypeScript.
3. **build_assets**: Install dependencies and build Tailwind CSS assets.
4. **test**: Install dependencies and run Jest tests.
---
## Security & Rate Limiting
- **Helmet** secures HTTP headers.
- **express-rate-limit** prevents abuse; configured in middleware.
- **express-validator** for input validation/sanitization.
- **Sessions**: Stored in Redis; ensure `SESSION_SECRET` is strong and kept secret.
---
## Disclaimer & Legal
Leaguele is heavily inspired by Loldle.
Leaguele is a fan-made project that uses assets and data owned by Riot Games. This project is not endorsed, sponsored, or affiliated with Riot Games. Use of Riot assets and data is subject to Riot’s policies:
> “Leaguele was created under Riot Games’ ‘Legal Jibber Jabber’ policy using assets owned by Riot Games. Riot Games does not endorse or sponsor this project.”
---
## License
This project is open source under the MIT License.
---
## Acknowledgments
- **Riot Games** for providing Data Dragon and API (used in scripts).
- **Community Dragon CDN** for assets.
- Inspiration from Loldle.
- Open-source libraries and tools used throughout.
---