phantomas — Collects web performance metrics using a headless browser to find site speed issues.

Analyzed by · Web Performance · Monitoring · View on GitHub

What It Is

phantomas is a web performance metrics collector that uses Headless Chromium. Think of it as a robot browser that visits your website and systematically reports on how fast each element loads, what resources are requested, and potential bottlenecks. It's modular, meaning it can gather a wide array of specific data points about a page's performance.

In today's web, slow websites lose users, impact SEO rankings, and reduce conversion rates. phantomas helps pinpoint the exact technical issues dragging down a site's speed, from oversized images and inefficient JavaScript to complex CSS selectors, allowing developers and businesses to take targeted action to improve user experience and achieve business goals.

phantomas GitHub repository card

License Verdict

BSD-2-Clause License — Build and Sell Freely — Commercial Use Approved • Permissive Open Source

The BSD-2-Clause license is highly permissive. You are free to use, modify, and distribute this software for commercial purposes without any copyleft restrictions. The only requirement is to retain the original copyright notice and license text, and not to use the names of the contributors to endorse your product without specific prior written permission.

How to Use It

To get started, install phantomas via npm. This will also install a compatible version of Chromium. You can then use it as a CommonJS module in your Node.js projects to collect performance metrics from any URL programmatically.

Prerequisites:

Estimated setup time: 5 minutes.

npm install phantomas

# Example usage in a JS file (e.g., test.js)
# const phantomas = require('phantomas');
# phantomas('http://example.com/').then(results => console.log(results.getMetrics()));
# node test.js

What I'd Build With This

Performance Budget Monitor for Web Agencies (micro-saas)

Offer a simple service for small web design/development agencies to set and monitor performance budgets for their client websites. phantomas can run daily checks and alert agencies when a site exceeds its defined budget (e.g., page load time, number of requests, image size). Agencies pay for peace of mind and proactive client management.

Effort: 3-4 Weeks Build Time · Target: Web Design & Dev Agencies · Pricing: $49/mo per client site

Continuous Web Performance Regression Testing (saas)

Build a SaaS platform that continuously monitors web performance metrics for e-commerce sites or high-traffic blogs. Integrate phantomas into a CI/CD pipeline or schedule regular scans, comparing results against previous deployments to detect performance regressions early. Offer detailed reports, historical data, and alerts for critical performance drops. Businesses pay to prevent costly performance issues.

Effort: 2-3 Months Build Time · Target: E-commerce Managers, DevOps Teams · Pricing: $199-$499/mo

Internal Web Application Performance Audit Platform (enterprise)

Develop an on-premise or private cloud solution for large enterprises to audit the performance of their internal web applications and dashboards. phantomas can be configured to run against authenticated internal sites, providing IT and development teams with crucial data on application responsiveness and resource usage, ensuring internal tools meet performance SLAs. This is a custom integration play.

Effort: 4-6 Months Build Time · Target: Large Enterprises (IT Depts) · Pricing: $5,000+/mo (custom pricing)

Sai Pavan Gopularam's Take

Web performance is one of those 'always important' topics that often gets overlooked until a problem hits. phantomas gives you the raw data you need to be proactive. I see a clear path to generating $500-$1000/month by offering a simple, automated performance monitoring service to small businesses who don't have dedicated performance engineers.

Watch Out For

I break down trending repos like phantomas every week — join the newsletter.

Browse all free repo breakdowns