A structured learning path for technical interviews — built with Next.js 14, React, and TailwindCSS.
- 14 DSA topics with concept explanations, patterns, brute→optimal thinking, and curated LeetCode problems
- Interactive visualizations — step through Sliding Window, Binary Search, and Two Pointers
- Progress tracking — checkboxes persisted to
localStorage, topic completion bars - Pattern Cheatsheet — signal → technique quick-reference
- Common Mistakes and Interview Guide pages
- Fully responsive — sidebar on desktop, drawer on mobile
- Node.js 18+ (download)
- npm 9+ (comes with Node)
cd dsa-roadmap
npm installnpm run devOpen http://localhost:3000 in your browser.
npm run build
npm run startnpm install -g vercel
vercelFollow the prompts. Your site will be live in ~60 seconds.
- Push this repo to GitHub
- Go to vercel.com → New Project
- Import your repository
- Leave all settings as default — Vercel auto-detects Next.js
- Click Deploy
dsa-roadmap/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── layout.tsx # Root layout (sidebar, fonts, providers)
│ │ ├── page.tsx # Homepage — roadmap grid
│ │ ├── not-found.tsx # 404 page
│ │ ├── topics/
│ │ │ └── [slug]/
│ │ │ ├── page.tsx # Static route generation
│ │ │ └── TopicPageClient.tsx # Client component (tabs, progress)
│ │ ├── cheatsheet/
│ │ │ └── page.tsx # Pattern recognition cheatsheet
│ │ ├── mistakes/
│ │ │ └── page.tsx # Common interview mistakes
│ │ └── interview/
│ │ └── page.tsx # Interview preparation guide
│ │
│ ├── components/
│ │ ├── ui/
│ │ │ ├── Sidebar.tsx # Desktop sidebar with nav + topic list
│ │ │ ├── MobileHeader.tsx # Mobile top bar + drawer
│ │ │ ├── TopicCard.tsx # Roadmap grid card
│ │ │ ├── ProgressBar.tsx # Reusable progress bar
│ │ │ ├── DifficultyBadge.tsx # Easy/Medium/Hard colored badge
│ │ │ ├── ThinkingStep.tsx # Brute→Optimal step card
│ │ │ └── ProblemList.tsx # Checkboxes + LeetCode links
│ │ └── visualizations/
│ │ ├── SlidingWindowViz.tsx # Step-through window animation
│ │ ├── BinarySearchViz.tsx # Step-through binary search
│ │ └── TwoPointersViz.tsx # Step-through two pointer
│ │
│ ├── data/
│ │ └── topics.ts # ALL topic content — edit this to add/update
│ │
│ ├── lib/
│ │ ├── utils.ts # cn(), getDifficultyClasses(), localStorage helpers
│ │ └── progress-context.tsx # React context for solved problem state
│ │
│ └── styles/
│ └── globals.css # CSS variables, Tailwind base, fonts
│
├── public/ # Static assets
├── package.json
├── tailwind.config.ts
├── tsconfig.json
├── next.config.js
└── vercel.json
All topic content lives in src/data/topics.ts. To add or update a topic:
- Add a
TopicMetaentry to theTOPICSarray - Add a
TopicDetailentry to theTOPIC_DETAILSobject with the sameid - The route
/topics/your-idwill be automatically generated
// In TOPICS array:
{ id: "your-topic", num: 15, title: "Your Topic", ... }
// In TOPIC_DETAILS:
"your-topic": {
...TOPICS[14],
concept: "...",
whenToUse: [...],
patterns: [...],
thinkingSteps: [...],
problems: [...],
pitfalls: [...],
}- Create
src/components/visualizations/YourTopicViz.tsx - Import it in
TopicPageClient.tsx - Add your topic id to the
HAS_VIZset - Add the component to the
<Visualization>function's switch
| Tool | Version | Purpose |
|---|---|---|
| Next.js | 14 | App Router, static generation, routing |
| React | 18 | UI components, hooks, context |
| TailwindCSS | 3.4 | Utility-first styling |
| TypeScript | 5 | Type safety across all data and components |
| Lucide React | 0.383 | Icons (available, used optionally) |
| clsx | 2.1 | Conditional className merging |