Skip to content

feat: add leetcode graph support - #6

Open
SamanPandey-in wants to merge 2 commits into
radiumcoders:mainfrom
SamanPandey-in:leetcode
Open

feat: add leetcode graph support#6
SamanPandey-in wants to merge 2 commits into
radiumcoders:mainfrom
SamanPandey-in:leetcode

Conversation

@SamanPandey-in

Copy link
Copy Markdown

Add LeetCode contribution graph support

Adds a /leetcode route with the same isometric 3D terrain visualization as the GitHub graph, sourced from a user's LeetCode submission calendar.

What's where:

  • lib/leetcode.ts — username/link parsing + fetches submission calendar from LeetCode's GraphQL API, reshaped into the same grid format GitHub uses
  • app/api/leetcode/route.ts — API route, mirrors /api/contributions
  • app/leetcode/page.tsx, app/leetcode/[username]/page.tsx — home + shareable profile pages
    components/leetcode-graph/leetcode-graph.tsx, leetcode-graph-loader.tsx — same search/load/export/share flow as the GitHub graph, pointed at the LeetCode API
  • components/leetcode-search-panel.tsx — LeetCode-flavored search panel copy
  • app/page.tsx — added a "Check your leetcode here" button linking to /leetcode

Reused as-is (no forking needed): the 3D scene, profile-analysis stats panel, sidebar, and chart-export logic — all already generic enough to work off the shared ContributionDay[] shape. Added an optional heightUnit override on the scene (defaults to GitHub's existing value) so LeetCode's smaller submission counts still render as a readable terrain instead of looking flat.

tsc --noEmit passes clean.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@SamanPandey-in is attempting to deploy a commit to the radiumcoders' projects Team on Vercel.

A member of the Team first needs to authorize it.

@SamanPandey-in

Copy link
Copy Markdown
Author

Just a friendly addition, I liked your idea a lot and then implemented the same for leetcode too

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
isometric-github-contributions Error Error Jul 9, 2026 4:21am

@radiumcoders

Copy link
Copy Markdown
Owner

Man Deployment Failed =[

@radiumcoders

Copy link
Copy Markdown
Owner
09:51:12.659 Running build in Washington, D.C., USA (East) – iad1
09:51:12.660 Build machine configuration: 2 cores, 8 GB
09:51:12.774 Cloning github.com/radiumcoders/Isometric-Github-Contributions (Branch: leetcode, Commit: 000ce61)
09:51:13.433 Cloning completed: 658.000ms
09:51:14.763 Restored build cache from previous deployment (CNUhgEakG3fdsneNiyr8YitrweGq)
09:51:15.019 Running "vercel build"
09:51:15.041 Vercel CLI 54.21.1
09:51:15.429 Detected `pnpm-lock.yaml` version 9 generated by pnpm@10.x with package.json#packageManager pnpm@11.10.0
09:51:15.464 Installing dependencies...
09:51:17.638 Recreating /vercel/path0/node_modules
09:51:19.890 ? Verifying lockfile against supply-chain policies (693 entries)...
09:51:19.902 Lockfile is up to date, resolution step is skipped
09:51:20.057 Progress: resolved 1, reused 0, downloaded 0, added 0
09:51:20.122 Packages: +616
09:51:20.123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:51:21.070 Progress: resolved 616, reused 0, downloaded 1, added 0
09:51:22.078 Progress: resolved 616, reused 0, downloaded 5, added 1
09:51:23.082 Progress: resolved 616, reused 0, downloaded 41, added 1
09:51:24.090 Progress: resolved 616, reused 0, downloaded 61, added 4
09:51:25.161 Progress: resolved 616, reused 0, downloaded 66, added 4
09:51:26.163 Progress: resolved 616, reused 0, downloaded 74, added 5
09:51:27.227 Progress: resolved 616, reused 0, downloaded 91, added 5
09:51:28.377 Progress: resolved 616, reused 0, downloaded 102, added 5
09:51:29.992 Progress: resolved 616, reused 0, downloaded 103, added 5
09:51:30.169 ✓ Lockfile passes supply-chain policies (693 entries in 10.2s)
09:51:30.987 Progress: resolved 616, reused 0, downloaded 126, added 8
09:51:31.987 Progress: resolved 616, reused 0, downloaded 294, added 19
09:51:32.988 Progress: resolved 616, reused 0, downloaded 484, added 34
09:51:33.989 Progress: resolved 616, reused 0, downloaded 616, added 66
09:51:34.991 Progress: resolved 616, reused 0, downloaded 616, added 102
09:51:35.990 Progress: resolved 616, reused 0, downloaded 616, added 202
09:51:36.990 Progress: resolved 616, reused 0, downloaded 616, added 503
09:51:37.572 Progress: resolved 616, reused 0, downloaded 616, added 616, done
09:51:37.813 .../node_modules/unrs-resolver postinstall$ node postinstall.js
09:51:37.815 .../sharp@0.34.5/node_modules/sharp install$ node install/check.js || npm run build
09:51:37.922 .../node_modules/unrs-resolver postinstall: Done
09:51:38.066 .../sharp@0.34.5/node_modules/sharp install: Done
09:51:38.299 
09:51:38.300 dependencies:
09:51:38.300 + @base-ui/react 1.6.0
09:51:38.300 + @react-three/drei 10.7.7
09:51:38.300 + @react-three/fiber 9.6.1
09:51:38.300 + class-variance-authority 0.7.1
09:51:38.301 + clsx 2.1.1
09:51:38.301 + lucide-react 1.23.0
09:51:38.301 + next 16.2.10
09:51:38.301 + next-themes 0.4.6
09:51:38.301 + nuqs 2.9.0
09:51:38.302 + react 19.2.7
09:51:38.302 + react-dom 19.2.7
09:51:38.302 + shadcn 4.13.0
09:51:38.302 + tailwind-merge 3.6.0
09:51:38.302 + three 0.185.1
09:51:38.303 + tw-animate-css 1.4.0
09:51:38.303 
09:51:38.303 devDependencies:
09:51:38.303 + @tailwindcss/postcss 4.3.2
09:51:38.304 + @types/node 26.1.0
09:51:38.304 + @types/react 19.2.17
09:51:38.304 + @types/react-dom 19.2.3
09:51:38.304 + @types/three 0.185.0
09:51:38.304 + eslint 10.6.0
09:51:38.304 + eslint-config-next 16.2.10
09:51:38.305 + prettier 3.9.4
09:51:38.305 + prettier-plugin-tailwindcss 0.8.0
09:51:38.305 + tailwindcss 4.3.2
09:51:38.305 + typescript 6.0.3
09:51:38.306 
09:51:38.354 Done in 21.4s using pnpm v11.10.0
09:51:38.445 Detected Next.js version: 16.2.10
09:51:38.504 Running "pnpm run build"
09:51:39.347 $ next build
09:51:40.025   Applying modifyConfig from Vercel
09:51:40.042 ▲ Next.js 16.2.10 (Turbopack)
09:51:40.043 
09:51:40.074   Creating an optimized production build ...
09:51:48.958 ✓ Compiled successfully in 8.5s
09:51:48.959   Running TypeScript ...
09:51:55.711 Failed to type check.
09:51:55.712 
09:51:55.713 ./components/leetcode-graph/leetcode-graph.tsx:260:13
09:51:55.713 Type error: No overload matches this call.
09:51:55.714   Overload 1 of 2, '(props: IsometricContributionSceneProps, context?: any): string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | ... 4 more ... | undefined', gave the following error.
09:51:55.714     Type '{ key: string; data: ContributionDay[]; onCaptureReady: (capture: () => Promise<Blob | null>) => void; heightUnit: number; }' is not assignable to type 'IntrinsicAttributes & IsometricContributionSceneProps'.
09:51:55.714       Property 'heightUnit' does not exist on type 'IntrinsicAttributes & IsometricContributionSceneProps'.
09:51:55.714   Overload 2 of 2, '(props: IsometricContributionSceneProps): string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | ... 4 more ... | undefined', gave the following error.
09:51:55.714     Type '{ key: string; data: ContributionDay[]; onCaptureReady: (capture: () => Promise<Blob | null>) => void; heightUnit: number; }' is not assignable to type 'IntrinsicAttributes & IsometricContributionSceneProps'.
09:51:55.715       Property 'heightUnit' does not exist on type 'IntrinsicAttributes & IsometricContributionSceneProps'.
09:51:55.715 
09:51:55.715   258 |             data={contributions}
09:51:55.715   259 |             onCaptureReady={handleCaptureReady}
09:51:55.715 > 260 |             heightUnit={1}
09:51:55.715       |             ^
09:51:55.715   261 |           />
09:51:55.715   262 |         ) : loading ? (
09:51:55.715   263 |           <div className="flex h-full flex-col items-center justify-center gap-3 px-6 tex...
09:51:55.754 Next.js build worker exited with code: 1 and signal: null
09:51:55.809 [ELIFECYCLE] Command failed with exit code 1.
09:51:55.849 Error: Command "pnpm run build" exited with 1

@SamanPandey-in

Copy link
Copy Markdown
Author

fixed the error, build passing now without any errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants