faberNovel / heart

A command-line tool to industrialize web quality measurement

Home Page:https://heart.fabernovel.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

Heart is a modular command-line tool written in Node.js that centralize the analyse of webpages using different third-party services, like Google Lighthouse, ecoIndex or Mozilla Observatory.

Moreover, it can also store the results of these analysis and notify you when they are over.

Usage

I want to:

  • analyze https://heart.fabernovel.com/ using the Google Lighthouse service.
  • be notified on the #heart Slack channel when the analysis is over.
  • check if the score reach a minimum of 85.

Standalone

  1. Install the packages

    npm install @fabernovel/heart-cli @fabernovel/heart-lighthouse @fabernovel/heart-slack
  2. Configure the Slack module

    echo SLACK_API_TOKEN=My_Slack_Api_Token >> .env
  3. Start an analysis

    npx heart lighthouse --inline '{"url":"https://heart.fabernovel.com/"}' --threshold 85

Github Action

If you're using Github, you can simplify the integration of Heart in your CI scripts by using the Github Action.

Design

Heart has been designed to be as light as possible, which explains its modular structure: you only install what you need.

Modules types

To do so, Heart is divided in 3 types of modules:

Type Mission Example
Runner Starts an analysis using a CLI or an API
Analysis Analyzes URLs using third-party services using Mozilla Observatory
Listener Do thing with the results of the analysis send them into a Slack channel

The minimum setup you need to run Heart, is to have the Heart CLI runner module and a single analysis module.

Modules list

Name Type Purpose
Heart API Runner Exposes an HTTP API that starts an analysis when it is requested
Heart CLI Runner Control the other modules by using a CLI
Heart GreenIT Analysis Analyzes URLs with GreenIT Analysis
Heart Lighthouse Analysis Analyzes URLs with Google Lighthouse
Heart Observatory Analysis Analyzes URLs with Mozilla Observatory
Heart SSL Labs Server Analysis Analyzes URLs with Qualys SSL Labs Server
Heart BigQuery Listener Stores the results of the analysis into a Google BigQuery table
Heart Slack Listener Sends the results of the analysis to a Slack channel

About

A command-line tool to industrialize web quality measurement

https://heart.fabernovel.com

License:MIT License


Languages

Language:TypeScript 62.4%Language:JavaScript 36.9%Language:Shell 0.4%Language:Smarty 0.3%