Batch Analyzer is a professional, open-source solution for running Google Lighthouse performance audits on multiple URLs in batch. It features a robust Rust CLI for automated report generation and a modern Next.js web UI for interactive analysis and visualization.
- 🚀 Batch Processing: Analyze hundreds of URLs in a single run
- 📁 Organized Output: Timestamped directories for each batch
- 🏷️ Custom Naming: Prefix output directories for easy identification
- 🔧 Headless Mode: Chrome runs headless for server environments
- 📊 HTML Reports: Detailed Lighthouse HTML reports per URL
- 🛡️ Safe Filenames: URLs are converted to safe, unique filenames
- 📂 Custom Reports Directory: Flexible output location
- 🎯 Customizable Prefixes: Set custom report file prefixes
- 🧪 Comprehensive Testing: Full test suite for reliability
- 🌐 Web UI: Modern dashboard for browsing, filtering, and downloading reports
- Rust (latest stable)
- Node.js (18+)
- npm or bun
- Google Lighthouse (globally installed)
- Google Chrome
- Clone the repository:
git clone <repository-url> cd batch-analyzer
- Build the Rust CLI:
cargo build --release # Binary at target/release/batch_analyzer - Set up the Web UI:
cd web-ui npm install # or bun install npm run build npm start # Visit http://localhost:3000
- Basic:
./target/release/batch_analyzer --name "my-analysis" - Custom URL file and output directory:
./target/release/batch_analyzer --name "audit" --file "custom-urls.txt" --reports-dir "custom-reports"
- Environment file:
cp .env.example .env # Edit .env for defaults ./target/release/batch_analyzer
--name, -n: Prefix for output directory (or setBATCH_ANALYZER_NAMEin.env)--file, -f: URL list file (default:urls.txt)--reports-dir, -r: Output directory (default:reports)
BATCH_ANALYZER_NAME: Default output directory prefixBATCH_ANALYZER_REPORT_PREFIX: Report file prefix (default:report)
One URL per line:
https://github.com
https://www.google.com
reports/{name}_{YYYYMMDD_HHMMSS}/
├── report_www_google_com__abc123.html
└── ...
- Start the dashboard:
cd web-ui npm run dev # or npm start for production
- Features:
- Dashboard overview of all analysis runs
- Drill down into individual page metrics
- Download and view original Lighthouse HTML reports
- Responsive, modern design (dark/light mode)
- Multi-stage Dockerfile for full-stack deployment
- Railway: One-click deploy with both CLI and Web UI
- See
RAILWAY_DEPLOYMENT.mdfor full cloud deployment instructions
- Build CLI:
cargo buildorcargo build --release - Run tests:
cargo test - Format:
cargo fmt - Lint:
cargo clippy - Web UI:
npm run devinweb-ui/
- Ensure Lighthouse and Chrome are installed and in your PATH
- For headless servers, Chrome must run with
--no-sandbox - See the Troubleshooting section in the CLI and Web UI READMEs for more
MIT License. See LICENSE.
Contributions are welcome! Please fork, branch, and submit a Pull Request.
- [Your Name Here]
- Built with Rust, Next.js, and Google Lighthouse
- Inspired by the open-source web performance community