Your personalized online notebook for everything Leetcode.
This is the codebase, it's all hosted online for free though so if you just want to use it then visit repcode.io. If you would like to contribute, then continue reading.
❤️❤️ SPECIAL THANKS TO ALL OUR CONTRIBUTORS: ❤️❤️
- knownotunknown
- add a PR to see your name here!
This project is an open-source platform designed to streamline your Leetcode practice. It includes features such as problem organization, AI-powered feedback, and spatial repetition for efficient learning.
- Organize problems into collections.
- Review problems with a SuperMemo-based spatial repetition algorithm.
- Get AI-powered feedback on your solutions.
- View detailed stats about your problems, to target your weaknesses
- Frontend: React, Next.js, TailwindCSS
- Backend: Prisma, MySQL (production), SQLite (development), Firebase (for auth)
- Hosting: Vercel
Below are detailed instructions for how to set up your local development environment and make and submit changes/PRs. If you run into any issues, please email repcode.io@gmail.com.
Ensure you have the following installed:
- Node.js (v16 or higher recommended)
- npm or yarn
- SQLite (for local development)
-
Clone the repository to some folder on your desktop
-
Install dependencies:
npm install- Create a
.envfile in the root directory with the following variables:
DATABASE_URL="file:./dev.db"
-
Update
schema.prisma:- Replace the contents of
schema.prismawith the contents ofdevTemplates/devprisma.txt
- Replace the contents of
-
Delete the folder
prisma/migrationsentirely -
Initialize the SQLite database by running the following commands in the terminal of your code editor:
npx prisma migrate dev --name init
npx prisma generate- Comment out the following line in
ProblemsQueue.tsx, on line 412:
// Comment out the below line to avoid runtime errors in development
// await updateContribution(user?.email || '');- Start the development server and navigate to the localhost on your browser:
npm run devCongratulations! You've now successfully set up the development environment! Feel free to explore and make some test changes to stuff to see how everything works.
To view the database structure:
- Use any online SQLite database viewer and drag-and-drop the
prisma/dev.dbfile.
Remember that you're using a local dev.db that emulates the structure of the production database, but not the content: it'll start off as empty. And changes you make to this DB won't affect the production DB (and vice versa). But any changes with data fetching/pushing that work on this dev db will work on the production db as well.
We welcome contributions! Follow these steps to contribute:
-
Follow the 'Getting Started' instructions above
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name-
Make your changes locally:
- Follow the setup instructions under Getting Started to set up the dev environment
-
Commit your changes:
git add .
git commit -m "Description of your changes"- Push your branch to your fork:
git push origin feature/your-feature-name-
Create a Pull Request (PR):
- Go to the original repository's GitHub page.
- Click the "Pull Request" tab.
- Select your branch and submit the PR.
-
Wait for Review:
- A maintainer will review your PR.
- Make any requested changes and update the PR.
- Follow the existing code style.
- Test your changes thoroughly.
- Write descriptive commit messages.
This project is licensed under the MIT License. See the LICENSE file for details.