|
1 | | -# Wanna Contribute 🤔?? |
| 1 | +# Contributing to alfa-leetcode-api |
2 | 2 |
|
3 | | -## With Docker 🐳 |
| 3 | +I'm excited you're interested in contributing to **alfa-leetcode-api**, a custom solution born out of the need for a well-documented and detailed LeetCode API. This project is designed to provide developers with endpoints that offer insights into a user's profile, badges, solved questions, contest details, contest history, submissions, and also daily questions, selected problem, list of problems. |
4 | 4 |
|
5 | | -- #### 🍴 Create a Fork of this Repo to Your GitHub Account |
| 5 | +## Reporting Bugs |
6 | 6 |
|
7 | | -  |
| 7 | +If you find a bug, please check the Issues to see if it has already been reported. If not, open a new issue with a clear `title` and `description`. Include as much detail as possible to help us reproduce the issue: |
8 | 8 |
|
9 | | -- #### 🧑🏽💻 Clone Your Repo Locally |
| 9 | +- A clear and concise description of the bug. |
| 10 | +- Steps to reproduce the behavior. |
| 11 | +- Expected behavior. |
| 12 | +- Screenshots or a video if applicable. |
10 | 13 |
|
11 | | - first open your CLI and clone the repo locally. But don't forget to replace **username** with your GitHub username |
12 | 14 |
|
13 | | - ```bash |
14 | | - git clone https://github.com/username/alfa-leetcode-api.git |
15 | | - ``` |
| 15 | +## Suggesting Enhancements |
16 | 16 |
|
17 | | -- #### 👋🏽 Go to the Project Folder |
| 17 | +All ideas for new features or improvements are welcome. If you have a suggestion, please create a new topic on the [discussions page](https://github.com/alfaarghya/alfa-leetcode-api/discussions). Describe your idea and why you think it would be a good addition to the project. |
18 | 18 |
|
19 | | - ```bash |
20 | | - cd alfa-leetcode-api |
21 | | - ``` |
| 19 | +### Working on Issues |
22 | 20 |
|
23 | | -- #### 🚀 Start the Project with Docker |
24 | | - ```bash |
25 | | - docker compose up |
26 | | - ``` |
| 21 | +First requirement: use the program. I've seen people wanting to contribute without using it. |
27 | 22 |
|
28 | | -## Without Docker 🐳❌ |
| 23 | +Issues will only be assigned to users when enough discussion about their implementation has taken place. It's important that nobody keeps an issue assigned without making progress, as this prevents others from contributing. So, if you want to write code for an existing issue, start by discussing the issue and your proposed solution first. |
29 | 24 |
|
30 | | -- #### 🍴 Create a Fork of this repo to Your GitHub Account |
| 25 | +I do think it's fine if you submit a PR for a bugfix you made without prior discussion, as long as you take the time to explain the **why** and the **how**. In that case, the issue won't be assigned to you until the merge is complete. |
31 | 26 |
|
32 | | -  |
| 27 | +### Generative AI use |
33 | 28 |
|
34 | | -- #### 🧑🏽💻 Clone Your Repo Locally |
| 29 | +I don't want to go as far as prohibiting anyone from using AI. After all, at this point, _some AI use_ is inevitable. However, **purely vibe-coded PRs are not going to be approved**. |
35 | 30 |
|
36 | | - first open your CLI and clone the repo locally. But don't forget to replace **username** with your GitHub username |
| 31 | +If you're using AI to generate code, you must make it very clear. And you'll have to own it and maintain it. I will review and ask as many questions as necessary about the code, and I reserve the right to judge whether I think the contribution is worth it or not. |
37 | 32 |
|
38 | | - ```bash |
39 | | - git clone https://github.com/username/alfa-leetcode-api.git |
40 | | - ``` |
| 33 | +Also, not properly communicating that you're using generated code in your PR is considered dishonest. If I find out, I'll have to close the PR. |
41 | 34 |
|
42 | | -- #### 👋🏽 Go to the Project Folder |
| 35 | +## Submitting a Pull Request |
43 | 36 |
|
44 | | - ```bash |
45 | | - cd alfa-leetcode-api |
46 | | - ``` |
| 37 | +1. Fork the repository and create your branch from `main`. Call it `feature/xyz-feature` or `bug/xyz-bug`. |
| 38 | +2. Clone your forked repository to your local machine. |
| 39 | +3. Implement your changes. Please ensure your code is: |
| 40 | + - well-written |
| 41 | + - well formatted |
| 42 | +4. Write clear, concise commit messages. |
| 43 | +5. Push your changes to your fork. |
47 | 44 |
|
48 | | -- #### 🚀 Install Required Modules |
| 45 | +Open a new pull request from your branch to the `main` branch of **alfa-leetcode-api**. |
49 | 46 |
|
50 | | - ```bash |
51 | | - npm install |
52 | | - ``` |
| 47 | +Provide a clear description of the changes in your pull request. If your PR addresses an existing issue, please reference it. Images and videos are always appreciated, for a quicker understanding of what has been implemented. |
53 | 48 |
|
54 | | -- #### 🏃🏽♂️Run the Project Locally |
| 49 | +## Setting up Your Development Environment |
55 | 50 |
|
56 | | - ```bash |
57 | | - npm run dev |
58 | | - ``` |
| 51 | +To start contributing, you'll need to set up your local environment. |
59 | 52 |
|
60 | | -## |
| 53 | +Clone the repository: |
61 | 54 |
|
62 | | -- #### 💡 Make Changes & Create Pull Requests |
| 55 | +```bash |
| 56 | +git clone https://github.com/<username>/alfa-leetcode-api.git |
| 57 | +cd alfa-leetcode-api # go to the project |
| 58 | +npm install # install required modules |
| 59 | +npm run dev # run the project |
| 60 | +``` |
63 | 61 |
|
64 | | - Make changes as needed and push them to your GitHub repository with proper **commit message**. From there, create a **PR (Pull Request)** and submit it. |
65 | | - |
66 | | -- #### 📌 Additional Tip |
67 | | - |
68 | | - Try to create a new branch relevant to your work. For example - `fix:xyz-issue` |
69 | | - |
70 | | - 📝Note - It's not Necessary for contribution but it will help me to merge it. |
71 | | - |
72 | | -# |
73 | | - |
74 | | -#### 📌 Special Thanks to [@sazsu](https://github.com/sazsu) for improving the documentation |
| 62 | +Thank you for helping us to improve **alfa-leetcode-api**! |
0 commit comments