Rewind Coach

Your AI-powered League of Legends performance coach — built with AWS and Riot Games API


Inspiration

League of Legends is one of the most complex and competitive games ever made — with thousands of interactions per match and an overwhelming learning curve. Players must constantly track information such as champions, abilities, items, gold leads, objectives, and jungle pathing.

Most players lose without fully understanding why.

Traditional replay tools only show what happened. Rewind Coach explains why it happened.

We set out to build a tool that doesn’t just replay your games, but truly teaches, interprets, and guides you like a real coach.
Rewind Coach rewinds your matches across the season, analyzes your decisions minute by minute, and helps you turn every mistake into mastery.


What It Does

Rewind Coach connects directly to the Riot Games API to fetch match history, ranked data, and timeline events.
It then uses an AI coaching engine to transform this raw telemetry into structured insights, improvement plans, and narrative summaries.

Your AI coach can:

  • Explain key events such as kills, deaths, objectives, and rotations
  • Analyze how specific decisions influenced match outcomes
  • Identify patterns in item builds, gold spikes, and objective control
  • Evaluate positioning, tempo, and map awareness
  • Summarize match flow to highlight defining moments and learning points

All insights are displayed in an interactive web application that allows players to:

  • Review detailed match breakdowns and compare across games
  • Track champion performance, role consistency, and adaptability
  • Chat directly with their AI coach for personalized advice
  • Explore an interactive minute-by-minute timeline showing item spikes, gold difference, and objective events

Core Sections

Rewind Coach is divided into three main sections, each focusing on a different scale of performance analysis:

  • Chronicle – Season Rewind
    A full recap of your season that visualizes progress, playstyle evolution, and records.
    It highlights your top champions, defining matches, total objectives, best performances, and areas of improvement.
    Chronicle transforms a season’s worth of statistics into a personalized visual story of growth and milestones.

  • Recent Match Analysis
    Reviews the last 20 matches to detect consistent trends and behavioral patterns.
    It compares win rates, KDA, gold efficiency, and objective control across multiple champions and roles to build a complete performance profile over time.

  • Match Review
    Provides granular, minute-by-minute match analysis.
    It details early-game pathing, teamfights, item power spikes, gold swings, and tactical choices.
    Every critical event is paired with AI reasoning explaining how each moment shaped the outcome.


How We Built It

Frontend

  • Built with Next.js for fast rendering and dynamic routing
  • Styled with TailwindCSS for responsive, modern UI components
  • Deployed using AWS Amplify Hosting for automated CI/CD from GitHub
  • Delivered through Amazon CloudFront for global content distribution and caching
  • Integrated with API Gateway endpoints for secure communication with Lambda backend

The user interface is designed for clarity and usability — presenting stats, charts, and insights in a way that makes complex performance data intuitive to read.

Backend (Serverless Architecture)

The backend is fully serverless, implemented with AWS Lambda and Amazon API Gateway, and divided into multiple independent functions for reliability and modularity.

Function Description
Match Summary Retrieves and aggregates Riot API match and timeline data
Chat Coach Interacts with Amazon Bedrock to generate coaching dialogue and match explanations
Request Handler Manages API routing, DynamoDB caching, and client responses
Stats Worker Processes season-level analysis asynchronously through SQS

This architecture scales automatically, minimizes idle cost, and isolates workloads for performance and fault tolerance.


AI & Knowledge Layer

At the core of Rewind Coach lies a multi-agent AI reasoning system powered by Amazon Bedrock (Claude Sonnet 3.5), Amazon OpenSearch, and a custom-curated knowledge base stored in S3.

Component Role
Amazon Bedrock (Claude Sonnet 3.5) Generates coaching insights, match explanations, and season summaries
Amazon OpenSearch (RAG) Retrieves champion, meta, and macro data to ground the AI’s reasoning
S3 Knowledge Base Stores champion data, patch notes, and tactical documents used for retrieval
Dynamo DB Stores Specific Match, profile, for every user. and providing it to the LLM as reference
Prompt Schema Converts structured telemetry (kills, gold, items, etc.) into contextualized coaching prompts

This layered approach allows Rewind Coach to combine factual match data with expert reasoning — producing grounded, human-like analysis and improvement feedback.


Data Storage & Caching

Data is optimized for both speed and cost efficiency:

  • Amazon DynamoDB serves as the main cache for player profiles, match summaries, and season stats
  • Amazon S3 stores large replay data, timeline archives, and AI-generated summaries
  • TTL policies automatically expire outdated records to maintain cost efficiency
  • Conditional writes ensure data consistency across multiple Lambda functions
  • SQS Queues handle asynchronous workloads such as full-season calculations

This design ensures instant access to recent matches and smooth scalability under heavy usage.


Observability & Security

  • Amazon CloudWatch monitors all Lambda executions, API latency, and error rates
  • AWS IAM enforces strict permissions between components and roles
  • AWS Secrets Manager secures Riot API keys and Bedrock credentials
  • Structured logging provides full traceability for debugging and analytics
  • Error handling flows manage retries, rate limits, and DynamoDB write conflicts

The system maintains a secure and observable environment, capable of scaling globally with minimal operational overhead.


Challenges

  • Designing an AI experience that behaves like a coach rather than a chatbot
  • Managing Riot API rate limits while fetching multiple match timelines concurrently
  • Structuring raw JSON telemetry into clean, interpretable summaries for AI reasoning
  • Controlling Bedrock token cost while retaining analytical depth and precision
  • Ensuring cache freshness without redundant computations
  • Coordinating async SQS processing and Lambda concurrency
  • Building clear and visually appealing data visualizations for complex metrics

Achievements

  • Built an end-to-end serverless AI pipeline integrating AWS Bedrock and Riot API
  • Implemented real-time match visualization synchronized with AI analysis
  • Developed a structured prompting system for game analytics and reasoning
  • Created a retrieval-augmented knowledge layer with OpenSearch
  • Optimized DynamoDB caching and S3 storage for cost-efficient scalability
  • Designed intuitive UI sections for Chronicle, Match Review, and 20 Match Analysis
  • Established a modular architecture ready for future expansion and real-time capabilities

What We Learned

  • How to engineer large-scale retrieval-augmented reasoning (RAG) systems using Bedrock and OpenSearch
  • Best practices for handling asynchronous Lambda workflows with SQS and DynamoDB
  • Advanced prompt engineering for domain-specific analytics in competitive gaming
  • Techniques for converting raw telemetry into human-readable insights
  • How structured reasoning improves AI reliability and reduces hallucination
  • Balancing technical precision with visual clarity and player engagement

What’s Next

  • Introduce real-time voice coaching and live match commentary
  • Expand to team-level analytics for coordinated play and macro strategy
  • Support multi-season tracking with visualized player progress timelines
  • Integrate community and shareable dashboards for competition and growth tracking
  • Offer freemium AI coaching tiers powered by AWS for broader accessibility

Tech Stack

Category Tools & Services
Frontend Next.js · TailwindCSS · AWS Amplify · CloudFront
Backend AWS Lambda · API Gateway · DynamoDB · S3 · SQS
AI / ML Amazon Bedrock (Claude Sonnet 3.5) · Amazon OpenSearch · Custom Knowledge Base
DevOps Amplify CI/CD · CloudWatch · IAM · Secrets Manager
APIs Riot Games API (Match, Timeline, Summoner, Ranked Endpoints)

Developed By: Mohamed Moghazy and Yasser Salem

Built With

Share this project:

Updates