diff --git a/frontend/src/pages/AIInterviewQuestionConceptCoverageMap/AIInterviewQuestionConceptCoverageMap.jsx b/frontend/src/pages/AIInterviewQuestionConceptCoverageMap/AIInterviewQuestionConceptCoverageMap.jsx new file mode 100644 index 00000000..3bf73921 --- /dev/null +++ b/frontend/src/pages/AIInterviewQuestionConceptCoverageMap/AIInterviewQuestionConceptCoverageMap.jsx @@ -0,0 +1,1652 @@ +import React, { useMemo, useState } from "react"; +import { + Brain, + Map, + Target, + CheckCircle2, + AlertTriangle, + Circle, + TrendingUp, + BookOpen, + Lightbulb, + Sparkles, + ArrowRight, + BarChart3, + Search, + RefreshCw, + Award, + Layers, + ChevronRight, + GraduationCap, +} from "lucide-react"; + +const AIInterviewQuestionConceptCoverageMap = () => { + const [selectedConcept, setSelectedConcept] = useState(null); + const [activeFilter, setActiveFilter] = useState("all"); + const [searchTerm, setSearchTerm] = useState(""); + const [analyzing, setAnalyzing] = useState(false); + + const concepts = [ + { + id: 1, + name: "Arrays", + category: "Data Structures", + mastery: 92, + status: "mastered", + practiced: 24, + solved: 22, + totalQuestions: 25, + accuracy: 92, + lastPracticed: "2 days ago", + description: + "Array operations, indexing, traversal, searching, sorting, and common interview patterns.", + related: ["Strings", "Two Pointers", "Sliding Window"], + }, + { + id: 2, + name: "Linked Lists", + category: "Data Structures", + mastery: 76, + status: "strong", + practiced: 16, + solved: 13, + totalQuestions: 20, + accuracy: 81, + lastPracticed: "4 days ago", + description: + "Node-based data structures, insertion, deletion, traversal, and pointer manipulation.", + related: ["Stacks", "Queues", "Pointers"], + }, + { + id: 3, + name: "Binary Trees", + category: "Data Structures", + mastery: 64, + status: "developing", + practiced: 12, + solved: 8, + totalQuestions: 25, + accuracy: 67, + lastPracticed: "1 week ago", + description: + "Tree traversal, recursion, height, balanced trees, and binary search trees.", + related: ["Recursion", "Graphs", "BST"], + }, + { + id: 4, + name: "Graphs", + category: "Algorithms", + mastery: 42, + status: "partial", + practiced: 7, + solved: 3, + totalQuestions: 25, + accuracy: 57, + lastPracticed: "2 weeks ago", + description: + "Graph representation, BFS, DFS, shortest paths, and connectivity problems.", + related: ["BFS", "DFS", "Dynamic Programming"], + }, + { + id: 5, + name: "Dynamic Programming", + category: "Algorithms", + mastery: 28, + status: "partial", + practiced: 4, + solved: 1, + totalQuestions: 20, + accuracy: 35, + lastPracticed: "3 weeks ago", + description: + "Memoization, tabulation, optimal substructure, and overlapping subproblems.", + related: ["Recursion", "Graphs", "Greedy Algorithms"], + }, + { + id: 6, + name: "Sorting Algorithms", + category: "Algorithms", + mastery: 88, + status: "strong", + practiced: 18, + solved: 16, + totalQuestions: 20, + accuracy: 89, + lastPracticed: "3 days ago", + description: + "Bubble sort, selection sort, insertion sort, merge sort, quick sort, and complexity analysis.", + related: ["Searching", "Arrays", "Time Complexity"], + }, + { + id: 7, + name: "SQL Queries", + category: "DBMS", + mastery: 81, + status: "strong", + practiced: 20, + solved: 17, + totalQuestions: 25, + accuracy: 85, + lastPracticed: "5 days ago", + description: + "SELECT queries, joins, grouping, aggregation, subqueries, and query optimization.", + related: ["Joins", "Indexes", "Database Design"], + }, + { + id: 8, + name: "Database Normalization", + category: "DBMS", + mastery: 52, + status: "partial", + practiced: 6, + solved: 4, + totalQuestions: 15, + accuracy: 67, + lastPracticed: "10 days ago", + description: + "Functional dependencies, normal forms, redundancy, and database design principles.", + related: ["SQL", "Database Design", "Transactions"], + }, + { + id: 9, + name: "Operating System Processes", + category: "Operating Systems", + mastery: 74, + status: "strong", + practiced: 14, + solved: 11, + totalQuestions: 20, + accuracy: 79, + lastPracticed: "6 days ago", + description: + "Processes, threads, scheduling, synchronization, and process states.", + related: ["Threads", "Scheduling", "Deadlocks"], + }, + { + id: 10, + name: "Deadlocks", + category: "Operating Systems", + mastery: 35, + status: "partial", + practiced: 3, + solved: 1, + totalQuestions: 15, + accuracy: 50, + lastPracticed: "2 weeks ago", + description: + "Deadlock conditions, prevention, avoidance, detection, and recovery.", + related: ["Processes", "Threads", "Synchronization"], + }, + { + id: 11, + name: "Computer Networks", + category: "Networking", + mastery: 18, + status: "unexplored", + practiced: 1, + solved: 0, + totalQuestions: 25, + accuracy: 0, + lastPracticed: "Never", + description: + "Networking fundamentals including OSI, TCP/IP, routing, protocols, and network security.", + related: ["TCP/IP", "HTTP", "OSI Model"], + }, + { + id: 12, + name: "OOP Concepts", + category: "Object Oriented Programming", + mastery: 94, + status: "mastered", + practiced: 26, + solved: 25, + totalQuestions: 25, + accuracy: 96, + lastPracticed: "Yesterday", + description: + "Encapsulation, inheritance, polymorphism, abstraction, classes, and interfaces.", + related: ["Design Patterns", "Classes", "Interfaces"], + }, + ]; + + const categories = [ + { + name: "Data Structures", + icon: "🧩", + color: "blue", + concepts: 3, + coverage: 77, + }, + { + name: "Algorithms", + icon: "⚑", + color: "violet", + concepts: 3, + coverage: 53, + }, + { + name: "DBMS", + icon: "πŸ—„οΈ", + color: "green", + concepts: 2, + coverage: 67, + }, + { + name: "Operating Systems", + icon: "πŸ’»", + color: "orange", + concepts: 2, + coverage: 55, + }, + { + name: "Networking", + icon: "🌐", + color: "cyan", + concepts: 1, + coverage: 18, + }, + { + name: "OOP", + icon: "πŸ—οΈ", + color: "pink", + concepts: 1, + coverage: 94, + }, + ]; + + const filteredConcepts = useMemo(() => { + return concepts.filter((concept) => { + const matchesFilter = + activeFilter === "all" || concept.status === activeFilter; + + const matchesSearch = + concept.name + .toLowerCase() + .includes(searchTerm.toLowerCase()) || + concept.category + .toLowerCase() + .includes(searchTerm.toLowerCase()); + + return matchesFilter && matchesSearch; + }); + }, [activeFilter, searchTerm]); + + const overallCoverage = useMemo(() => { + return Math.round( + concepts.reduce((sum, concept) => sum + concept.mastery, 0) / + concepts.length + ); + }, []); + + const practicedConcepts = concepts.filter( + (concept) => + concept.status === "mastered" || + concept.status === "strong" + ).length; + + const partialConcepts = concepts.filter( + (concept) => + concept.status === "developing" || + concept.status === "partial" + ).length; + + const unexploredConcepts = concepts.filter( + (concept) => concept.status === "unexplored" + ).length; + + const totalQuestions = concepts.reduce( + (sum, concept) => sum + concept.totalQuestions, + 0 + ); + + const solvedQuestions = concepts.reduce( + (sum, concept) => sum + concept.solved, + 0 + ); + + const handleAnalyze = () => { + setAnalyzing(true); + + setTimeout(() => { + setAnalyzing(false); + }, 800); + }; + + const getStatusLabel = (status) => { + switch (status) { + case "mastered": + return "Mastered"; + case "strong": + return "Strong"; + case "developing": + return "Developing"; + case "partial": + return "Partially Covered"; + case "unexplored": + return "Unexplored"; + default: + return "Unknown"; + } + }; + + const getStatusColor = (status) => { + switch (status) { + case "mastered": + return "text-green-600"; + case "strong": + return "text-blue-600"; + case "developing": + return "text-yellow-600"; + case "partial": + return "text-orange-500"; + case "unexplored": + return "text-red-600"; + default: + return "text-gray-500"; + } + }; + + const getStatusBg = (status) => { + switch (status) { + case "mastered": + return "bg-green-100 dark:bg-green-900/20"; + case "strong": + return "bg-blue-100 dark:bg-blue-900/20"; + case "developing": + return "bg-yellow-100 dark:bg-yellow-900/20"; + case "partial": + return "bg-orange-100 dark:bg-orange-900/20"; + case "unexplored": + return "bg-red-100 dark:bg-red-900/20"; + default: + return "bg-gray-100 dark:bg-gray-800"; + } + }; + + const getMasteryBar = (score) => { + if (score >= 85) return "bg-green-500"; + if (score >= 70) return "bg-blue-500"; + if (score >= 50) return "bg-yellow-500"; + if (score >= 30) return "bg-orange-500"; + return "bg-red-500"; + }; + + return ( +
+
+ + {/* Header */} + +
+ +
+ +
+ +
+

+ AI Interview Question Concept Coverage Map +

+ +

+ Discover which interview concepts you have mastered, + partially covered, or have not explored yet. +

+
+ +
+ + {/* Overview Cards */} + +
+ +
+ + + +

+ Overall Coverage +

+ +

+ {overallCoverage}% +

+ +
+ +
+ + + +

+ Strong Concepts +

+ +

+ {practicedConcepts} +

+ +
+ +
+ + + +

+ Partial Coverage +

+ +

+ {partialConcepts} +

+ +
+ +
+ + + +

+ Unexplored +

+ +

+ {unexploredConcepts} +

+ +
+ +
+ + {/* AI Banner */} + +
+ +
+ + + +

+ AI Concept Coverage Engine +

+ +
+ +

+ Solving many questions does not always mean you have covered + the important concepts. This map groups your interview + questions by underlying concepts and identifies areas that + need more practice. +

+ +
+ + {/* Coverage Summary */} + +
+ +
+ +
+ +
+ +
+ +

+ {overallCoverage}% +

+ +

+ Coverage +

+ +
+ +
+ +
+ +

+ Your Preparation Coverage +

+ +

+ Your preparation covers several core concepts well, + but there are still important knowledge gaps that could + affect interview performance. +

+ +
+ +
+ +

+ Strong +

+ +

+ {practicedConcepts} +

+ +
+ +
+ +

+ Needs Practice +

+ +

+ {partialConcepts} +

+ +
+ +
+ +

+ Not Explored +

+ +

+ {unexploredConcepts} +

+ +
+ +
+ +
+ +
+ +
+ + {/* Concept Categories */} + +
+ +
+ + + +

+ Concept Coverage by Category +

+ +
+ +
+ + {categories.map((category) => ( + +
+ +
+ +
+ + + {category.icon} + + +
+ +

+ {category.name} +

+ +

+ {category.concepts} concepts +

+ +
+ +
+ + + {category.coverage}% + + +
+ +
+ +
+ +
+ + + +
+ + ))} + +
+ +
+ + {/* Interactive Map */} + +
+ +
+ +
+ + + +
+ +

+ Interactive Concept Map +

+ +

+ Select a concept to inspect its coverage. +

+ +
+ +
+ +
+ + + + + setSearchTerm(event.target.value) + } + placeholder="Search concepts..." + className="w-full pl-11 pr-4 py-3 rounded-xl border border-gray-200 dark:border-white/10 bg-gray-50 dark:bg-gray-800 outline-none focus:ring-2 focus:ring-violet-500" + /> + +
+ +
+ + {/* Filters */} + +
+ + {[ + ["all", "All Concepts"], + ["mastered", "Mastered"], + ["strong", "Strong"], + ["developing", "Developing"], + ["partial", "Partial"], + ["unexplored", "Unexplored"], + ].map(([value, label]) => ( + + + + ))} + +
+ + {/* Map Nodes */} + +
+ + {filteredConcepts.map((concept) => ( + + + + ))} + +
+ + {filteredConcepts.length === 0 && ( + +
+ + + +

+ No concepts found +

+ +

+ Try another search term or filter. +

+ +
+ + )} + +
+ + {/* Selected Concept Details */} + + {selectedConcept && ( + +
+ +
+ +
+ + + {getStatusLabel(selectedConcept.status)} + + +

+ {selectedConcept.name} +

+ +

+ {selectedConcept.category} +

+ +

+ {selectedConcept.description} +

+ +
+ +
+ +

+ {selectedConcept.mastery}% +

+ +

+ Mastery +

+ +
+ +
+ +
+ +
+ +

+ Questions Practiced +

+ +

+ {selectedConcept.practiced} +

+ +
+ +
+ +

+ Questions Solved +

+ +

+ {selectedConcept.solved} +

+ +
+ +
+ +

+ Accuracy +

+ +

+ {selectedConcept.accuracy}% +

+ +
+ +
+ +

+ Last Practiced +

+ +

+ {selectedConcept.lastPracticed} +

+ +
+ +
+ +
+ +

+ Related Concepts +

+ +
+ + {selectedConcept.related.map((item) => ( + + + {item} + + + ))} + +
+ +
+ +
+ + + + + +
+ +
+ + )} + + {/* Knowledge Gaps */} + +
+ +
+ + + +
+ +

+ AI Detected Knowledge Gaps +

+ +

+ Concepts that require additional practice. +

+ +
+ +
+ +
+ + {concepts + .filter( + (concept) => + concept.mastery < 60 + ) + .map((concept) => ( + +
+ +
+ +
+ +
+ + + +

+ {concept.name} +

+ +
+ +

+ {concept.category} β€’{" "} + {concept.practiced} questions practiced +

+ +
+ +
+ +
+ +

+ Mastery +

+ +

+ {concept.mastery}% +

+ +
+ + + +
+ +
+ +
+ + ))} + +
+ +
+ + {/* Recommended Questions */} + +
+ +
+ +
+ + + +
+ +

+ AI Recommended Questions +

+ +

+ Practice these concepts to improve your coverage. +

+ +
+ +
+ + + +
+ +
+ + {[ + { + title: "Implement BFS Traversal", + concept: "Graphs", + difficulty: "Medium", + reason: "Graph coverage is currently low.", + }, + { + title: "Longest Common Subsequence", + concept: "Dynamic Programming", + difficulty: "Hard", + reason: "Your DP mastery needs improvement.", + }, + { + title: "Explain TCP vs UDP", + concept: "Computer Networks", + difficulty: "Easy", + reason: "Networking is largely unexplored.", + }, + ].map((question) => ( + +
+ +
+ + + {question.concept} + + + + {question.difficulty} + + +
+ +

+ {question.title} +

+ +

+ {question.reason} +

+ + + +
+ + ))} + +
+ +
+ + {/* Mastery Distribution */} + +
+ +
+ + + +

+ Mastery Distribution +

+ +
+ +
+ + {[ + { + label: "Mastered", + range: "85–100%", + count: concepts.filter( + (c) => c.mastery >= 85 + ).length, + icon: "πŸ†", + bg: "bg-green-50 dark:bg-green-900/10", + text: "text-green-600", + }, + { + label: "Strong", + range: "70–84%", + count: concepts.filter( + (c) => c.mastery >= 70 && c.mastery < 85 + ).length, + icon: "πŸ’ͺ", + bg: "bg-blue-50 dark:bg-blue-900/10", + text: "text-blue-600", + }, + { + label: "Developing", + range: "50–69%", + count: concepts.filter( + (c) => c.mastery >= 50 && c.mastery < 70 + ).length, + icon: "πŸ“ˆ", + bg: "bg-yellow-50 dark:bg-yellow-900/10", + text: "text-yellow-600", + }, + { + label: "Partial", + range: "30–49%", + count: concepts.filter( + (c) => c.mastery >= 30 && c.mastery < 50 + ).length, + icon: "⚠️", + bg: "bg-orange-50 dark:bg-orange-900/10", + text: "text-orange-500", + }, + { + label: "Unexplored", + range: "0–29%", + count: concepts.filter( + (c) => c.mastery < 30 + ).length, + icon: "πŸ”΄", + bg: "bg-red-50 dark:bg-red-900/10", + text: "text-red-600", + }, + ].map((item) => ( + +
+ +
+ {item.icon} +
+ +

+ {item.label} +

+ +

+ {item.count} +

+ +

+ {item.range} +

+ +
+ + ))} + +
+ +
+ + {/* Question Coverage */} + +
+ +
+ + + +

+ Question Coverage +

+ +
+ +
+ +
+ +
+ + + Questions Solved + + + + {solvedQuestions}/{totalQuestions} + + +
+ +
+ +
+ +
+ +

+ Overall question completion across tracked concepts. +

+ +
+ +
+ +
+ + + Concept Coverage + + + + {overallCoverage}% + + +
+ +
+ +
+ +
+ +

+ Measures breadth and depth of concept preparation. +

+ +
+ +
+ +
+ + {/* Coverage Principles */} + +
+ +
+ + + +

+ AI Coverage Principles +

+ +
+ +
+ +
+ +

+ πŸ—ΊοΈ +

+ +

+ Think Beyond Question Counts +

+ +

+ Solving many questions from one topic does not guarantee + broad interview preparation. +

+ +
+ +
+ +

+ 🎯 +

+ +

+ Target Knowledge Gaps +

+ +

+ Focus your practice on concepts with low mastery or + limited question coverage. +

+ +
+ +
+ +

+ 🧠 +

+ +

+ Build Complete Coverage +

+ +

+ A balanced preparation strategy reduces hidden knowledge + gaps before interviews. +

+ +
+ +
+ +
+ + {/* Progress Tracking */} + +
+ +
+ + + +

+ Concept Coverage Progress +

+ +
+ +
+ + {[ + { + label: "Week 1", + score: 41, + }, + { + label: "Week 2", + score: 52, + }, + { + label: "Week 3", + score: 63, + }, + { + label: "Current", + score: overallCoverage, + }, + ].map((item) => ( + +
+ +

+ {item.label} +

+ +

+ {item.score}% +

+ +
+ +
+ +
+ +
+ + ))} + +
+ +
+ + {/* AI Recommendation */} + +
+ +
+ + + +

+ AI Personalized Recommendation +

+ +
+ +
+ +
+ +

+ Current Strength +

+ +

+ OOP & Core Data Structures +

+ +

+ You have strong coverage in OOP, arrays, sorting, and + several core data-structure concepts. +

+ +
+ +
+ +

+ Biggest Knowledge Gap +

+ +

+ Computer Networks +

+ +

+ Networking has very limited practice. Start with OSI, + TCP/IP, HTTP, and common networking interview questions. +

+ +
+ +
+ +

+ Next Practice Goal +

+ +

+ Improve Graphs & DP +

+ +

+ Strengthen algorithmic coverage by practicing graph + traversal and introductory dynamic programming problems. +

+ +
+ +
+ +
+ + {/* Analyze Button */} + +
+ + + +
+ + {/* Final Insight */} + +
+ +
+ +
+ +
+ + + +

+ AI Final Insight +

+ +
+ +

+ Your preparation is strongest in core programming and + object-oriented concepts. To achieve more comprehensive + interview readiness, prioritize unexplored areas such as + computer networks and strengthen partially covered topics + such as graphs, dynamic programming, and operating-system + concepts. +

+ +
+ +
+ +
+ πŸ—ΊοΈ +
+ +

+ Coverage +

+ +

+ {overallCoverage}% +

+ +
+ +
+ +
+ +
+
+ ); +}; + +export default AIInterviewQuestionConceptCoverageMap; \ No newline at end of file