A comprehensive interview preparation platform built with Next.js 15, designed to help you master technical interviews with practice questions for Data Structures & Algorithms (DSA), System Design, Object-Oriented Design (OOD), and Behavioral interviews.
- 149+ DSA Questions: Carefully curated coding problems with multiple language solutions
- System Design: Complete system design questions with architectural diagrams and code examples
- Object-Oriented Design: OOD problems with UML diagrams and implementation patterns
- Behavioral Questions: Interview scenarios with structured answer frameworks
- Multi-Language Support: Solutions in Java, Python, C++, JavaScript, TypeScript, Go, C#, and more
- Smart Code Loading: Dynamic loading based on available languages per problem
- Progress Tracking: Firebase-powered user progress and bookmarking system
- Responsive Navigation: Sticky navigation that adapts to mobile screens
- Dark/Light Mode: System-aware theme switching with manual override
- Advanced Filtering: Filter by difficulty, topics, and companies
- MDX-Powered Content: Rich markdown with embedded React components
- Framework: Next.js 15 with App Router and Turbopack
- Frontend: React 18 with TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Content: MDX with custom components for code tabs and images
- Authentication: Firebase Auth with Google Sign-In
- Database: Firebase Firestore for progress tracking
- State Management: React Context API
- API Routes: Next.js API routes for dynamic content serving
src/
βββ app/ # Next.js App Router pages
β βββ api/ # API routes for content serving
β βββ dsa/ # DSA category pages
β βββ system-design/ # System Design pages
β βββ ood/ # Object-Oriented Design pages
β βββ behavioral/ # Behavioral interview pages
β βββ auth/ # Authentication pages
βββ components/ # Reusable UI components
β βββ filters/ # Filter components
β βββ layout/ # Layout components
β βββ mdx/ # MDX-specific components
β βββ ui/ # shadcn/ui components
βββ content/ # Content organized by category
β βββ dsa/ # DSA problems and solutions
β βββ system-design/ # System design content
β βββ ood/ # OOD problems
β βββ behavioral/ # Behavioral questions
βββ lib/ # Utility functions and loaders
βββ hooks/ # Custom React hooks
βββ contexts/ # React context providers
βββ config/ # Configuration files
βββ data/ # Pre-built indexes
βββ types/ # TypeScript type definitions
- Node.js (v18 or higher)
- pnpm package manager (recommended)
- Clone the repository:
git clone <your-repo-url>
cd cracking-interview-next- Install dependencies:
pnpm install- Start the development server:
pnpm dev- Open your browser and navigate to
http://localhost:3000
- Browse Categories: Navigate between DSA, System Design, OOD, and Behavioral sections
- Practice Problems: Click on any question to view detailed problem statements
- View Solutions: Access multi-language code solutions with syntax highlighting
- Track Progress: Sign in to mark questions as completed and bookmark favorites
- Filter Content: Use advanced filters to find questions by difficulty, topics, or companies
- Mobile-Friendly: Use the responsive interface on any device
- Add Content: Create new MDX files in the appropriate content directory
- Language Support: Add solution files using the naming convention
solution.{ext} - Frontmatter: Use the frontmatter format to specify available languages:
--- title: Problem Title langs: [java, py, cpp] difficulty: medium tags: [array, string] companies: [google, microsoft] ---
- Create a Firebase project at Firebase Console
- Enable Authentication and Firestore
- Add your configuration to
src/integrations/firebase/client.ts
The application uses src/config/categoryConfig.json to control features per category:
{
"dsa": {
"features": {
"solutionTabs": true, // Enable solution loading
"mdxRenderer": true, // Enable MDX rendering
"index": true // Use pre-built indexes
},
"difficulty": {
"enabled": true,
"levels": ["easy", "medium", "hard"]
}
}
}The platform intelligently loads only the code solutions that exist for each problem:
- Reads the
langsfield from MDX frontmatter - Only fetches files for specified languages
- Eliminates 404 errors and improves performance
- Sticky navigation on all screen sizes
- Mobile-optimized layout with abbreviated labels
- Collapsible user menu on mobile devices
- MDX Integration: Rich content with embedded React components
- Dynamic Loading: API routes serve content files dynamically
- Caching: In-memory caching for optimal performance
- Type Safety: Full TypeScript support throughout
pnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production serverpnpm lint- Run ESLintpnpm format- Format all files with Prettierpnpm format:check- Check if files are properly formattedpnpm format:staged- Format staged files (useful for git hooks)
- Create an MDX file in the appropriate content directory
- Add solution files in the corresponding code directory
- Update the frontmatter with correct metadata
- The system will automatically detect and load the new content
This project uses Prettier for consistent code formatting:
- Automatic formatting: VS Code is configured to format on save
- Tailwind CSS sorting: Classes are automatically sorted for consistency
- Pre-commit hooks: Consider adding lint-staged for automatic formatting
- Configuration: See
.prettierrcfor formatting rules
Before committing, run:
pnpm format # Format all files
pnpm format:check # Verify formattingContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Rajat Srivastava
- GitHub: @rajatsrivastava
- Twitter: @rajatsrivastava
- Questions and problems curated from various competitive programming platforms
- UI components from shadcn/ui
- Icons from Lucide React
- Built with Next.js and Tailwind CSS
This project was migrated from a Vite-based React application to Next.js 15 with:
- App Router for improved routing and layouts
- Server-side rendering capabilities
- Enhanced performance with Turbopack
- Better SEO and meta tag management
- Improved content loading with API routes