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 ( +
+ Discover which interview concepts you have mastered, + partially covered, or have not explored yet. +
++ Overall Coverage +
+ ++ {overallCoverage}% +
+ ++ Strong Concepts +
+ ++ {practicedConcepts} +
+ ++ Partial Coverage +
+ ++ {partialConcepts} +
+ ++ Unexplored +
+ ++ {unexploredConcepts} +
+ ++ 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. +
+ ++ {overallCoverage}% +
+ ++ 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} +
+ ++ {category.concepts} concepts +
+ ++ Select a concept to inspect its coverage. +
+ ++ Try another search term or filter. +
+ ++ {selectedConcept.category} +
+ ++ {selectedConcept.description} +
+ ++ {selectedConcept.mastery}% +
+ ++ Mastery +
+ ++ Questions Practiced +
+ ++ {selectedConcept.practiced} +
+ ++ Questions Solved +
+ ++ {selectedConcept.solved} +
+ ++ Accuracy +
+ ++ {selectedConcept.accuracy}% +
+ ++ Last Practiced +
+ ++ {selectedConcept.lastPracticed} +
+ ++ Concepts that require additional practice. +
+ ++ {concept.category} β’{" "} + {concept.practiced} questions practiced +
+ ++ Mastery +
+ ++ {concept.mastery}% +
+ ++ Practice these concepts to improve your coverage. +
+ ++ {question.reason} +
+ + + ++ {item.count} +
+ ++ {item.range} +
+ ++ Overall question completion across tracked concepts. +
+ ++ Measures breadth and depth of concept preparation. +
+ ++ πΊοΈ +
+ ++ Solving many questions from one topic does not guarantee + broad interview preparation. +
+ ++ π― +
+ ++ Focus your practice on concepts with low mastery or + limited question coverage. +
+ ++ π§ +
+ ++ A balanced preparation strategy reduces hidden knowledge + gaps before interviews. +
+ ++ {item.label} +
+ ++ {item.score}% +
+ ++ Current Strength +
+ ++ You have strong coverage in OOP, arrays, sorting, and + several core data-structure concepts. +
+ ++ Biggest Knowledge Gap +
+ ++ Networking has very limited practice. Start with OSI, + TCP/IP, HTTP, and common networking interview questions. +
+ ++ Next Practice Goal +
+ ++ Strengthen algorithmic coverage by practicing graph + traversal and introductory dynamic programming problems. +
+ ++ 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. +
+ ++ {overallCoverage}% +
+ +