diff --git a/kits/assistant/ai-career-copilot/.env.example b/kits/assistant/ai-career-copilot/.env.example new file mode 100644 index 00000000..dceb7f91 --- /dev/null +++ b/kits/assistant/ai-career-copilot/.env.example @@ -0,0 +1,4 @@ +LAMATIC_API_KEY=YOUR_API_KEY +LAMATIC_PROJECT_ID=YOUR_PROJECT_ID +LAMATIC_API_URL=https://your-project.lamatic.dev/graphql +LAMATIC_FLOW_ID=YOUR_FLOW_ID diff --git a/kits/assistant/ai-career-copilot/.gitignore b/kits/assistant/ai-career-copilot/.gitignore new file mode 100644 index 00000000..877c8b11 --- /dev/null +++ b/kits/assistant/ai-career-copilot/.gitignore @@ -0,0 +1,41 @@ +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local +.env + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +.env +.env.local +node_modules +.vscode +.next \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/README.md b/kits/assistant/ai-career-copilot/README.md new file mode 100644 index 00000000..b2b635be --- /dev/null +++ b/kits/assistant/ai-career-copilot/README.md @@ -0,0 +1,165 @@ +# πŸš€ AI Career Copilot + +An AI-powered career assistant that analyzes resumes and provides personalized career guidance including skill analysis, job recommendations, learning roadmaps, project suggestions, and interview preparation. + +--- + +## ✨ Features + +* 🎯 **Skill Analysis** – Extract and analyze skills from resumes +* πŸ“Š **Readiness Score** – Evaluate how job-ready you are +* πŸ’Ό **Role Suggestions** – Get suitable job roles +* πŸ—ΊοΈ **Learning Roadmap** – Step-by-step improvement plan +* πŸš€ **Project Ideas** – Build real-world portfolio projects +* πŸ’¬ **Interview Questions** – Practice with tailored questions + +--- + +## πŸ›  Tech Stack + +* **Frontend:** Next.js, React, Tailwind CSS +* **Backend:** Lamatic AI Flow (GraphQL API) +* **API Communication:** Axios + +--- + +## πŸ“¦ Prerequisites + +* Node.js 18+ +* npm +* Lamatic Account +* Deployed Lamatic Flow + +--- + +## βš™οΈ Installation + +1. **Clone the repository** + +```bash +git clone https://github.com/Lamatic/AgentKit.git +cd AgentKit/kits/assistant/ai-career-copilot +``` + +2. **Install dependencies** + +```bash +npm install +``` + +3. **Setup environment variables** + +```bash +cp .env.example .env +``` + +4. **Add your Lamatic credentials in `.env`** + +```env +LAMATIC_API_KEY=YOUR_API_KEY +LAMATIC_PROJECT_ID=YOUR_PROJECT_ID +LAMATIC_API_URL=YOUR_API_URL +AGENTIC_GENERATE_CONTENT=YOUR_FLOW_ID +``` + +5. **Run the project** + +```bash +npm run dev +``` + +--- + +## πŸ§ͺ Usage + +1. Enter your **resume text** +2. Select your **target domain** (e.g., Web Development) +3. Click **Analyze** +4. Get: + + * Skills + * Missing skills + * Roles + * Roadmap + * Projects + * Interview questions + +--- + +## πŸ“‚ Project Structure + +``` +ai-career-copilot/ +β”œβ”€β”€ app/ # Next.js pages +β”œβ”€β”€ components/ # UI components +β”œβ”€β”€ actions/ # Server actions +β”œβ”€β”€ lib/ # Lamatic API client +β”œβ”€β”€ flows/ # Exported Lamatic flow +β”œβ”€β”€ .env.example # Environment template +β”œβ”€β”€ config.json # Kit configuration +└── README.md +``` + +--- + +## πŸ”— Lamatic Flow + +* **Flow ID:** `66c98d92-70da-4eec-82b0-af4f01be9cd5` +* **Type:** Synchronous GraphQL Workflow + +--- + +## 🌐 Deployment + +You can deploy using Vercel: + +* Set root directory: + +``` +kits/assistant/ai-career-copilot +``` + +* Add environment variables in Vercel dashboard + +--- + +## πŸ“Œ Example Input + +**Resume:** + +``` +I know JavaScript, React, and basic Node.js +``` + +**Domain:** + +``` +Web Development +``` + +--- + +## πŸ“ˆ Output Includes + +* Skills & Missing Skills +* Career Roles +* Readiness Score +* Learning Roadmap +* Suggested Projects +* Interview Questions + +--- + +## 🀝 Contribution + +This project is built as part of a Lamatic AgentKit contribution. + +--- + +## πŸ‘¨β€πŸ’» Author + +**Durvankur Joshi** + +--- + +## ⭐ If you like this project, give it a star! diff --git a/kits/assistant/ai-career-copilot/actions/orchestrate.ts b/kits/assistant/ai-career-copilot/actions/orchestrate.ts new file mode 100644 index 00000000..a26c7e7c --- /dev/null +++ b/kits/assistant/ai-career-copilot/actions/orchestrate.ts @@ -0,0 +1,43 @@ +'use server'; + +import { executeCareerAnalysis } from '@/lib/lamatic-client'; +import { CareerAnalysisInput, ApiResponse, CareerAnalysisOutput } from '@/types'; + +export async function analyzeCareer( + input: CareerAnalysisInput +): Promise { + try { + console.log('πŸš€ Analyzing career with input:', { + resumeLength: input.resume_text?.length, + domain: input.domain, + }); + + // βœ… Validation + if (!input.resume_text?.trim()) { + return { success: false, error: 'Resume text is required' }; + } + + if (!input.domain?.trim()) { + return { success: false, error: 'Target domain is required' }; + } + + const result = await executeCareerAnalysis(input); + + return { + success: true, + data: result , + timestamp: new Date().toISOString(), + }; + + } catch (error) { + console.error('❌ Career analysis error:', error); + + return { + success: false, + error: + error instanceof Error + ? error.message + : 'Failed to analyze career data.', + }; + } +} \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/app/globals.css b/kits/assistant/ai-career-copilot/app/globals.css new file mode 100644 index 00000000..d65cc0a8 --- /dev/null +++ b/kits/assistant/ai-career-copilot/app/globals.css @@ -0,0 +1,50 @@ +@import "tailwindcss"; + +@layer base { + body { + @apply bg-gray-50 text-gray-900; + } +} + +@layer components { + .btn-primary { + @apply bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700 transition-colors duration-200 font-medium; + } + + .btn-secondary { + @apply bg-gray-200 text-gray-800 px-6 py-2 rounded-lg hover:bg-gray-300 transition-colors duration-200 font-medium; + } + + .card { + @apply bg-white rounded-xl shadow-md p-6 border border-gray-100; + } + + .input-field { + @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent outline-none transition; + } +} +@keyframes slideDown { + from { + height: 0; + } + to { + height: var(--radix-accordion-content-height); + } +} + +@keyframes slideUp { + from { + height: var(--radix-accordion-content-height); + } + to { + height: 0; + } +} + +.animate-slideDown { + animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1); +} + +.animate-slideUp { + animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1); +} \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/app/layout.tsx b/kits/assistant/ai-career-copilot/app/layout.tsx new file mode 100644 index 00000000..9f09758d --- /dev/null +++ b/kits/assistant/ai-career-copilot/app/layout.tsx @@ -0,0 +1,29 @@ +import type { Metadata } from 'next'; +import { Inter } from 'next/font/google'; +import './globals.css'; + +const inter = Inter({ subsets: ['latin'] }); + +export const metadata: Metadata = { + title: 'AI Career Copilot | Your Personal Career Assistant', + description: 'AI-powered career analysis tool that helps you identify skills, find suitable roles, and create personalized learning paths.', + keywords: 'career, AI, resume analysis, job recommendations, skill development, career planning', + authors: [{ name: 'Durvankur Joshi ' }], + openGraph: { + title: 'AI Career Copilot', + description: 'Your personal AI career assistant', + type: 'website', + }, +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + {children} + + ); +} \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/app/page.tsx b/kits/assistant/ai-career-copilot/app/page.tsx new file mode 100644 index 00000000..82c7ded4 --- /dev/null +++ b/kits/assistant/ai-career-copilot/app/page.tsx @@ -0,0 +1,98 @@ +'use client'; + +import { useState } from 'react'; +import { analyzeCareer } from '@/actions/orchestrate'; +import CareerAnalysisForm from '@/components/CareerAnalysisForm'; +import AnalysisResult from '@/components/AnalysisResult'; +import LoadingSpinner from '@/components/LoadingSpinner'; +import ErrorMessage from '@/components/ErrorMessage'; +import { CareerAnalysisOutput } from '@/types'; + +export default function Home() { + const [loading, setLoading] = useState(false); + const [result, setResult] = useState(null); + const [error, setError] = useState(null); + + const handleAnalyze = async (resumeText: string, domain: string) => { + setLoading(true); + setError(null); + + try { + const response = await analyzeCareer({ + resume_text: resumeText, + domain: domain, + }); + + if (response.success && response.data) { + setResult(response.data); + } else { + setError(response.error || 'Failed to analyze career data'); + } + } catch (err) { + setError(err instanceof Error ? err.message : 'An unexpected error occurred'); + } finally { + setLoading(false); + } + }; + + const handleReset = () => { + setResult(null); + setError(null); + }; + + return ( +
+
+ {/* Header */} +
+

