๐Ÿค Open Source Contributions

Contribute a Problem

Suggest a problem idea or contribute directly via GitHub Pull Request. We review every submission and guide you through the process.

๐Ÿ’ก Suggest a Problem

Don't have time to write the full PR? Just fill this out โ€” we'll review it and reach out via GitHub.

๐Ÿ”ง Contribute via GitHub PR

Want full credit? Follow this guide to add the problem directly โ€” we'll review and merge your PR!

1
๐Ÿด Fork the Repository

Start by forking the CodePro GitHub repository to your own account.

# Click 'Fork' on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/code-pro.git
cd code-pro
2
โš™๏ธ Scaffold with the CLI

Run our interactive generator CLI to automatically create the folder and template files.

npm run generate

# Select option 1 (Scaffold)
# Enter your problem slug (e.g. two-sum)
3
๐Ÿ“ Define the Problem

Open the newly created folder in scripts/problems/ and fill out problem.md, structure.md, and metadata.json.

# structure.md
# function: twoSum
## params
- nums: int[]
- target: int
## return
- int[]
4
๐Ÿงช Add Test Cases

Open testcases.json and add your inputs and expected outputs.

[
  {
    "input": "4\n2 7 11 15\n9",
    "expected": "0 1\n",
    "hidden": false
  }
]
5
๐Ÿช„ Compile Boilerplates

Run the CLI again to auto-generate the complex C++, JS, and Rust boilerplate files.

npm run generate

# Select option 2 (Compile)
6
๐Ÿš€ Open a Pull Request

Push your branch and open a PR. Our database will automatically seed your problem!

git checkout -b add/your-problem-slug
git add scripts/problems/your-problem-slug/
git commit -m "feat: add 'Your Problem Title' problem"
git push origin add/your-problem-slug
# Then open a PR on GitHub!
โญ
Ready to contribute?

Contributors get their GitHub handle listed on the problem page permanently.

Open GitHub Repo โ†’