LOL-DNA is a full-stack League of Legends stats application built with Spring Boot, Spring Data JPA, H2 Database, and a separate frontend workspace.
It fetches player and match-related data through the Riot API and exposes it through REST endpoints.
- Look up a player by game name and tag line
- Fetch and return a player overview
- Store match-related data in a local H2 database
- Expose backend data through REST APIs
- CORS enabled for frontend integration
- Java
- Spring Boot
- Spring Web / Spring MVC
- Spring Data JPA
- H2 Database
- Lombok
- Maven
- Separate frontend folder available in the project (
Front End) - Project also includes Node/NPM setup
LOL-DNA/
├── data/
│ └── ... # project data files
├── Front End/
│ ├── package.json # frontend-related npm config
│ └── vue-project/
│ ├── public/
│ │ └── favicon.ico
│ ├── src/
│ │ ├── assets/ # static frontend assets
│ │ ├── components/ # Vue components
│ │ ├── App.vue # root Vue component
│ │ └── main.js # frontend entry point
│ ├── index.html # Vite HTML entry
│ ├── package.json # Vue app dependencies
│ └── vite.config.js # Vite configuration
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/example/loldna/ # backend Java source code
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── application.yml
│ │ └── templates/
│ │ └── ServiceImpl.java.ft
│ └── test/
│ └── java/
│ └── com/example/loldna/ # backend test source code
├── .gitignore
├── mvnw
├── mvnw.cmd
├── package.json
├── package-lock.json
├── pom.xml
└── README.md
The application expects a Riot API key through environment variables or a local config file.
The Riot API key is read like this:
riot:
api:
key: ${RIOT_API_KEY:}Set an environment variable named:
RIOT_API_KEY
Create a local file:
src/main/resources/application-local.yml
Example:
riot:
api:
key: YOUR_RIOT_API_KEY
application-local.ymlis intended for local overrides and should not be committed.
The project uses an H2 file database stored at:
./data/mydb
Configured in application.properties:
spring.datasource.url=jdbc:h2:file:./data/mydb spring.jpa.hibernate.ddl-auto=updateOn Windows:
mvnw.cmd spring-boot:runOn macOS/Linux:
./mvnw spring-boot:run mvnw.cmd clean installThen run the jar from target/.
GET /api/players/{gameName}/{tagLine}Example:
GET /api/players/Schneckify/Lost- The backend allows requests from any origin via
@CrossOrigin(origins = "*") - Logging is enabled for Spring Web and the application package
- Match and player data are managed through service and repository layers
Make sure you have:
- Java 21+
- Maven or use the included Maven Wrapper
- Node.js + npm if you want to work on the frontend
- A valid Riot API key
- Add authentication / rate-limit handling for Riot API requests
- Improve error responses for invalid player lookups
- Add frontend setup instructions
- Add tests for services and controllers
- Add Swagger / OpenAPI documentation
This project is for educational / personal development purposes only.