Contribute
CodePrime is open source, and every page is a plain Markdown file in the GitHub repository. Fixing a typo, improving an explanation and adding a new problem are all welcome.
Run the site locally
Section titled “Run the site locally”You need Node.js 22.12 or newer.
git clone https://github.com/umangkumarr/CodePrime.gitcd CodePrimenpm installnpm run devThe site is then available at http://localhost:4321/CodePrime/ and reloads as you edit.
Add a problem
Section titled “Add a problem”Create src/content/docs/docs/codes/<problem-slug>.md. The front matter holds the facts; the body holds the explanation. The page header, the “Solve on LeetCode” button, the complexity badges, the topic chips and the spoiler-safe code panel are all generated from it.
---title: Two Sumsource: https://leetcode.com/problems/two-sum/difficulty: Easy # optional: Easy | Medium | Hardtags: [Array, Hash Table]complexity: time: O(n) space: O(n)---
## Problem
The problem statement (Markdown or HTML).
## Solution approach
### Intuition### Algorithm### Complexity
- **Time:** $O(n)$ — why.- **Space:** $O(n)$ — why.
### Edge cases
## Code
```cpp title="C++"// solution```Two Sum is the reference example. For several languages, rename the file to .mdx and wrap the code blocks in Starlight’s <Tabs syncKey="lang">.
Finally, add the page’s slug to the right group in src/data/sidebar.json.
Add a system design case study
Section titled “Add a system design case study”Create src/content/docs/system-design/case-studies/<name>.md. It appears in the System Design sidebar automatically. Diagrams can be written as Mermaid code blocks:
```mermaidflowchart LR Rider --> Gateway --> Dispatch --> Driver```Open a pull request
Section titled “Open a pull request”- Fork the repository and create a branch.
- Run
npm run buildto make sure the site still builds. - Open a pull request describing what you added or changed.