+ AI Career Copilot +

+

+ Your personal AI-powered career assistant. Get personalized insights, + skill analysis, and a complete roadmap to achieve your career goals. +

+
+ + {/* Main Content */} +
+ {!result && !loading && ( + + )} + + {loading && ( +
+ +
+ )} + + {error && ( + + )} + + {result && !loading && !error && ( + <> + +
+ +
+ + )} +
+ + {/* Footer */} +
+

Powered by Lamatic.ai - AI Career Assistant

+
+
+
+ ); +} \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/components/AnalysisResult.tsx b/kits/assistant/ai-career-copilot/components/AnalysisResult.tsx new file mode 100644 index 00000000..c5a6351d --- /dev/null +++ b/kits/assistant/ai-career-copilot/components/AnalysisResult.tsx @@ -0,0 +1,87 @@ +'use client'; + +import { CareerAnalysisOutput } from '@/types'; +import SkillsDisplay from './SkillsDisplay'; +import RoadmapDisplay from './RoadmapDisplay'; +import ProjectsDisplay from './ProjectsDisplay'; +import InterviewQuestions from './InterviewQuestions'; +import { TrendingUp, Briefcase } from 'lucide-react'; // Removed Lightbulb + +interface AnalysisResultProps { + data: CareerAnalysisOutput; +} + +export default function AnalysisResult({ data }: AnalysisResultProps) { + const getScoreColor = (score: number) => { + if (score >= 80) return 'text-green-600'; + if (score >= 60) return 'text-yellow-600'; + return 'text-red-600'; + }; + + const getScoreLevel = (score: number) => { + if (score >= 80) return 'Excellent - Ready for opportunities!'; + if (score >= 60) return 'Good - Getting there!'; + if (score >= 40) return 'Fair - Some work needed'; + return 'Needs Improvement - Focus on skill development'; + }; + + return ( +
+ {/* Readiness Score Card */} +
+
+
+

