Rift Rewind

What it does

Rift Rewind transforms League of Legends match data into personalized, narrative-driven year-end recaps using generative AI on AWS. Instead of just showing stats, we tell players WHO they are through AI-generated "Champion Personalities," conversational insights via Poro (our AI assistant), and shareable social cards.

Inspiration

League players generate thousands of data points every season but have no meaningful way to reflect on their journey. Existing tools like op.gg show raw stats without context or storytelling. We wanted to create something players would actually want to share with friends — like Spotify Wrapped, but for League of Legends.

How I built it

Architecture

  • Next.js 14 with serverless API routes (deployed as AWS Lambda via Vercel)
  • AWS Bedrock (Claude 3.5 Haiku) for AI insight generation
  • Riot Games API for real-time match data
  • Stateless design - no database, fully on-demand

Data Pipeline

  1. Fetch player profile + match history from Riot API using parallel requests
  2. Aggregate statistics (win rate, KDA, champion pool, role distribution)
  3. Send to AWS Bedrock with engineered prompts
  4. Generate personalized narrative insights
  5. Display with interactive Poro assistant for follow-up questions

Key Technical Decisions

  • Haiku over Sonnet: 10x cost reduction (~$0.0004 per insight) while maintaining quality
  • Dual-mode system: Instant demo accounts for judging + live mode for any player
  • Parallel fetching: p-limit library to handle Riot API rate limits efficiently
  • CDN assets: Champion icons from CommunityDragon to avoid bundling 160+ images

Challenges I ran into

  1. Rate Limiting Riot API enforces 100 requests/2 minutes. Solved with parallel batching and concurrency control using p-limit.

  2. Serverless Cold Starts Lambda functions timing out (10s Vercel limit). Optimized prompts from 1000 to 500 tokens, added retry logic, reduced inference time by 60%.

  3. Cost Management AWS Bedrock can get expensive. Switched from Sonnet to Haiku model, implemented demo account caching, kept total costs under $5.

  4. Data Completeness Not all players have mastery data. Built fallback computation from match history when API endpoints fail.

Accomplishments that we're proud of

  • AI generates unique "Champion Personalities" for each player
  • Achieved sub-2s insight generation latency
  • Delivered fully functional app with no database
  • Managed to stay under AWS Free Tier costs

Code Example

// Example: Fetching and aggregating match data
const fetchMatches = async (summonerId) => {
  const matchIds = await getMatchIds(summonerId);
  const matches = await pLimit(5, () => matchIds.map(fetchMatchDetails));
  return aggregateStats(matches);
};

LaTeX Example

Inline math: ( KDA = \frac{Kills + Assists}{Deaths} )

Displayed equation: $$ WinRate = \frac{Wins}{TotalGames} \times 100 $$

Image Example

Poro AI Assistant

Built With

Share this project:

Updates