The Problem
In competitive esports, preparation is everything. Professional teams spend hours analyzing opponents through VOD reviews, manually tracking statistics, and compiling notes from scattered data sources. What if we could automate this entire process using real competitive data?
That's exactly what I set out to build for the Sky's the Limit - Cloud9 x JetBrains Hackathon.
What is OpponentIQ?
OpponentIQ is an AI-powered scouting report generator that automatically analyzes any League of Legends or VALORANT team using official match data from GRID API. In seconds, coaches and players get a comprehensive breakdown including:
- Team strategies: Win rates, composition patterns, and macro tendencies
- Player analysis: Individual stats, champion/agent pools, and KDA metrics
- Actionable insights: Data-driven recommendations like "Neutralize [Player] - target bans recommended"
- Export capabilities: Professional PDF reports and JSON data
Technical Architecture
Backend: Python + FastAPI
I chose FastAPI for its speed and automatic API documentation. The backend handles three main responsibilities:
- GRID API Integration - Fetching real match data via GraphQL
- Data Processing - Analyzing patterns and calculating statistics
- Report Generation - Transforming raw data into actionable insights
The GRID API Challenge
GRID's esports data is incredibly comprehensive but split across two endpoints:
- Central Data API: Team metadata and series IDs
- Series State API: Detailed game statistics
I implemented a two-stage retrieval system that fetches series information first, then queries detailed stats for each match. This required careful GraphQL query optimization to keep response times under 5 seconds even when analyzing 10+ matches.
# Simplified example of the two-stage approach
def fetch_team_matches(team_name, num_matches):
# Stage 1: Get series IDs from Central Data
series_ids = central_data_query(team_name, num_matches)
# Stage 2: Get detailed stats from Series State
matches_data = []
for series_id in series_ids:
match_data = series_state_query(series_id)
matches_data.append(match_data)
return matches_data
Data Analysis Engine
The scouting_analyzer.py module processes match data to generate insights:
For League of Legends:
- Infers player roles (not provided by API)
- Identifies champion pools and ban priorities
- Calculates KDA ratios and performance trends
- Detects team composition patterns
For VALORANT:
- Tracks agent selections and map preferences
- Calculates Average Combat Score (ACS)
- Analyzes headshot percentages
- Identifies team composition meta
Frontend: Clean and Responsive
I built the UI with HTML5, Bootstrap 5, and vanilla JavaScript. Key features:
- Galaxy-themed animation: A stunning opening curtain reveal
- Interactive charts: Chart.js visualizations for performance trends
- Real-time loading: Progress indicators with status updates
- Export functionality: PDF generation using jsPDF
Development Experience with PyCharm
Using JetBrains PyCharm throughout this project was a game-changer:
- Intelligent code completion saved hours during FastAPI development
- Integrated debugging helped solve the role inference logic quickly
- GraphQL query formatting made API integration cleaner
- Git integration streamlined version control
Key Challenges
1. Data Transparency
When GRID API doesn't provide certain data (like specific VALORANT map names in some responses), I had a choice: fabricate placeholder data or be transparent.
I chose transparency. OpponentIQ displays "Unknown" when data isn't available, maintaining credibility over aesthetics.
2. Role Inference for League of Legends
Player roles aren't explicitly provided by GRID's LoL API. I implemented logic to infer roles based on:
- Champion selections (e.g., Jarvan IV → likely Jungle)
- Game positions and farm patterns
- Historical role patterns
3. Generating Actionable Insights
Raw statistics are useful, but coaches need actionable strategies. I built algorithms that:
- Identify star players (high KDA) and recommend target bans
- Detect weak performers and suggest lane exploitation
- Analyze team form and recommend aggression levels
- Parse ban priorities to suggest counter-picks
Example insight generated:
"Neutralize Keria"Keria (Support) has 4.64 KDA - target bans on Milio recommended
Results
OpponentIQ successfully generates professional scouting reports with:
- ✅ 100% live GRID API integration (zero mock data)
- ✅ Multi-game support (League of Legends + VALORANT)
- ✅ PDF export for team meetings
- ✅ Historical tracking for opponent evolution
- ✅ Sub-5-second response times for 10-match analysis
What I Learned
- GraphQL optimization is critical for performance with nested queries
- Data transparency builds more trust than fake placeholders
- User experience matters - loading animations and progress bars make waiting feel shorter
- Production-ready means handling edge cases gracefully
Try It Yourself
The project is fully open source:
GitHub: https://github.com/DhaniDzulkarnain1/Cloud9-Hackathon
Demo Video: https://youtu.be/QvMQ0h0xhCM
Quick Start:
# Clone the repository
git clone https://github.com/DhaniDzulkarnain1/Cloud9-Hackathon.git
# Install dependencies
pip install -r requirements.txt
# Run the backend
cd backend
python3 main.py
# Open frontend/index.html in your browser
What's Next?
I'm planning to expand OpponentIQ with:
- More games: CS:GO, Dota 2, Rocket League
- Win prediction: Machine learning models for match outcomes
- Team comparison: Side-by-side opponent analysis
- Live integration: Real-time scouting during tournaments
Final Thoughts
Building OpponentIQ taught me that the best tools solve real problems. Esports teams need efficient opponent analysis, and by leveraging GRID's official data API, I created something that could genuinely help coaches and players prepare for matches.
If you're interested in esports analytics, data visualization, or just want to see how to integrate the GRID API into your projects, check out the code on GitHub!
Built for: Sky's the Limit - Cloud9 x JetBrains Hackathon 2025
Category: Category 2 - GRID API Integration
Tech Stack: Python, FastAPI, GRID API, Bootstrap 5, Chart.js, JetBrains PyCharm
Top comments (0)