How v4lkyr13101/linkedin-profile-analyser works
Project Type and Purpose
• This is a browser extension aimed at enhancing LinkedIn profile pages by injecting a sidebar interface, extracting profile content, and sending data to Google AI services for interactive analysis.
• The README indicates features like model selection (gemmi-3-27b-it, gemini-2.0-flash), API key management, and custom questions, making it primarily a frontend enhancement tool running in Chrome.
File Structure
• Key Extension Files/Components:
• background.js: Likely coordinates long-running background tasks and manages runtime events.
• content.js: Injects scripts that scrape LinkedIn’s DOM to extract the current profile’s content.
• popup.html and popup.js: Provide the settings UI for entering the API key and selecting a model.
• sidepanel.html and sidepanel.js: Build the sliding sidebar interface for displaying custom questions and analysis results.
• styles.css: Contains styling for the extension’s UI components.
• Ancillary Files:
• attached_assets: Contains some assets/logs possibly used for debugging or additional styles.
• web_scraper.py and pyproject.toml: Suggest the existence of a Python helper tool (e.g., for local web scraping or testing) that complements the main extension logic, though the README does not cover its usage in the Chrome context.
Architectural Components and Their Relationships
• Main Components:
a. User Interface Components:
• Popup UI: Letting users configure settings.
• Sidepanel UI: Displayed on LinkedIn profiles to show AI analysis and custom question options.
b. Core Scripts:
• Background Script: Acts as the orchestrator, listening for events (such as browser actions) and managing storage.
• Content Script: Injected into LinkedIn pages to extract relevant profile data.
c. External Integration:
• Google AI API: Receives extracted profile data and returns analysis results.
• Additional Component:
• Python Utility (web_scraper.py): Though not central to the extension’s runtime in Chrome, it can be seen as a supporting module for standalone scraping tasks or testing.
Key Interactions
• Settings are stored locally (using Chrome’s storage API).
• When the user navigates to a LinkedIn profile:
• content.js extracts profile content and may trigger sidepanel.html/sidepanel.js to expand automatically.
• The extracted data is then sent (via background.js) to the Google AI API.
• Results are displayed back on the side panel and/or stored for later reference.
• Optionally, web_scraper.py might be used outside of Chrome for similar scraping verification or utility functions.