Inspiration

As League of Legends players, we've all wondered: "Am I actually getting better?" or "What's my real playstyle?" While sites like op.gg show stats, they don't tell the full story. We wanted to create something more meaningful - a personalized year-end experience that helps players reflect, learn, and celebrate their journey. Using AWS Generative AI to transform raw match history into narratives, insights, and discoveries that players would actually want to share with friends. The Rift Rewind Hackathon gave us the perfect opportunity to explore what's possible when you combine League's rich data with AWS Bedrock's powerful foundation models.

What it does

Summoner Rewind analyzes your League of Legends match history and generates a comprehensive year-end recap featuring:

  • Deep Analytics: Ranked progression tracking, challenge achievements with percentiles, champion mastery analysis, and detailed timeline breakdowns showing your laning phase performance, CS efficiency, and objective control patterns
  • AI-Powered Narratives: Personalized insights about your playstyle, strengths, and growth areas using AWS Bedrock's foundation models
  • Roast Master 3000: Hilarious AI-generated roasts based on your gameplay patterns - because sometimes you need to laugh at your bronze plays
  • Hidden Gem Detector: Discovers surprising patterns like "You're unstoppable on Tuesday nights!" or "You have a 75% win rate when getting first blood"
  • Shareable Cards: Beautiful, social-media-ready summaries of your year with custom graphics and stats
  • Friend Comparisons: Analyze duo synergy and see how your playstyles complement each other
  • Personality Profiles: Discover your unique League personality type (Are you "The Comeback King" or "The Tilt Master"?)

How we built it

Backend Architecture (FastAPI + Python)

  • Integrated 11+ Riot Games API endpoints including match-v5, league-v4, champion-mastery-v4, challenges-v1, match timelines, Clash tournaments, and champion rotations
  • Implemented AWS Bedrock integration with a multi-model strategy using Claude 3 Haiku, Amazon Nova Lite, and Amazon Nova Micro
  • Built intelligent model selector that routes tasks to the most cost-effective model while maintaining quality
  • Optimized performance with parallel API execution using asyncio.gather() to handle 15+ simultaneous requests
  • Created custom analyzers for ranked stats, timeline data, challenges, mastery, and pattern detection

Frontend (React + Vite + TailwindCSS)

  • Designed modern, responsive UI with smooth animations and progressive loading states
  • Implemented real-time data visualization using Chart.js for KDA trends, win rate progression, and performance metrics
  • Built social sharing system using html-to-image to generate PNG cards
  • Created interactive components for AI insights, roasts, hidden gems, and personality profiles

AWS Services

  • Amazon Bedrock: Multi-model AI strategy for generating narratives, roasts, and insights
    • Claude 3 Haiku: Complex analysis, personality profiles, and creative content
    • Amazon Nova Lite: Standard insights, comparisons, and balanced tasks
    • Amazon Nova Micro: Quick summaries, simple tasks, cost optimization
  • Cost Tracking: Built-in monitoring to track token usage and estimated costs per model

