GithubHelp home page GithubHelp logo

kupo's Introduction

kupo Build Status

A simple site launch checklist checker (for the lack of a better name).

Screen record

Why

After (or is it before?) launching a new site, you often want to validate it against a checklist and make sure the title is filled, gzip is enabled, robots.txt and sitemap.xml are all there etc. kupo is built to help you with this tedious task. Just key in the site's address, hit ENTER, and it will check for:

Install

As this tool is built on top of Vue and Laravel, your environment must meet their requirements. You'll also need a decent Node version (mine is v9.11.2) and yarn. Now from your command line, execute this bunch of commands:

git clone https://github.com/phanan/kupo.git
cd kupo
composer install
php artisan kupo:init
php artisan serve
// kupo should now have been started at http://localhost:8000/

Extend

Depending on your needs, you may want to add more rules into kupo. In order to do so, just follow these certain steps:

  1. Create a new Rule class: php artisan make:rule FunnyBunnyMustBeSeen
  2. Open app\Rules\FunnyBunnyMustBeSeen.php and fill the class with your logic. Basically, you'll need to make sure check() returns a truthy/falsy value, indicating if the rule passes/fails. Other methods should be self-explanatory.
  3. Now add App\Rules\FunnyBunnyMustBeSeen::class to the array found in config/customRules.php
  4. That should be it!

Contribute

If you feel like a certain rule should be added, please contribute! Just fork and follow the same steps as described in the above "Extend" section, except the file in step 3 should be config/rules.php instead. Create a passing test, make a PR, and I'll be more than happy to consider. Of course, bug fixes and any other kind of contributions are welcome, too!

License

MIT © Phan An

kupo's People

Contributors

barryvdh avatar dependabot[bot] avatar hbakhtiyor avatar phanan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kupo's Issues

Feature: Valid SSL rule

To follow up #12, as suggested by @barryvdh: Implement rule to validate SSL. It's 2017, so every site should come with a valid SSL certificate. We might as well issue a notice/warning if the cert is expiring in less than 30 days.

This package looks promising, but requires PHP7+. As such, if this rule is implemented, kupo must be bumped up one major version.

The Mix manifest does not exist.

Everything seemed to install properly per the instructions but pages load when trying to get the resources.

ErrorException in helpers.php line 571:
The Mix manifest does not exist. (View: resources/views/app.blade.php)

I'm on Ubuntu, with 4.x version of node that's packaged.

Nginx

Hi there,

is there any chance to use it on nginx?

Thank you

URLs checklist

This is a fantastic tool!

Some times the new site is just a modern replacement for an old-style site.
In this cases it is useful to check that all old URLs are properly redirected (301) to a new valid location.

Allow to check multiple URLs (by uploading a file, or a <textarea>)

Every Url MUST:

  • Return status code 2xx or 3xx
  • If returns 301 or 302, then the destination url must be validated too (if the destination domain is equal to the tested one)
  • The redirect's destination cannot be same as the source

Extra check:

  • Non-existent urls must return status code 404, and possibly don't be blank.
    If a page has less than 60 characters, it can be considered blank.

Ideas

Nice tool :)
I was building something similar in house, but didn't get around to building a nice UI around it.

Some suggestions/ideas that I was thinking of:

  • Add the PSR-7 Response to the Rule for headers/statuscodes etc.
  • Perhaps it could be simplified to return multiple statuses, eg. besides success or fail, it could also be a warning or dynamic. In this case we could dynamically set the message and return that, but feels cumbersome (but no biggy)

Some ideas for checks (besides my PRs)

Run in homestead?

This is not a bug, but just a simple question. I tried to add this to my homestead yaml file so I could just always access it at kupo.app, but I can't seem to get it to work. Is php artisan serve currently the only way to use the checker?

Make it listen on 0.0.0.0

Sorry for what it is surely a silly or noob question but i can't find my way to make php artisan serve listen on wildcard address (0.0.0.0) rather than localhost (127.0.0.1)

Thanks.

Feature: score + api

It would be nice to have some sort of 'score' to the results and a total score. For example, passed rule = 10 points, notice 9, warning 7, error 4, critical 0. Then sort the results in order of lowest score (most critical on top) and calculate the total score percentage to give the website a score.

That score could be also used to automate it a bit for an Api, eg call it with a list of rules, use a down to check them periodically, integrate with other services etc.

Undefined property: DOMDocument::$documentElement in symfony/dom-crawler

Not a bug, but a question. When installing on a Ubuntu 14.04 /Nginx with php7, I am getting an error when entering a site in the checker:

(1/1) ErrorException
Undefined property: DOMDocument::$documentElement

the error is occuring in vendor/symfony/dom-crawler/Crawler.php', 277

dom-crawler is up to date, symfony/polyfill-mbstring and symfondy/css-selector have been installed. php-xml and libxml2 have also been installed.

Any idea what I could be missing?

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.