diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 79ce58d..c368a53 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -27,8 +27,8 @@ }, "devDependencies": { "@eslint/js": "^9.33.0", - "@types/react": "^19.1.10", - "@types/react-dom": "^19.1.7", + "@types/react": "^18.3.1", + "@types/react-dom": "^18.3.1", "@vitejs/plugin-react": "^5.0.0", "eslint": "^9.33.0", "eslint-plugin-react-hooks": "^5.2.0", @@ -1752,23 +1752,30 @@ "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", "license": "MIT" }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "license": "MIT" + }, "node_modules/@types/react": { - "version": "19.1.12", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.1.12.tgz", - "integrity": "sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w==", + "version": "18.3.31", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", + "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", "license": "MIT", "dependencies": { - "csstype": "^3.0.2" + "@types/prop-types": "*", + "csstype": "^3.2.2" } }, "node_modules/@types/react-dom": { - "version": "19.1.9", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.1.9.tgz", - "integrity": "sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ==", + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "dev": true, "license": "MIT", "peerDependencies": { - "@types/react": "^19.0.0" + "@types/react": "^18.0.0" } }, "node_modules/@types/trusted-types": { @@ -2171,9 +2178,9 @@ } }, "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, "node_modules/debug": { diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 1896b3c..3f6ea9b 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -10,7 +10,7 @@ import { Toaster } from "react-hot-toast"; import { AnimatePresence } from "framer-motion"; import PageTransition from "./components/animations/PageTransition"; import ErrorBoundary from "./components/ErrorBoundary"; - +import CompanyPrep from "./pages/CompanyPrep/CompanyPrep"; import Login from "./pages/Auth/Login"; import SignUp from "./pages/Auth/SignUp"; import VerifyEmail from "./pages/Auth/verifyEmail"; @@ -249,6 +249,14 @@ const App = () => { } /> + + + } +/> + diff --git a/frontend/src/components/Layouts/Sidebar.jsx b/frontend/src/components/Layouts/Sidebar.jsx index e61fde0..40bedfe 100644 --- a/frontend/src/components/Layouts/Sidebar.jsx +++ b/frontend/src/components/Layouts/Sidebar.jsx @@ -85,6 +85,12 @@ const Sidebar = () => { path: "/role-prep", icon: Briefcase, }, + { + id: "company-prep", + title: "Company-wise Prep", + path: "/company-prep", + icon: LayoutDashboard + }, { id: "assessment", title: "Skill Assessment", diff --git a/frontend/src/pages/CompanyPrep/CompanyPrep.jsx b/frontend/src/pages/CompanyPrep/CompanyPrep.jsx new file mode 100644 index 0000000..995c333 --- /dev/null +++ b/frontend/src/pages/CompanyPrep/CompanyPrep.jsx @@ -0,0 +1,521 @@ +import React, { useEffect, useMemo, useState } from "react"; +import { + Building2, + Briefcase, + Target, + BookOpen, + MessageSquare, + Sparkles, + Clock, + Layers, + ChevronDown, + Bookmark, + BookmarkCheck, + IndianRupee, + ExternalLink, + Star, +} from "lucide-react"; +import { companies } from "./companiesData"; + +const difficultyStyles = { + Hard: "bg-red-50 text-red-500 border-red-100", + "Medium-Hard": "bg-orange-50 text-orange-500 border-orange-100", + Medium: "bg-yellow-50 text-yellow-600 border-yellow-100", + "Easy-Medium": "bg-emerald-50 text-emerald-500 border-emerald-100", +}; + +const CompanyPrep = () => { + const [companyFilter, setCompanyFilter] = useState(""); + const [role, setRole] = useState("All"); + const [selectedCompany, setSelectedCompany] = useState(companies[0]); + const [openDropdown, setOpenDropdown] = useState(null); + const [favoritesOnly, setFavoritesOnly] = useState(false); + const [bookmarks, setBookmarks] = useState(() => { + try { + return JSON.parse(localStorage.getItem("companyPrepBookmarks")) || []; + } catch { + return []; + } + }); + + useEffect(() => { + localStorage.setItem("companyPrepBookmarks", JSON.stringify(bookmarks)); + }, [bookmarks]); + + const roles = useMemo(() => { + const allRoles = companies.flatMap((company) => company.roles); + return ["All", ...new Set(allRoles)]; + }, []); + + const filteredCompanies = companies.filter((company) => { + const matchesCompany = !companyFilter || company.name === companyFilter; + const matchesRole = role === "All" || company.roles.includes(role); + const matchesBookmark = !favoritesOnly || bookmarks.includes(company.name); + return matchesCompany && matchesRole && matchesBookmark; + }); + + const aiRecommendations = useMemo(() => { + const topics = selectedCompany.topics.slice(0, 4).join(", "); + const roleText = role === "All" ? selectedCompany.roles[0] : role; + + return [ + `Start with ${topics} because these topics commonly appear in ${selectedCompany.name} preparation.`, + `Prepare a role-focused checklist for ${roleText} and revise matching projects before interviews.`, + `Practice one timed OA mock test based on this pattern: ${selectedCompany.oaPattern}`, + `Revise company-specific behavioral answers and keep one strong project explanation ready.`, + ]; + }, [selectedCompany, role]); + + const toggleBookmark = (companyName) => { + setBookmarks((prev) => + prev.includes(companyName) + ? prev.filter((item) => item !== companyName) + : [...prev, companyName] + ); + }; + + const handleCompanyChange = (value) => { + setCompanyFilter(value); + setOpenDropdown(null); + + if (!value) { + setSelectedCompany(companies[0]); + return; + } + + const company = companies.find((item) => item.name === value); + if (company) setSelectedCompany(company); + }; + + const handleRoleChange = (value) => { + setRole(value); + setOpenDropdown(null); + + const firstMatch = companies.find((company) => { + const matchesCompany = !companyFilter || company.name === companyFilter; + const matchesRole = value === "All" || company.roles.includes(value); + const matchesBookmark = !favoritesOnly || bookmarks.includes(company.name); + return matchesCompany && matchesRole && matchesBookmark; + }); + + if (firstMatch) setSelectedCompany(firstMatch); + }; + + return ( +
setOpenDropdown(null)} + > +
+ +
+
+ +
+ +
+

+ Company-wise Preparation +

+

+ Explore company-specific preparation guides, OA patterns, DSA + topics, salary insights, bookmarks, and AI-style preparation + recommendations. +

+
+
+ +
+ } value="15+" label="Companies" /> + } value="40+" label="Roles" /> + } value="100+" label="DSA Topics" /> + } value="JSON" label="Dataset" /> +
+
+ +
+ { + e.stopPropagation(); + setOpenDropdown(openDropdown === "company" ? null : "company"); + }} + options={[ + { label: "Select Company", value: "" }, + ...companies.map((company) => ({ + label: company.name, + value: company.name, + })), + ]} + selectedValue={companyFilter} + onSelect={handleCompanyChange} + /> + + { + e.stopPropagation(); + setOpenDropdown(openDropdown === "role" ? null : "role"); + }} + options={roles.map((item) => ({ + label: item === "All" ? "Select Role" : item, + value: item, + }))} + selectedValue={role} + onSelect={handleRoleChange} + /> + + +
+ +
+
+ {filteredCompanies.map((company, index) => { + const isBookmarked = bookmarks.includes(company.name); + + return ( + +
+ + +
+ + +
+
+ +

+ {company.overview} +

+
+ ); + })} + + {filteredCompanies.length === 0 && ( +
+

+ No matching companies found. +

+

+ Try another company, role, or turn off favorites. +

+
+ )} +
+ + +
+
+
+ {selectedCompany.name.charAt(0)} +
+ +
+