+ + Career Readiness Score +

+

+ {(data.readiness_score ?? 0)}/100 +

+

+ {getScoreLevel(data.readiness_score ?? 0)} +

+
+
+

+ Based on your current skills vs required skills +

+
+
+
+ + {/* Skills Analysis */} + + + {/* Recommended Roles */} +
+

+ + Recommended Job Roles +

+
+ {(data.roles ?? []).map((role, idx) => ( + + {role} + + ))} +
+
+ + {/* Learning Roadmap */} + + + {/* Project Suggestions */} + + + {/* Interview Questions */} + +
+ ); +} \ No newline at end of file diff --git a/kits/assistant/ai-career-copilot/components/CareerAnalysisForm.tsx b/kits/assistant/ai-career-copilot/components/CareerAnalysisForm.tsx new file mode 100644 index 00000000..44d06d0e --- /dev/null +++ b/kits/assistant/ai-career-copilot/components/CareerAnalysisForm.tsx @@ -0,0 +1,215 @@ +'use client'; + +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { useState } from 'react'; + +interface CareerAnalysisFormProps { + onSubmit: (resumeText: string, domain: string) => Promise; +} + +// βœ… Zod schema (validation) +const formSchema = z.object({ + resumeText: z + .string() + .min(1, 'Please paste your resume text') + .min(50, 'Please provide at least 50 characters of resume text for accurate analysis'), + domain: z.string().min(1, 'Please select your target domain'), +}); + +type FormData = z.infer; + +// Common domains suggestions +const suggestedDomains = [ + 'Frontend Development', + 'Backend Development', + 'Full Stack Development', + 'Data Science', + 'Machine Learning', + 'DevOps', + 'Cloud Architecture', + 'Mobile Development', + 'UI/UX Design', + 'Product Management', + 'Cybersecurity', + 'Quality Assurance', +]; + +export default function CareerAnalysisForm({ onSubmit }: CareerAnalysisFormProps) { + const [charCount, setCharCount] = useState(0); + const [selectedSuggestion, setSelectedSuggestion] = useState(''); + + const { + register, + handleSubmit, + formState: { errors, isSubmitting }, + setValue, + watch, + } = useForm({ + resolver: zodResolver(formSchema), + defaultValues: { + resumeText: '', + domain: '', + }, + }); + + const resumeTextValue = watch('resumeText'); + + const onFormSubmit = async (data: FormData) => { + await onSubmit(data.resumeText, data.domain); + }; + + const handleDomainSuggestion = (domain: string) => { + setSelectedSuggestion(domain); + setValue('domain', domain); + }; + + const handleResumeChange = (e: React.ChangeEvent) => { + setCharCount(e.target.value.length); + register('resumeText').onChange(e); + }; + + return ( +
+ {/* Resume Input */} +
+ +
+