A modern, high-fidelity League of Legends player statistics dashboard built with SvelteKit and the Riot API. Track your ranked performance, analyze match history, and visualize your gameplay stats in real-time.
š Live Demo: my-riot-app-svelte.vercel.app
View your summoner profile with ranked tier, win rate, and recent top champions at a glance.
Deep dive into individual match performance with detailed game statistics and player metrics.
# Clone the repository
git clone https://github.com/Zetchu/my-riot-app-svelte.git
cd my-riot-app-svelte
# Install dependencies
npm install
# Create .env.local with your Riot API key
echo "RIOT_API_KEY=your_api_key_here" > .env.local
# Start development server
npm run dev
The app will be available at http://localhost:5173
npm run dev
Starts the development server with hot module reloading. Perfect for active development.
npm run build
Creates an optimized production build. Output goes to the build/ directory.
npm run preview
Preview the production build locally before deploying.
npm run test:unit
Run Vitest unit tests with watch mode. Use npm run test to run once without watch.
npm test
Run all unit tests once and exit.
npm run e2e
Run Playwright end-to-end tests. Tests are located in the tests/ directory.
npm run lint
Check code with ESLint and Prettier (no changes made).
npm run format
Auto-format all code with Prettier.
npm run format:check
Check formatting without making changes.
npm run check
Run SvelteKit sync and type-check with TypeScript.
npm run check:watch
Run type-checking in watch mode for real-time feedback.
npm run storybook
Start Storybook dev server on port 6006 for isolated component development and documentation.
npm run build-storybook
Build a static Storybook site for deployment.
src/
āāā lib/
ā āāā components/ # Reusable UI components
ā āāā stores/ # Svelte reactive state (summoner, match data)
ā āāā types.ts # TypeScript interfaces
ā āāā assets/ # Static assets
āāā routes/
ā āāā api/ # Server endpoints for Riot API calls
ā āāā dashboard/ # Main dashboard page
ā āāā player/ # Player lookup page
āāā stories/ # Storybook component stories
Create a .env.local file in the project root:
RIOT_API_KEY=your_riot_api_key_here
Navigate to the home page and search for a League of Legends summoner by name and tag (e.g., "PlayerName#NA1").
Once synced, you'll see:
Click "Match History" to view recent matches. Matches are paginated with a "Load More" button.
Click on any match to see detailed statistics including:
The app is automatically deployed to Vercel on every push to the main branch.
npm run build
npm run preview
Contributions are welcome! Please follow the existing code style and run linting/formatting before submitting PRs:
npm run lint
npm run format
npm run test
This project is open source and available under the MIT License.
*Made with ā¤ļø by a David