LeetRevise helps you retain solved LeetCode problems using a spaced-repetition workflow. It combines problem discovery, revision scheduling, and progress tracking in one place.
Most interview prep workflows optimize for volume solved, not recall quality over time. LeetRevise focuses on long-term retention by turning each solved problem into a review plan that can be tracked and adjusted.
- Email/password authentication with protected app routes
- LeetCode search integration via GraphQL
- One-click add to revision schedule from dashboard
- Difficulty-aware default review intervals
- Monthly revision calendar with completion counters
- Edit and delete flows for scheduled entries
- Duplicate schedule protection with database-level constraints
Default intervals are generated from problem difficulty:
- Easy: day 3, day 6, day 9
- Medium: day 2, day 4, day 6
- Hard: day 1, day 2, day 3
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript |
| UI | React 19, Tailwind CSS 4, Radix UI |
| Auth | NextAuth (Credentials Provider) |
| Data Store | MongoDB |
| Security | bcryptjs for password hashing |
| Path | Purpose |
|---|---|
| app | App Router pages and API handlers |
| app/dashboard | Search + add solved question workflow |
| app/calendar | Calendar-based revision management |
| app/api/auth | Registration and NextAuth routes |
| app/api/leetcode/questions | LeetCode query endpoint |
| app/api/revision/schedule | Schedule list/create/update/delete |
| lib | Business logic and infrastructure modules |
| components/ui | Reusable UI components |
- Create an account or sign in.
- Search for solved LeetCode questions.
- Add a solved question to the revision plan.
- Let the app generate review dates.
- Track and update completion from the calendar.
Create .env.local in the project root:
MONGODB_URI=<your-mongodb-connection-string>
MONGODB_DB=leet_revise
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=<long-random-secret>Notes:
- Use your deployed domain for NEXTAUTH_URL in production.
- Never commit secrets.
- If credentials were exposed, rotate them immediately.
Install dependencies:
npm installStart development server:
npm run devBuild for production:
npm run buildRun production build locally:
npm run startRun lint checks:
npm run lint| Method | Route | Description |
|---|---|---|
| POST | /api/auth/register | Register a new user |
| GET, POST | /api/auth/[...nextauth] | NextAuth handlers |
| GET | /api/leetcode/questions | Fetch latest or searched questions |
| GET | /api/revision/schedule | List current user schedule |
| POST | /api/revision/schedule | Add solved question to schedule |
| PATCH | /api/revision/schedule | increment-done, update-entry, delete-entry |
- Import this repository into Vercel.
- Configure environment variables:
- MONGODB_URI
- MONGODB_DB
- NEXTAUTH_URL
- NEXTAUTH_SECRET
- Deploy with default Next.js settings.
- Validate login, protected routes, and revision APIs after release.
- Registration and login work end-to-end.
- Authenticated users reach dashboard and calendar.
- Search results load from LeetCode API.
- Solved questions create schedule entries.
- Calendar renders correct monthly due items.
- Completion increments persist.
- Edit/delete schedule operations persist.
Contributions are welcome. For significant changes, please open an issue first to discuss scope and approach.
Recommended contribution workflow:
- Fork the repository.
- Create a feature branch.
- Keep pull requests focused and small.
- Include clear reproduction or validation steps.
If you discover a security issue, avoid opening a public issue with sensitive details. Share a private report with maintainers so the issue can be triaged and patched responsibly.
This repository is currently unlicensed. If you plan to accept external contributions, add a LICENSE file before broad distribution.