Skip to content

Detect open-source libraries and their licenses on web pages. Analyze compatibility risks instantly for safer development.

License

Notifications You must be signed in to change notification settings

mustafaer/developer-license-detector

Repository files navigation

Developer License Detector

License: GPL v3 Chrome Web Store

A powerful Chrome extension that automatically detects open-source libraries and their licenses on web pages, helping developers identify potential license compatibility issues before they become legal problems.

🎯 Overview

Developer License Detector scans web pages to identify JavaScript libraries, CSS frameworks, and other open-source components, then analyzes their licenses for compatibility with your project's license. This helps developers:

  • Prevent License Violations: Identify incompatible licenses before integrating code
  • Ensure Compliance: Stay compliant with open-source licensing requirements
  • Save Time: Automatically detect libraries without manual inspection
  • Make Informed Decisions: Understand licensing implications of your dependencies

✨ Features

πŸ” Multi-Method Detection

  • Script Tag Analysis: Detects libraries from <script> tags with URL pattern matching
  • Global Object Detection: Identifies libraries through their global JavaScript objects
  • Link Tag Analysis: Detects CSS frameworks and stylesheets
  • Font Library Detection: Identifies web font services (Google Fonts, etc.)

πŸ“Š License Analysis

  • SPDX Compliance: Uses official SPDX license identifiers
  • Compatibility Checking: Analyzes license compatibility with your project
  • Risk Assessment: Categorizes compatibility as compatible, incompatible, or unknown
  • Detailed Explanations: Provides context for each compatibility decision

🎨 User Interface

  • Clean, Modern Design: Intuitive popup interface
  • Real-time Analysis: Instant results on any web page
  • Filtering Options: View all libraries, or filter by compatibility status
  • Detailed Information: Version numbers, license info, and detection methods
  • Statistics Dashboard: Overview of detected libraries and compatibility status

βš™οΈ Customization

  • Project License Selection: Configure your project's license for accurate analysis
  • Persistent Settings: Settings saved across browser sessions
  • Export Capabilities: Export detection results for documentation

πŸš€ Quick Start

Installation

From Chrome Web Store (Recommended)

  1. Visit the Chrome Web Store listing (coming soon)
  2. Click "Add to Chrome"
  3. Confirm the installation

Manual Installation (Developer Mode)

  1. Download or clone this repository:
    git clone https://github.com/mustafaer/developer-license-detector.git
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in top right)
  4. Click "Load unpacked"
  5. Select the developer-license-detector directory
  6. The extension icon will appear in your toolbar

Building from Source

To create a distributable package:

# Clone the repository
git clone https://github.com/mustafaer/developer-license-detector.git
cd developer-license-detector

# Make the build script executable
chmod +x build.sh
# Build the extension
./build.sh

# Or using npm
npm run build

The packaged extension will be in build/dist/ as a zip file, ready for Chrome Web Store upload. See BUILD.md for detailed build options and instructions.

Usage

  1. Navigate to any web page you want to analyze
  2. Click the extension icon in your Chrome toolbar
  3. View detected libraries and their licenses
  4. Select your project's license from the dropdown (defaults to MIT)
  5. Review compatibility analysis and risk assessments
  6. Filter results by compatibility status if needed

πŸ“– Documentation

πŸ”§ How It Works

  1. Detection Phase: When you click the extension icon, multiple detection strategies scan the page:

    • Script tags are analyzed for CDN URLs and known patterns
    • Global JavaScript objects are inspected for library signatures
    • Link tags are checked for CSS frameworks
    • Font services are identified from stylesheet URLs
  2. Enhancement Phase: Detected libraries are matched against a database of known libraries:

    • Official names and versions are retrieved
    • Homepage and repository URLs are added
    • License information is fetched from SPDX database
  3. Analysis Phase: License compatibility is evaluated:

    • Your project's license is compared against each dependency
    • Compatibility matrix determines if licenses are compatible
    • Risk levels are assigned (compatible, incompatible, unknown)
    • Detailed explanations are generated
  4. Display Phase: Results are presented in an organized interface:

    • Libraries grouped by detection method
    • Color-coded compatibility indicators
    • Detailed metadata and links
    • Summary statistics

