Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mutebg/lighthousecollect

Google Lighthouse as a web service, collect audits, set goals and receive notifications.
https://github.com/mutebg/lighthousecollect

developer-tools performance performance-audit performance-monitoring pwa web-performance

Last synced: 24 days ago
JSON representation

Google Lighthouse as a web service, collect audits, set goals and receive notifications.

Awesome Lists containing this project

README

        

# Lighthouse Collect ( WIP )

Run Google Lighthouse as a web service, collect audits, create charts, set goals and receive notifications.

[here is UI demo](http://lighthousecollect.westeurope.cloudapp.azure.com:3000/)


## Getting Started

### Requirements

There is docker image, so everything runs inside docker container. The only requirements is to have docker installed.

### Run project

There are 3 environment files (.env.dev .env.local .env.prod )
You need to configure them.

#### Running without docker

You will need local mongodb for that

```
./start.sh local
```

#### Running docker in dev mode

With hot-reloading and nodemon

```
./start.sh dev
```

#### Running docker in dev mode

```
./start.sh prod
```

## How To

In order to use LighthouseCollect you need to make POST request to http://yourserver.com/api/do

Example payload ( needs application/json header )

config.json

```
{
"project": "github",
"task": 1
"urls": [
{
"url": "https://github.com/",
"options": {}
},{
"url": "https://github.com/mutebg",
"options": {
"lookup": ["Stoyan Delev"]
}
}
],
"options": {
"lookup": [
"Terms",
"Privacy"
],
"notifications": {
"when": "fail",
"email": "[email protected]"
},
"goals": {
"categories": [
{"name": "SEO", "value": 80},
{"name": "Performance", "value": 80}
],
"audits": [
{"name": "viewport", "value": 30}
]
}
}
}
```

### Example usage

You can save your configuration in json file and use CURL to send it

```
curl -H "Content-Type: application/json" --data @config.json http://yourserver.com/api/do
```

### Options

* lookup: search for strings inside html
* goal: set your target goals, per category and/or per audit
* notifications: send email notification
* when: one of always, never, fail, success
* email: email address