An open API service indexing awesome lists of open source software.

https://github.com/abhinandanmishra1/leetcode-profiler

It is an npm package that allows you to integrate Leetcode components into your personal projects.
https://github.com/abhinandanmishra1/leetcode-profiler

competitive-programming cp leetcode leetcode-profiler npm npm-packages

Last synced: about 2 months ago
JSON representation

It is an npm package that allows you to integrate Leetcode components into your personal projects.

Awesome Lists containing this project

README

          

# Leetcode Profiler

The Leetcode Profiler is a React npm package that provides ready-to-use components for displaying LeetCode profile data. You can easily integrate components like contest rating graphs, solved problem statistics, badges, and submission heatmaps into your personal projects to showcase your Data Structures and Algorithms (DSA) knowledge and practices.

## 📦 Dependencies

This package fetches data from a backend server. A running instance of the server is required for the components to function correctly. You must provide the server's URL to the `` component for the package to work.

**Backend Server Repository**: [`coding-profile-server`](https://github.com/abhinandanmishra1/coding-profile-server)

## 🚀 Usage Instructions

1. Initialize a React project:
```bash
npx create-react-app my-leetcode-project

2. Install the Leetcode Profiler package:

```bash
npm install leetcode-profiler
```

3. In your `src/index.tsx` (or `src/main.tsx`) file, set up the provider:

```tsx
import React from "react";
import ReactDOM from "react-dom";
import App from "./App"; // Your main application component

import { LeetcodeProfilerProvider } from "leetcode-profiler";

const SERVER_URL = "https://your-deployed-server-url.com"; // Replace with your server URL

ReactDOM.createRoot(document.getElementById("root")!).render(





);
```

## 💡 Example Usage

```tsx
import React from "react";
import {
LeetcodeBadges,
LeetcodeContestRatingGraph,
LeetcodeSolvedProblemsStats,
LeetcodeSubmissionsHeatmap,
LeetcodeTopRatingHistogram,
} from "leetcode-profiler";

const Example = () => {
const username = "abhinandan_mishra_1";

return (














);
};

export default Example;
```

## 🎨 Screenshots

![image](https://github.com/abhinandanmishra1/leetcode-profiler/assets/64205626/f78ba6d5-3c9f-46b5-9269-ae564e965130)
![image](https://github.com/abhinandanmishra1/leetcode-profiler/assets/64205626/5fe563a1-3454-4d4c-a3b8-a8d4f5b990d8)
![image](https://github.com/abhinandanmishra1/leetcode-profiler/assets/64205626/7c34e864-423e-433b-93c3-221e8b63a20e)

> Remember to install and initialize **Tailwind CSS** to apply styling to the above component.

---

## ✨ Happy coding! 🚀🔥