Skip to content

Deepesh70/Riot_web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

67 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Riot ReImagined

Riot ReImagined Banner License

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.


πŸ“‘ Table of Contents


✨ Features

🎨 Frontend Experience

  • 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.

πŸ” Backend & Security

  • 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.

πŸ›  Tech Stack

Frontend (/front)

  • 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)

Backend (/backend)

  • Runtime: Node.js
  • Framework: Express.js v5 (Beta)
  • Database: MongoDB with Mongoose
  • Authentication: jsonwebtoken (JWT), bcryptjs
  • Security: cors, dotenv
  • Dev Tools: nodemon

πŸ“‚ Project Structure

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

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js (v16.14.0 or higher)
  • npm (Node Package Manager)
  • MongoDB (Local instance or MongoDB Atlas URI)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/riot-reimagined.git
    cd Riot_ReImagined
  2. Install Backend Dependencies:

    cd backend
    npm install
  3. Install Frontend Dependencies: Open a new terminal window:

    cd front
    npm install

Environment Variables

You must configure environment variables for the backend to function correctly.

  1. Create a .env file in the backend/ directory.

  2. 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.


πŸ–₯️ Running the Application

1. Start the Backend Server

From the backend/ directory:

# Production mode
npm start

# Development mode (with auto-reload)
npm run dev

The server will start on http://localhost:5000.

2. Start the Frontend Client

From the front/ directory:

cd front
npm run dev

The application will launch at http://localhost:5173.


πŸ“‘ API Documentation

Base URL: http://localhost:5000

Authentication

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>

Riot Games Data

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)

🌐 Frontend Pages

  • / (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.

πŸ“¦ Deployment

The project is configured for deployment on Vercel.

  1. Frontend: Connect your GitHub repo to Vercel and set the Root Directory to front.
    • Build Command: vite build
    • Output Directory: dist
  2. Backend: Deploy as a separate project or serverless functions.
    • Ensure all Environment Variables from your .env are added to the Vercel project settings.

🀝 Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the ISC License.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors