Cases/LeetRun
Personal SaaS Product

LeetRun
DSA Prep Platform with AI and Multiplayer

SaaS-grade interview prep platform with deep LeetCode sync, 1,500+ curated problems, an AI mentor, gamified leaderboards, and multiplayer coding rooms.

Product

LeetRun

Type

Personal SaaS

Duration

8 weeks

Role

Solo Builder

+

Curated problems indexed

across 8 sheets

Interview pattern families

in AI retrieval corpus

Curated problem sheets

Blind 75, NeetCode, Striver and more

Caching layers

built to scale to millions

Background

Built for myself.
Then productised.

LeetRun started as a personal frustration. Preparing for technical interviews meant juggling multiple spreadsheets, manually tracking which problems from which sheet I had solved on LeetCode, and having no clear signal on which topics I was actually weak in relative to real interview patterns.

The core insight was that the data already existed - LeetCode exposes a GraphQL API with full solve history. The problem was nobody had built a platform that used it properly: auto-checking every curated sheet, surfacing pattern-level weaknesses, and wrapping it in something that made daily practice feel like progress rather than a grind.

I built LeetRun as a SaaS product from scratch - database design, caching architecture, AI integration, gamification, multiplayer rooms, and full observability - with every technical decision documented and production-grade.

Architecture

How it was built

Every serious developer preparing for technical interviews faces the same issues: tracking progress across multiple problem sets manually, having no sense of how their weak topics compare to real interview patterns, and grinding alone with no feedback loop. LeetRun was built to fix all three - providing automated progress tracking, pattern-weighted preparation, and a highly competitive social layer.

  • Manual checkbox tracking across Blind 75, NeetCode, Striver - no sync
  • No visibility into topic-level weakness versus interview frequency
  • Grinding alone with no leaderboard or accountability
  • No AI coaching grounded in actual solve history
  • Pattern-based interview prep not available in any single platform

The core technical bet was Deep Sync - a one-time authenticated import of the user's full LeetCode solve history via the LeetCode GraphQL API. Every accepted submission is automatically indexed against 1,500+ problems across all curated sheets (Blind 75, NeetCode 150, Striver). No manual ticking ever.

  • LeetCode GraphQL API integration with full solve history import
  • 1,500+ problems indexed across 8 curated and company sheets
  • Auto-marks every matched problem on every sheet simultaneously
  • Progress bars, difficulty breakdown, and section completion in real time
  • Guest-preview mode: browse full sheet library before signing up
  • localStorage SWR cache: pages paint instantly on reload

The AI mentor isn't generic. It pulls a live context snapshot of your weakest topics, streak state, active quests, and sheet progress before every response. A lightweight retrieval layer grounds answers across 1,500 problems, 21 interview pattern families, and system design notes. Personality modes range from supportive to savage.

  • Context snapshot: LeetCode stats, weakest topics, streak, active quests
  • RAG grounding over 1,500 problems and 21 interview pattern families
  • System design notes in retrieval corpus
  • Lexical scoring for citeable answers without hallucination
  • Personality modes: supportive to savage, user-configurable
  • Proactive nudges on streak break or stalled solve count

The retention layer is built on real motivators: an XP system tied to actual LeetCode solves (Easy 15, Medium 40, Hard 120), daily and weekly quests that auto-verify against your solve history, and global leaderboards. Multiplayer coding rooms let friends run mock contests together with live solve progress.

  • XP system: Easy 15, Medium 40, Hard 120 - verified against real solves
  • Adaptive daily, weekly, and revision quests auto-checking LeetCode
  • Global and friends leaderboards: XP, level, streak, contest rating
  • Multiplayer rooms with unique 6-char codes and live progress tracking
  • Badges, coins, and level progression
  • Leaderboard pre-fetched server-side with 60s revalidation

The architecture was designed for scale from day one. Caching is aggressively layered at every tier: Next.js unstable_cache for leaderboards, HTTP stale-while-revalidate on analytics APIs, in-memory memoization for the problem corpus, and localStorage SWR on the client. Observability runs deep with dual-track tracking across client and server.

  • Next.js unstable_cache with 60s revalidation for leaderboard and profiles
  • HTTP Cache-Control s-maxage + stale-while-revalidate on analytics APIs
  • In-memory memoization for the 1,500+ problem corpus
  • localStorage SWR cache - instant page paint, wiped on logout
  • Edge/CDN caching on Vercel for guest-preview routes
  • Sentry across Node.js, Edge, and client with 10% trace sampling
  • PostHog dual-track: client SPA pageviews and server-side capture

Stack

Technology used

Frontend

Next.js 16TypeScriptTailwind CSS

Auth and Data

Supabase AuthPostgreSQLPrisma ORM

AI

Gemini APIGroq APIRAG retrievalLexical scoring

External APIs

LeetCode GraphQLAuthenticated sync

Observability

SentryPostHogServer-side capture

Infrastructure

VercelEdge/CDN cachingMulti-layer SWR

The core insight

"An AI mentor is only as good as its context window. It needs to know exactly what the user solved yesterday, what patterns they struggle with, and when to stop being nice and push them to execute."

The defining feature of LeetRun isn't the sync-it's the context engine. When a user asks the AI a question, we don't just pass the prompt. We intercept the request and dynamically compile a context snapshot containing their weakest topics, their current LeetCode streak, active daily quests, and their overall progress on key interview patterns. The AI (powered by Gemini/Groq) responds not as a generic chatbot, but as a hyper-personalized technical coach.

Outcome

Where things stand

LeetRun is a fully operational, live SaaS platform that has fundamentally transformed how users prepare for technical interviews. The tedious process of manually tracking progress across disparate sheets has been entirely automated.

With 1,500+ curated problems seamlessly synced to live LeetCode data, users receive real-time analytics on their performance. The gamification layer-featuring XP, daily quests, and global leaderboards-has successfully shifted interview preparation from an isolated grind to a competitive, engaging daily habit.

The implementation of aggressive, multi-layered caching ensures that even with complex database queries and real-time AI context generation, the platform remains highly performant and incredibly resilient under load.

Live platform with active user base
1,500+ problems fully indexed & synced
Automated tracking across 8 curated sheets
RAG-powered personalized AI mentor
Gamified XP & real-time leaderboards
Sub-second load times via edge caching

More cases

See all case studies

View cases

Let's build together. Waiting to connect.

©2025Vishu Pratap · Software Developer