πŸŽ“ Supported Libraries

The extension can detect 100+ popular libraries including:

JavaScript Libraries

  • React, Vue, Angular, Svelte
  • jQuery, Lodash, Underscore
  • D3.js, Chart.js, Three.js
  • Axios, Moment.js, Date-fns
  • And many more...

CSS Frameworks

  • Bootstrap, Tailwind CSS
  • Material Design, Bulma
  • Foundation, Semantic UI

Fonts

  • Google Fonts
  • Adobe Fonts
  • Font Awesome

See data/known-libraries.json for the complete list.

πŸ“œ License Compatibility

The extension uses a comprehensive compatibility matrix based on:

  • SPDX License List: Official standardized license identifiers
  • FSF Compatibility Guidelines: Free Software Foundation recommendations
  • OSI Recommendations: Open Source Initiative guidance
  • Legal Precedents: Established compatibility interpretations

Supported License Types

  • Permissive: MIT, Apache-2.0, BSD licenses
  • Copyleft: GPL family, LGPL, AGPL
  • Weak Copyleft: MPL-2.0, EPL-2.0
  • Public Domain: Unlicense, CC0-1.0
  • And more...

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Reporting bugs
  • Suggesting features
  • Submitting pull requests
  • Code style guidelines
  • Development setup

πŸ› οΈ Development

Prerequisites

  • Chrome browser (version 88 or higher)
  • Basic knowledge of JavaScript and Chrome Extension APIs
  • Git for version control

Setup

# Clone the repository
git clone https://github.com/mustafaer/developer-license-detector.git
cd developer-license-detector

# Load extension in Chrome (see Installation section above)
# Make changes to the code
# Reload extension in chrome://extensions/

Project Structure

developer-license-detector/
β”œβ”€β”€ analyzers/          # License compatibility analysis
β”œβ”€β”€ background/         # Service worker for background tasks
β”œβ”€β”€ content/            # Content scripts injected into pages
β”œβ”€β”€ data/              # JSON databases and configuration
β”œβ”€β”€ detectors/         # Library detection strategies
β”œβ”€β”€ icons/             # Extension icons
β”œβ”€β”€ popup/             # User interface (HTML, CSS, JS)
└── utils/             # Helper utilities

Testing

# Run basic tests
npm test

# Manual testing
# 1. Load extension in Chrome
# 2. Visit test page: test-page.html
# 3. Click extension icon
# 4. Verify detections

πŸ› Known Issues

  • Some obfuscated or bundled libraries may not be detected
  • License information depends on external APIs (requires internet)
  • Chrome internal pages (chrome://, chrome-extension://) cannot be analyzed
  • Some dynamically loaded libraries may require page refresh

See TROUBLESHOOTING.md for solutions to common problems.

πŸ“Š Roadmap

Version 1.1

  • Firefox support
  • Detection of npm/yarn lock files
  • Package.json analysis for Node.js projects
  • Improved version detection accuracy

Version 2.0

  • Custom license compatibility rules
  • Export reports (PDF, CSV, JSON)
  • GitHub integration
  • License change notifications
  • Historical tracking

πŸ“« Support

πŸ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Why GPL-3.0?

We chose GPL-3.0 to ensure that:

  • The software remains free and open source
  • Modifications and derivatives are also open source
  • Users have the freedom to study, modify, and distribute the code
  • The community can benefit from improvements

πŸ™ Acknowledgments

  • SPDX: For maintaining the standardized license list
  • Open Source Initiative: For license compatibility guidance
  • Contributors: Everyone who has contributed to this project
  • Community: All users who report issues and provide feedback

⭐ Show Your Support

If you find this extension useful, please:

  • ⭐ Star this repository
  • πŸ› Report bugs and issues
  • πŸ’‘ Suggest new features
  • πŸ”€ Submit pull requests
  • πŸ“’ Share with other developers

Made with ❀️ by Mustafa ER

Helping developers navigate the complex world of open-source licensing, one web page at a time.