https://github.com/jackd248/lighthouse-garden
Monitoring performance data for websites using the lighthouse service
https://github.com/jackd248/lighthouse-garden
Last synced: over 1 year ago
JSON representation
Monitoring performance data for websites using the lighthouse service
- Host: GitHub
- URL: https://github.com/jackd248/lighthouse-garden
- Owner: jackd248
- Created: 2020-01-18T21:57:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-16T11:19:39.000Z (about 2 years ago)
- Last Synced: 2025-02-23T23:47:37.817Z (over 1 year ago)
- Language: Jinja
- Homepage:
- Size: 1.03 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Lighthouse Garden


[](https://scrutinizer-ci.com/g/jackd248/lighthouse-garden/?branch=master)
[](https://scrutinizer-ci.com/g/jackd248/lighthouse-garden/build-status/master)
Aggregate a performance overview for various target pages using the [Google Lighthouse](https://github.com/GoogleChrome/lighthouse) service.

## Features
- Track multiple target pages
- Lighthouse audits for performance, accessibility, best practices and SEO
- Average performance data
- History performance graph with stored lighthouse reports
- Informational badges: 
- Performance trend indicator
## Installation
### Prerequisite
The script needs [python](https://python.org/) __3.5__ or higher. It is necessary for some additional functionalities to have [pip](https://pypi.org/project/pip/) installed on your local machine.
### pip
The library can be installed from [PyPI](https://pypi.org/project/lighthouse-garden-kmi):
```bash
$ pip3 install lighthouse-garden-kmi
```
### Configuration
The configuration file contains important information about the script processing and target pages.
```json
{
"export_path": "path/to/export/",
"keep_history": 10,
"targets": [
{
"title": "Google",
"identifier": "google",
"url": "https://www.google.com"
}
]
}
```
## Usage
Run the python script via command line.
```bash
$ python3 lighthouse_garden
```
```bash
usage: lighthouse_garden [-h] [-v] [-c CONFIG] [--clear]
Monitoring performance data by lighthouse.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Enable extended console output
-c CONFIG, --config CONFIG
Path to config file
--clear Clear all performance data and reset the application
```

### Cronjob
Register optionally a cronjob for regularly updates
```bash
0 5 * * * python3 lighthouse_garden -c /var/www/html/config.json
```
## Test
Run the script within the [DDEV](https://www.ddev.com/) container:
```bash
$ ddev start
$ ddev ssh
/var/www/html$ pip3 install -r requirements.txt
/var/www/html$ python3 lighthouse_garden -c tests/config.json
```
Open `http://lighthouse-garden.ddev.site/`
## Build
The packaging process of the python module is described on [python.org](https://packaging.python.org/tutorials/packaging-projects/).
## Credits
- Performance analysis by [lighthouse](https://github.com/GoogleChrome/lighthouse)
- Graph visualization by [plot.ly](https://plot.ly/javascript/)
- Icon made by [freepik](https://www.flaticon.com/authors/freepik)