Riot ReImagined is a cutting-edge, full-stack web application that serves as a modern, reimagined landing and community hub for the Riot Games universe. It combines a visually stunning, high-performance frontend with a robust backend API to deliver an immersive experience for gamers.
The project features a sleek UI with advanced animations powered by GSAP, comprehensive game information (Valorant, League of Legends), esports updates, and a personalized user profile system integrating directly with Riot Games APIs.
- Features
- Tech Stack
- Project Structure
- Getting Started
- API Documentation
- Frontend Pages
- Deployment
- Contributing
- License
- Immersive UI/UX: Built with React 19 and Tailwind CSS for a responsive, modern design.
- Advanced Animations: Utilizes GSAP (GreenSock Animation Platform) for scroll-triggered animations, seamless transitions, and interactive elements.
- Dynamic Routing: Client-side routing with React Router v7 for smooth navigation between pages.
- Rich Media: Integration of high-quality videos, audio, and imagery to capture the essence of Riot Games.
- Player Stats: Real-time lookup of player statistics for Valorant and League of Legends which are fetched using Riot and HenrikDev APIs.
- Secure Authentication: User registration and login protected by JWT (JSON Web Tokens) and bcrypt password hashing.
- RESTful API: A scalable Express.js API handling user data and external API requests.
- Database Integration: MongoDB (via Mongoose) for persistent user storage.
- External API Integration:
- Riot Games API: For fetching League of Legends match history and account data.
- HenrikDev Valorant API: For retrieving Valorant MMR and match history.
- Framework: React 19 via Vite
- Styling: Tailwind CSS v3, PostCSS
- Animations: GSAP v3 (@gsap/react)
- Routing: React Router DOM v6/v7
- Icons: React Icons
- Utilities: clsx (class name utility)
- Runtime: Node.js
- Framework: Express.js v5 (Beta)
- Database: MongoDB with Mongoose
- Authentication:
jsonwebtoken(JWT),bcryptjs - Security:
cors,dotenv - Dev Tools:
nodemon
Riot_ReImagined/
βββ backend/ # Express.js API Server
β βββ Middleware/ # Custom middleware
β β βββ authMiddleware.js # JWT verification middleware
β βββ Models/ # Mongoose Data Models
β β βββ user.js # User schema (name, email, password, riot IDs)
β βββ Routes/ # API Route Handlers
β β βββ user.js # Auth & Riot API routes
β βββ index.js # Server entry point & config
β βββ package.json # Backend dependencies
β βββ vercel.json # Backend deployment config
β
βββ front/ # React Frontend Application
β βββ public/ # Static Assets
β β βββ audio/ # Sound effects & background music
β β βββ fonts/ # Custom typefaces (Zentry, etc.)
β β βββ img/ # Images & sprites
β β βββ videos/ # Hero & background videos
β βββ src/ # Source Code
β β βββ components/ # Reusable UI Components & Pages
β β β βββ Hero.jsx # Main landing hero section
β β β βββ Navbar.jsx # Navigation bar
β β β βββ About.jsx # About section
β β β βββ Games.jsx # Games hub
β β β βββ Login.jsx # Auth forms
β β β βββ ... # Many more feature components
β β βββ App.jsx # Main App component & Routing
β β βββ main.jsx # React entry point
β β βββ index.css # Global styles & Tailwind directives
β βββ package.json # Frontend dependencies
β βββ vite.config.cjs # Vite configuration
β βββ tailwind.config.cjs # Tailwind configuration
β
βββ README.md # Project Documentation
Ensure you have the following installed:
- Node.js (v16.14.0 or higher)
- npm (Node Package Manager)
- MongoDB (Local instance or MongoDB Atlas URI)
-
Clone the repository:
git clone https://github.com/yourusername/riot-reimagined.git cd Riot_ReImagined -
Install Backend Dependencies:
cd backend npm install -
Install Frontend Dependencies: Open a new terminal window:
cd front npm install
You must configure environment variables for the backend to function correctly.
-
Create a
.envfile in thebackend/directory. -
Add the following keys:
# Server Configuration PORT=5000 ALLOWED_ORIGINS=http://localhost:5173 # Database MONGO_URI=mongodb+srv://<your_user>:<your_password>@cluster.mongodb.net/riot_db?retryWrites=true&w=majority # Security JWT_SECRET=your_super_secret_jwt_key_here # External APIs (Required for Player Stats) RIOT_API_KEY=your_riot_games_api_key HENRIK_DEV_API_KEY=your_henrikdev_valorant_api_key
Note: Get your Riot API key from the Riot Developer Portal and HenrikDev key from Unofficial Valorant API.
From the backend/ directory:
# Production mode
npm start
# Development mode (with auto-reload)
npm run devThe server will start on http://localhost:5000.
From the front/ directory:
cd front
npm run devThe application will launch at http://localhost:5173.
Base URL: http://localhost:5000
| Method | Endpoint | Description | Body |
|---|---|---|---|
POST |
/signup |
Register a new user | { email, password, name, riotGameName?, riotTagLine? } |
POST |
/login |
Authenticate user & get token | { email, password } |
GET |
/profile |
Get current user info (Protected) | Headers: Authorization: Bearer <token> |
| Method | Endpoint | Description | Params |
|---|---|---|---|
GET |
/riot/account/:gameName/:tagLine |
Fetch Riot Account PUUID & Region | gameName, tagLine |
GET |
/riot/matches/lol/:puuid |
Get last 5 LoL matches | puuid |
GET |
/riot/matches/val/:name/:tag |
Get Valorant MMR History | name, tag (Riot ID) |
/(Home): The main landing page featuring the Hero section, animated story elements, and feature highlights./esport: Dedicated page for esports news and updates./games: A hub showcasing Riot's game portfolio./games/valorant/agents/:id: Detailed view of a specific Valorant agent./games/valorant/maps/:id: Interactive map details.
/login&/signup: User authentication pages./profile: User dashboard displaying saved preferences and linked Riot accounts./player/:game/:gameName/:tagLine: A dynamic stats page that fetches and displays live data for a specific player./news: Latest updates and articles./about: Information about the "Riot ReImagined" project vision.
The project is configured for deployment on Vercel.
- Frontend: Connect your GitHub repo to Vercel and set the Root Directory to
front.- Build Command:
vite build - Output Directory:
dist
- Build Command:
- Backend: Deploy as a separate project or serverless functions.
- Ensure all Environment Variables from your
.envare added to the Vercel project settings.
- Ensure all Environment Variables from your
Contributions are welcome! Please fork the repository and create a pull request with your changes. Ensure that you adhere to the existing code style and linting rules.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.