Skip to content

A lighthouse score tracking tool in Go, with Svelte widgets for displaying the results.

License

Notifications You must be signed in to change notification settings

Recidvst/go_lighthouse

Repository files navigation

Go Lighthouse Tool

A lighthouse score tracking tool in Go, SQLite and React/Svelte.

  • Go REST API and cron for fetching website performance scores with the Google Lighthouse CLI tool . Data saved locally in the app with SQLite.
  • React & Svelte widgets for displaying the results.

Very much in progress..

TODO:

  • Test suite (Go testing package)
  • Add basic templates for viewing response directly
  • Fix bug where date_fetched and date_edited in DB are in different timezones (GMT / BST)
  • Fix bug where temporary CLI results file is not always removed.
  • Decide how to handle description field in the site table.
  • Code needs a bit of a tidy in terms of structure and organised comments

Endpoints

GET /

Check if the API is up

GET /website?url=https://github.com/

Fetch the latest report saved in the DB for a specific website

Params:

url String (required) (url param)

GET /websites

Fetch the latest report saved in the DB for all registered websites

Params:

url String (required) (url param)

POST /website

Trigger a refetch of the report for a specific website

Params:

url String (required) (url param)

POST /websites

Trigger a refetch of the report for all registered websites

Params:

n / a

GET /view/website?url=https://github.com/

View the latest report for a specific website

Params:

url String (required) (url param)

GET /view/websites

View the latest reports for all registered websites

Params:

TBC

About

A lighthouse score tracking tool in Go, with Svelte widgets for displaying the results.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published