This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
CodeJeet is a fully static Next.js 16 app for browsing company-wise LeetCode DSA questions and system design chapters. It uses shadcn/ui components and reads question data from CSV files at build time. Deployed to Cloudflare Pages — no server required.
- Dev:
pnpm dev(uses Turbopack) - Build:
pnpm build(runs prebuild script thennext build, outputs toout/) - Prebuild:
pnpm run prebuild(generatespublic/data/questions.jsonfrom CSVs) - Lint:
pnpm lint/pnpm lint:fix - Format:
pnpm format(Prettier) /pnpm format:check - Pre-commit hook: Husky runs lint-staged (Prettier auto-format) on commit
All question data lives in data/*.csv (one CSV per company, ~200+ files). At build time, scripts/build-data.ts uses lib/data.ts to parse all CSVs and writes public/data/questions.json containing { questions, companies, topics }. This JSON file is served statically and fetched by the dashboard client.
There are no API routes. The dashboard fetches /data/questions.json directly. The prebuild step (tsx scripts/build-data.ts) generates this file before next build.
The dashboard client (app/dashboard/page.client.tsx) caches the JSON response in localStorage keyed by CACHE_VERSION from lib/cache-version.ts. When updating the data or JSON shape, bump CACHE_VERSION to bust client caches.
app/dashboard/page.tsx is a statically rendered server component (force-static) that renders page.client.tsx. The client component fetches /data/questions.json and renders LeetCodeDashboard.
Markdown-based content in public/system-design/ with numbered folders (e.g., 01. Scaling/README.md). Each markdown file uses gray-matter frontmatter with slug, optional video (YouTube), and podcast (Spotify) fields. Pages are statically generated (force-static, dynamicParams: false).
The app is fully public — no authentication layer. All pages are accessible without sign-in.
Next.js output: "export" produces a fully static out/ directory. No Node.js server needed. Deployed to Cloudflare Pages.
- shadcn/ui (new-york style) with Radix primitives — components in
components/ui/ - Tailwind CSS v3 with oklch color tokens defined in
app/globals.css - Magic UI animation components in
components/magic-ui/ - Fonts: Plus Jakarta Sans (sans) + JetBrains Mono (mono)
- Dark theme default via
next-themes
@/* maps to project root (e.g., @/components, @/lib, @/utils, @/hooks).
- Package manager is pnpm (specified in
packageManagerfield) - Next.js output mode is
export(fully static) - Prettier config: double quotes, semicolons, 100 char width, es5 trailing commas
utils/utils.tshas general helpers (e.g.,capitalizeWords);lib/utils.tshas the shadcncn()merge utilitypublic/data/is gitignored — generated at build time from CSVs