A Progressive Web App (PWA) for tracking multiple LeetCode users' progress and statistics in real-time.
LeetCode Multi Tracker allows you to monitor any LeetCode user's progress, including their solved problems, difficulty breakdown, rankings, and acceptance rates. The app stores historical data to track progress over time and can be installed on your mobile device for quick access.
- Multi-User Tracking: Track any LeetCode username without authentication
- Real-Time Stats: Fetch latest statistics directly from LeetCode's GraphQL API
- Progress Visualization: View problem-solving progress by difficulty (Easy, Medium, Hard)
- Historical Data: Store and display progress over time using Supabase
- Recent Users: Quick access to previously tracked users stored locally
- PWA Support: Install on mobile devices as a native-like app
- Dark/Light Mode: Toggle between themes with persistent preference
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- User Input: Enter any LeetCode username on the homepage
- Data Fetching: The app queries LeetCode's GraphQL API to fetch:
- Total problems solved (Easy, Medium, Hard)
- Acceptance rate and submission statistics
- User ranking and reputation
- Total available problems by difficulty
- Data Storage: Statistics are synced to Supabase database with timestamps
- Visualization: Data is displayed with progress bars, stats cards, and trend indicators
- Local Caching: Recent users are stored in localStorage for quick access
GET /api/sync?username={username}- Fetch and sync user stats from LeetCode
The app uses Supabase with the following structure:
- users: Stores user statistics with timestamps
- Tracks: solved problems, acceptance rates, rankings, and difficulty breakdowns
- Indexed by username for efficient querying
- Framework: Next.js 15 with App Router
- UI Components: shadcn/ui with Tailwind CSS
- Database: Supabase (PostgreSQL)
- API: LeetCode GraphQL API
- PWA: Service Worker with offline caching
- Font: JetBrains Mono for monospace code aesthetics
- Node.js 18+ or Bun
- Supabase account and project
- Clone the repository:
git clone <repository-url>
cd leetcode-multi-tracker- Install dependencies:
npm install
# or
bun install- Configure environment variables:
Create a
.env.localfile in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key- Set up the database: Run the SQL schema in your Supabase project:
# Execute the contents of supabase-schema.sql in your Supabase SQL Editor- Start the development server:
npm run dev
# or
bun dev- Open http://localhost:3000 in your browser
Android (Chrome):
- Open the app in Chrome
- Tap the menu (three dots)
- Select "Install app" or "Add to Home Screen"
- The app will appear as "LCMT" in your app drawer
- Enter a LeetCode username in the input field
- Click "Track User" or press Enter
- View the user's statistics and progress
- Click "Sync Latest Stats" to update with fresh data from LeetCode
- Recently tracked users appear on the homepage
- Click a user card to quickly view their stats
- Click the X button to remove a user from recent list
- Click the theme toggle button (sun/moon icon) to switch between light and dark modes
- Preference is saved locally and persists across sessions
leetcode-multi-tracker/
├── public/ # Static assets and PWA files
│ ├── manifest.json # PWA manifest
│ ├── sw.js # Service worker
│ └── icon-*.png # App icons (various sizes)
├── src/
│ ├── app/ # Next.js app directory
│ │ ├── api/sync/ # API route for LeetCode data sync
│ │ ├── user/[username]/ # Dynamic user profile pages
│ │ ├── layout.js # Root layout with PWA meta tags
│ │ └── page.jsx # Homepage
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components
│ │ ├── user-stats.jsx # User statistics display
│ │ ├── username-input.jsx # Username input form
│ │ ├── recent-users.jsx # Recent users list
│ │ └── theme-toggle.jsx # Dark/light mode toggle
│ └── lib/ # Utility functions
│ ├── supabase.js # Supabase client configuration
│ └── utils.js # Helper utilities
└── supabase-schema.sql # Database schema
- Built with Next.js App Router and React Server Components
- Uses Tailwind CSS for styling with custom theme configuration
- Implements progressive enhancement for offline functionality
- Follows modern React patterns with hooks and client components where needed
Contributions are not welcome! Jitna banaya hu utna bas hai.