A Next.js application for tracking LeetCode problem progress with user authentication and cloud storage.
- 🔐 User authentication with Supabase (login/signup)
- 📊 Track solved problems per user
- 🎯 Filter by rating range
- 📈 Progress tracking with ELO calculation
- 🌓 Dark/Light theme toggle
- 📱 Responsive design
- Node.js 18+ installed
- A Supabase account and project
-
Install dependencies:
npm install
-
Set up Supabase:
- Create a new project at supabase.com
- Go to SQL Editor and run the schema from
supabase/schema.sql - Copy your project URL and anon key from Settings > API
-
Configure environment variables:
cp .env.example .env.local
Edit
.env.localand add your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key -
Add your LeetCode problems data:
- Place your
data.jsonfile in thepublic/directory - The file should be an array of problems with this structure:
[ { "ID": 1, "Title": "Two Sum", "TitleSlug": "two-sum", "Rating": 1200 } ]
- Place your
-
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
- Push your code to GitHub
- Import your repository in Vercel
- Add your environment variables in Vercel project settings
- Deploy!
The app will be automatically deployed on every push to your main branch.
The app uses a user_progress table in Supabase to store solved problems:
id: UUID primary keyuser_id: References auth.usersproblem_id: Integer (LeetCode problem ID)solved_at: Timestamp- Row Level Security enabled (users can only see/modify their own progress)
├── app/
│ ├── auth/
│ │ ├── login/ # Login page
│ │ └── signup/ # Signup page
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main tracker page
├── components/ # React components
├── lib/
│ ├── supabase.ts # Supabase client
│ └── utils.ts # Utility functions
├── public/
│ └── data.json # LeetCode problems data
├── supabase/
│ └── schema.sql # Database schema
└── types/
└── index.ts # TypeScript types
MIT