Skip to contentSkip to main content

leetTracker

A smart spaced repetition tracker for DSA problems that schedules your reviews and syncs them to Google Calendar — so you never forget a problem again.

leetTracker

Overview

leetTracker solves a real problem — you grind LeetCode, solve a problem, and then forget it a week later. This app fixes that. You log a problem after solving it, and it automatically schedules the next time you should review it using Spaced Repetition (the same method Anki uses). The intervals get longer the better you know it — day 1, day 3, day 7, day 15. If you struggled, it comes back sooner. Every review date syncs to your Google Calendar as a reminder. There's also a Chrome Extension so you can log a problem in one click directly from the LeetCode or GFG page.

What I Did

I built everything — frontend, backend, scheduling algorithm, Google Calendar sync, and a Chrome Extension. The dashboard shows your due problems today, a stats bar, and a sortable/filterable problem table. The backend has 10+ API routes in Next.js App Router. The centerpiece is the Smart Priority Scheduler — it scores every due problem and picks the best ones for your daily session. A separate Load Balancer spreads your reviews across days so you never get buried with 20 reviews at once. The Calendar sync auto-creates, updates, or deletes events in real time. The Chrome Extension (Manifest V3) scrapes the problem name and difficulty right off the page and logs it using a personal API Key.

Tech Stack

Next.jsTypeScriptMongoDBTailwind CSSNextAuthFramer MotionRechartsThree.jsZodChrome Extension

Technical Decisions

Next.js with App Router was the obvious pick — frontend and API routes in one project, no separate backend needed. MongoDB fits perfectly because each problem has a nested array of past reviews, which is exactly what a document database is good at. I used NextAuth with Google OAuth because it also hands me the OAuth tokens I need to write to Google Calendar — one auth flow, two problems solved. Zod validates every API input so bad data never touches the database. For the Chrome Extension, I skipped session cookies (they don't work cross-origin) and used a simple API Key the user generates once and pastes into the extension. Tailwind CSS v4 with CSS variable design tokens keeps the light/dark theme consistent across every page.

Architecture

LeetTracker Architecture

What I Learned

I built the SM-2 Spaced Repetition algorithm from scratch — the same one Anki uses. That meant understanding Ease Factor math and how intervals grow or reset based on performance. I also learned the hard way about database performance: I added 5 compound MongoDB indexes after noticing queries slowing down as problem counts grew. Working with Google OAuth taught me about token expiry — access tokens expire, and I had to silently refresh them using the stored refresh token without logging the user out. Building the Chrome Extension was new — especially Manifest V3's stricter security model and communicating between the popup and content script. One painful lesson: I accidentally shipped source maps to production, which exposed my full source code — fixed that immediately.