Giter Club home page Giter Club logo

lighthousecollect's Introduction

Lighthouse Collect ( WIP )

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

here is UI demo

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

lighthousecollect's People

Contributors

mutebg avatar

Stargazers

Taras Galkovskyi avatar Diego avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.