+ Company Guide +

+

+ {selectedCompany.name} +

+

+ {selectedCompany.overview} +

+
+
+ +
+ + +
+
+ +
} + title="Available Roles" + items={selectedCompany.roles} + /> + + } + title="Online Assessment Pattern" + text={selectedCompany.oaPattern} + /> + +
} + title="Frequently Asked DSA Topics" + items={selectedCompany.topics} + /> + +
} + title="Recommended Learning Resources" + items={selectedCompany.resources} + /> + +
} + title="Preparation Tips" + items={selectedCompany.tips} + /> + + + +
} + title="Interview Experiences" + items={selectedCompany.experiences} + /> + +
+

+ + AI-powered Preparation Recommendations +

+
+ {aiRecommendations.map((item) => ( +

+ • {item} +

+ ))} +
+
+ + {selectedCompany.careersUrl && ( + + Visit Careers Page + + + )} + +
+
+
+ ); +}; + +const CustomDropdown = ({ + label, + options, + selectedValue, + isOpen, + onToggle, + onSelect, +}) => ( +
e.stopPropagation()}> + + + {isOpen && ( + + {options.map((option) => ( + + ))} + + )} +
+); + +const Stat = ({ icon, value, label }) => ( +
+
+ {icon} +
+

{value}

+

{label}

+
+); + +const Badge = ({ difficulty }) => ( + + {difficulty} + +); + +const Section = ({ icon, title, items }) => ( +
+

+ {icon} + {title} +

+ +
+ {items.map((item) => ( + + {item} + + ))} +
+
+); + +const Info = ({ icon, title, text }) => ( +
+

+ {icon} + {title} +

+ +

+ {text} +

+
+); + +const SalaryCard = ({ salaryRange }) => ( +
+

+ + + + Salary Range + + Community Submitted + +

+ +
+
+

+ Intern +

+

+ {salaryRange?.intern || "Not available"} +

+
+ +
+

+ Fresher +

+

+ {salaryRange?.fresher || "Not available"} +

+
+
+
+); + +export default CompanyPrep; \ No newline at end of file diff --git a/frontend/src/pages/CompanyPrep/companiesData.js b/frontend/src/pages/CompanyPrep/companiesData.js new file mode 100644 index 0000000..abb128d --- /dev/null +++ b/frontend/src/pages/CompanyPrep/companiesData.js @@ -0,0 +1,257 @@ +export const companies = [ + { + name: "Microsoft", + difficulty: "Hard", + timeline: "May - August", + salaryRange: { + intern: "₹80K - ₹1.2L/month", + fresher: "₹18 - ₹45 LPA", + }, + careersUrl: "https://careers.microsoft.com", + overview: "Microsoft hires for product engineering, cloud, AI, and platform roles.", + roles: ["Software Engineer Intern", "SDE I", "Frontend Engineer", "Backend Engineer"], + oaPattern: "2 coding questions, MCQs on CS fundamentals, and problem solving.", + topics: ["Arrays", "Strings", "Trees", "Graphs", "Dynamic Programming"], + resources: ["Microsoft Learn", "LeetCode Microsoft tagged questions", "System Design basics"], + tips: ["Focus on clean code", "Practice behavioral questions", "Revise OS, DBMS, CN basics"], + experiences: ["Community experiences can be added through future contributions."], + }, + { + name: "Google", + difficulty: "Hard", + timeline: "July - October", + salaryRange: { + intern: "₹1L - ₹1.5L/month", + fresher: "₹25 - ₹60 LPA", + }, + careersUrl: "https://careers.google.com", + overview: "Google focuses strongly on problem solving, DSA, scalability, and fundamentals.", + roles: ["Software Engineering Intern", "STEP Intern", "SWE I"], + oaPattern: "Coding-heavy assessment with strong DSA focus.", + topics: ["Graphs", "DP", "Recursion", "Trees", "Hashing"], + resources: ["Google Careers", "LeetCode Google tagged questions", "CS fundamentals"], + tips: ["Explain your approach clearly", "Optimize time and space complexity"], + experiences: ["Community driven interview experiences will be expanded."], + }, + { + name: "Amazon", + difficulty: "Medium-Hard", + timeline: "June - September", + salaryRange: { + intern: "₹70K - ₹1.1L/month", + fresher: "₹18 - ₹45 LPA", + }, + careersUrl: "https://www.amazon.jobs", + overview: "Amazon evaluates DSA, leadership principles, and practical coding skills.", + roles: ["SDE Intern", "SDE I", "Backend Engineer"], + oaPattern: "2 coding questions, work simulation, aptitude/behavioral round.", + topics: ["Arrays", "Sliding Window", "Trees", "Graphs", "Heaps"], + resources: ["Amazon Jobs", "Leadership Principles", "LeetCode Amazon questions"], + tips: ["Prepare STAR answers", "Know Amazon leadership principles"], + experiences: ["Community submitted experiences can be added."], + }, + { + name: "Adobe", + difficulty: "Medium-Hard", + timeline: "July - October", + salaryRange: { + intern: "₹60K - ₹1L/month", + fresher: "₹15 - ₹35 LPA", + }, + careersUrl: "https://careers.adobe.com", + overview: "Adobe hires for product engineering, cloud, design tools, and platform teams.", + roles: ["SDE Intern", "Software Engineer", "Frontend Engineer"], + oaPattern: "Coding questions, aptitude, technical interview.", + topics: ["Arrays", "Strings", "DP", "OOP", "DBMS"], + resources: ["Adobe Careers", "LeetCode Adobe tagged questions"], + tips: ["Revise OOP and projects well"], + experiences: ["Community driven section."], + }, + { + name: "Atlassian", + difficulty: "Hard", + timeline: "August - November", + salaryRange: { + intern: "₹80K - ₹1.3L/month", + fresher: "₹20 - ₹50 LPA", + }, + careersUrl: "https://www.atlassian.com/company/careers", + overview: "Atlassian focuses on collaboration tools, scalable systems, and clean engineering.", + roles: ["SDE Intern", "Frontend Engineer", "Backend Engineer"], + oaPattern: "Coding round, system/design discussion, behavioral round.", + topics: ["Graphs", "DP", "System Design", "JavaScript", "APIs"], + resources: ["Atlassian Careers", "Frontend and backend interview guides"], + tips: ["Prepare projects deeply", "Practice design thinking"], + experiences: ["Community driven section."], + }, + { + name: "Zoho", + difficulty: "Medium", + timeline: "Year-round", + salaryRange: { + intern: "₹20K - ₹50K/month", + fresher: "₹5 - ₹12 LPA", + }, + careersUrl: "https://www.zoho.com/careers", + overview: "Zoho focuses on programming fundamentals, logic building, and practical problem solving.", + roles: ["Software Developer", "Product Developer", "Intern"], + oaPattern: "Aptitude, basic programming, advanced coding, face-to-face technical rounds.", + topics: ["Patterns", "Arrays", "Strings", "Recursion", "OOP"], + resources: ["Zoho interview preparation sheets", "Basic DSA practice"], + tips: ["Practice dry runs", "Focus on logic more than shortcuts"], + experiences: ["Community driven section."], + }, + { + name: "Freshworks", + difficulty: "Medium", + timeline: "June - September", + salaryRange: { + intern: "₹40K - ₹80K/month", + fresher: "₹8 - ₹18 LPA", + }, + careersUrl: "https://www.freshworks.com/company/careers", + overview: "Freshworks hires for SaaS product development and full-stack engineering roles.", + roles: ["SDE Intern", "Frontend Engineer", "Backend Engineer"], + oaPattern: "Coding, aptitude, technical interview, project discussion.", + topics: ["Arrays", "Strings", "Web Development", "DBMS", "APIs"], + resources: ["Freshworks Careers", "Full-stack project guides"], + tips: ["Show strong product thinking", "Prepare web projects clearly"], + experiences: ["Community driven section."], + }, + { + name: "TCS", + difficulty: "Easy-Medium", + timeline: "August - December", + salaryRange: { + intern: "₹10K - ₹25K/month", + fresher: "₹3.5 - ₹9 LPA", + }, + careersUrl: "https://www.tcs.com/careers", + overview: "TCS hires through NQT and campus drives for multiple IT roles.", + roles: ["Ninja", "Digital", "Prime", "Software Engineer"], + oaPattern: "Aptitude, verbal, reasoning, coding.", + topics: ["Basic Coding", "Arrays", "Strings", "SQL", "OOP"], + resources: ["TCS NQT practice", "Aptitude preparation"], + tips: ["Practice speed and accuracy", "Revise basics well"], + experiences: ["Community driven section."], + }, + { + name: "Infosys", + difficulty: "Easy-Medium", + timeline: "August - December", + salaryRange: { + intern: "₹10K - ₹25K/month", + fresher: "₹3.6 - ₹9.5 LPA", + }, + careersUrl: "https://www.infosys.com/careers", + overview: "Infosys hires through campus drives and certification based programs.", + roles: ["System Engineer", "Power Programmer", "Specialist Programmer"], + oaPattern: "Aptitude, pseudocode, coding questions.", + topics: ["Pseudocode", "Arrays", "Strings", "DBMS", "OOP"], + resources: ["Infosys recruitment practice", "Programming fundamentals"], + tips: ["Focus on pseudocode and aptitude"], + experiences: ["Community driven section."], + }, + { + name: "Accenture", + difficulty: "Easy-Medium", + timeline: "Year-round", + salaryRange: { + intern: "₹15K - ₹30K/month", + fresher: "₹4.5 - ₹8 LPA", + }, + careersUrl: "https://www.accenture.com/in-en/careers", + overview: "Accenture hires for software, consulting, cloud, and analyst roles.", + roles: ["ASE", "Intern", "Software Engineer"], + oaPattern: "Cognitive ability, technical MCQs, coding, communication.", + topics: ["Aptitude", "Basic Coding", "SQL", "OOP"], + resources: ["Accenture placement preparation", "Communication practice"], + tips: ["Prepare communication round well"], + experiences: ["Community driven section."], + }, + { + name: "Wipro", + difficulty: "Easy-Medium", + timeline: "August - December", + salaryRange: { + intern: "₹10K - ₹25K/month", + fresher: "₹3.5 - ₹8 LPA", + }, + careersUrl: "https://careers.wipro.com", + overview: "Wipro hires through campus and national talent programs.", + roles: ["Project Engineer", "Software Developer", "Intern"], + oaPattern: "Aptitude, essay writing, coding, HR.", + topics: ["Aptitude", "Arrays", "Strings", "OOP", "SQL"], + resources: ["Wipro placement papers", "Basic DSA"], + tips: ["Practice essay and communication"], + experiences: ["Community driven section."], + }, + { + name: "Capgemini", + difficulty: "Easy-Medium", + timeline: "August - December", + salaryRange: { + intern: "₹10K - ₹25K/month", + fresher: "₹3.8 - ₹8 LPA", + }, + careersUrl: "https://www.capgemini.com/careers", + overview: "Capgemini hires for software engineering, analyst, and consulting roles.", + roles: ["Analyst", "Software Engineer", "Intern"], + oaPattern: "Aptitude, logical reasoning, coding, communication.", + topics: ["Aptitude", "Basic Coding", "SQL", "OOP"], + resources: ["Capgemini placement practice", "Coding basics"], + tips: ["Maintain accuracy in aptitude"], + experiences: ["Community driven section."], + }, + { + name: "Qualcomm", + difficulty: "Hard", + timeline: "July - October", + salaryRange: { + intern: "₹60K - ₹1L/month", + fresher: "₹15 - ₹35 LPA", + }, + careersUrl: "https://www.qualcomm.com/company/careers", + overview: "Qualcomm focuses on systems, embedded, hardware-software, and performance engineering.", + roles: ["Software Intern", "Embedded Engineer", "Systems Engineer"], + oaPattern: "Coding, OS, CN, C/C++, electronics fundamentals depending on role.", + topics: ["C++", "OS", "CN", "Bit Manipulation", "DSA"], + resources: ["Qualcomm Careers", "OS and C++ preparation"], + tips: ["Revise low-level concepts strongly"], + experiences: ["Community driven section."], + }, + { + name: "Oracle", + difficulty: "Medium-Hard", + timeline: "July - October", + salaryRange: { + intern: "₹50K - ₹90K/month", + fresher: "₹12 - ₹30 LPA", + }, + careersUrl: "https://www.oracle.com/careers", + overview: "Oracle hires for database, cloud, backend, and enterprise software teams.", + roles: ["SDE Intern", "Application Developer", "Backend Engineer"], + oaPattern: "Coding, SQL, DBMS, technical interview.", + topics: ["SQL", "DBMS", "Arrays", "Trees", "OOP"], + resources: ["Oracle Careers", "SQL and DBMS notes"], + tips: ["Prepare DBMS very well"], + experiences: ["Community driven section."], + }, + { + name: "Salesforce", + difficulty: "Medium-Hard", + timeline: "July - October", + salaryRange: { + intern: "₹60K - ₹1L/month", + fresher: "₹14 - ₹35 LPA", + }, + careersUrl: "https://careers.salesforce.com", + overview: "Salesforce hires for cloud, CRM, backend, frontend, and platform engineering.", + roles: ["SDE Intern", "Associate Software Engineer", "Frontend Engineer"], + oaPattern: "Coding assessment, technical interview, behavioral round.", + topics: ["Arrays", "Strings", "DP", "Web Development", "OOP"], + resources: ["Salesforce Careers", "Trailhead", "LeetCode Salesforce questions"], + tips: ["Prepare projects and cloud basics"], + experiences: ["Community driven section."], + }, +]; \ No newline at end of file