How duybaohuynhtan/careeragent works
Project Type & Purpose
• This is a full-stack, AI-powered career assistant (“CareerAgent”) with a React/Next.js frontend, a FastAPI backend, and an agentic layer built with LangChain and Groq.
• Purpose: Parse an uploaded resume, extract structured data, then perform a LinkedIn job search via Google CSE, all orchestrated through a conversational chat interface.
File-Structure Analysis
• Top level:
• backend/ – Python code: FastAPI server (fastapi_server.py), agent logic (job_search_agent.py), CV parser tools, LinkedIn search tools, config, schema, models.json
• frontend/ – Next.js app (TypeScript, Tailwind CSS), components (ChatInterface, ChatInput, FileUpload, ModelSelector, ChatMessage), client-side API wrappers (api.ts), global layout and page
• tester/ – Jupyter notebooks for end-to-end and unit tests
• Patterns:
• Layered architecture (UI → API → Agent → Tools → External Services)
• Tool-based agent pattern in LangChain
README Insights
• Frontend → FastAPI /chat and /upload endpoints
• FastAPI → JobSearchAgent (LangChain)
• Agent → CV Parser Tool (PyPDF2 + Groq) and LinkedIn Search Tool (Google CSE)
• External services: Groq LLM API, Google Custom Search API
• Tech stack is clearly listed under Backend and Frontend sections.
• User’s Browser / Mobile App (React/Next.js UI)
• Frontend Components: ChatInterface, FileUpload, ModelSelector
• API Layer: FastAPI Server (fastapi_server.py)
• Agent Core: JobSearchAgent (job_search_agent.py)
• Tool Modules:
• CV Parser Tool (cv_parser_tool.py + PyPDF2 + Groq API)
• LinkedIn Search Tool (linkedin_job_search_tool.py + Google CSE API)
• External Services: Groq LLM Service, Google Custom Search Engine
• Data Artifacts: Uploaded PDF (MyCV.pdf), Structured Resume Data, Job Listings
• User → Frontend UI (user types, uploads PDF)
• Frontend (ChatInput/FileUpload) → HTTP POST → FastAPI (/chat, /upload)
• FastAPI → instantiates JobSearchAgent → calls Tool Modules
• CV Parser Tool → reads PDF → extracts text via PyPDF2 → sends text to Groq LLM → returns structured data
• LinkedIn Search Tool → issues queries to Google CSE → receives job listings
• JobSearchAgent → aggregates tool outputs → returns chat response → FastAPI → HTTP response → Frontend displays in ChatInterface
c. Architectural Patterns & Design Principles:
• Layered separation: UI / API / Domain / Infrastructure
• Agentic design: single “JobSearchAgent” coordinating multiple tools
• Micro-tool pattern: each tool with single responsibility (parsing vs. searching)
• Stateless, request-driven flow (HTTP in, HTTP out)
d. Key Technologies & Frameworks:
• Frontend: Next.js, React, TypeScript, Tailwind CSS
• Backend: Python, FastAPI, Uvicorn, python-dotenv
• LLM / Agent: LangChain, LangChain-Groq, Groq API
• PDF Parsing: PyPDF2
• External Search: Google Custom Search API