Key Technical Implementations

  • Pattern detector algorithm that analyzes time-of-day performance, win streaks, champion pool diversity, comeback potential, and role consistency
  • Flexible data parsing to handle both legacy summoner names and new Riot ID format (GameName#TAG)
  • Batch processing for match fetching (10 matches per batch) to respect rate limits
  • Error handling with graceful degradation - if one API fails, others continue

Challenges we ran into

Timeout Hell (60+ seconds): Our initial implementation fetched 50 matches sequentially, causing massive timeouts. Solution: Reduced to 15 matches by default, implemented parallel batch fetching, and used asyncio.gather() with return_exceptions=True for resilience. This cut response time by 70%.

API Response Chaos: Riot's API returns different structures for old vs. new accounts - some have name, others have gameName/tagLine. Some endpoints use summonerId, others require puuid. We had to build flexible parsing that handles all variations gracefully.

Dictionary Comparison Nightmare: Discovered that Riot's categoryPoints structure is inconsistent - sometimes values are dicts, sometimes plain numbers. This caused '>' not supported between instances of 'dict' and 'dict' errors. Fixed with type checking and intelligent value extraction.

Missing Summoner ID: Newer accounts don't return id field in summoner data, only puuid. Had to refactor all API calls to use PUUID-based endpoints instead of summoner ID endpoints.

Cost Optimization Challenge: Using Claude 3 Haiku for everything was expensive (~$0.10 per player analysis). Built a ModelSelector that intelligently routes tasks to cheaper models, saving ~80% on costs while maintaining quality.

Pattern Detection Accuracy: Simple statistics miss nuanced insights. Had to build multi-dimensional analysis considering time patterns, matchup-specific performance, objective priorities, and comeback potential to find genuinely interesting patterns.

Rate Limiting: Riot API has strict rate limits. Implemented exponential backoff, batch processing, and small delays between batches to stay within limits while maximizing speed.

Accomplishments that we're proud of

End-to-End Integration: Successfully built a complete pipeline from Riot API → AWS Bedrock → Beautiful UI that actually works with real data

Performance Optimization: Reduced API response time from 60+ seconds to 15-20 seconds through parallel execution and smart batching

Cost-Efficient AI: Multi-model strategy saves ~80% on inference costs while maintaining high-quality insights - Claude for creativity, Nova Micro for speed

Real, Actionable Insights: Our pattern detector finds genuinely surprising discoveries like "You win 70% more games between 8-10 PM" or "You're clutch in comebacks"

Production-Ready: Built with error handling, graceful degradation, and resilience - if one API fails, the rest of the experience still works

Shareable Content: Generated cards and insights are polished enough that players would actually share them on social media

Comprehensive Analytics: Integrated 11+ Riot API endpoints for the deepest possible insights - ranked stats, challenges, timelines, Clash history, mastery scores, and more

What we learned

AWS Bedrock Mastery: Each foundation model has sweet spots - Claude 3 Haiku excels at creative, nuanced content; Amazon Nova Lite balances quality and cost; Amazon Nova Micro is perfect for 70% of tasks at 1/10th the price. Prompt engineering is an art - structured prompts with clear context produce dramatically better results.

Riot API Complexity: Understanding the difference between platform regions (na1, euw1) and routing regions (americas, europe, asia) was crucial. Match timeline data provides incredible depth but requires careful parsing. The new Riot ID system (GameName#TAG) is the future, but legacy support is still needed.

Performance at Scale: Parallel execution isn't just about speed - it's about resilience. Using return_exceptions=True means one failed API call doesn't kill the entire request. Batching API calls respects rate limits while maximizing throughput.

Cost vs. Quality Trade-offs: Not every task needs the most expensive model. Quick summaries work great with Nova Micro. Complex personality analysis needs Claude's sophistication. Tracking usage per task type reveals optimization opportunities.

Pattern Recognition: Simple averages miss the story. Analyzing time-of-day performance, champion-specific success rates, and objective priorities reveals insights players didn't know about themselves.

User Experience: Progressive loading states, graceful error handling, and instant feedback matter. Players don't want to wait 60 seconds - 15-20 seconds with clear progress indicators feels fast.

What's next for Summoner Rewind

Historical Comparisons: Compare this season vs. last season - "Your KDA improved by 0.8!" or "You climbed 3 divisions this year"

Voice-Powered Insights: Use Amazon Polly to generate audio summaries - listen to your year-end recap while in queue

Team Analysis: Full 5v5 team composition insights, synergy analysis, and strategic recommendations

Live Game Features: Real-time win probability predictions during matches, champion recommendations based on team comp, and live performance tracking

Mobile Apps: Native iOS/Android apps for on-the-go access to your stats and insights

Deeper Pattern Recognition: Machine learning models to predict your best champions, optimal play times, and personalized improvement recommendations

Social Features: Leaderboards, friend challenges, and community insights - "You're in the top 5% of comeback players globally"

Multi-Season Tracking: Long-term trend analysis across multiple years to show true growth trajectory

Streaming Integration: OBS overlays and Twitch extensions for streamers to showcase their year-end stats

Built With

Share this project:

Updates