Giter Site home page Giter Site logo

heatmap's Introduction

โš ๏ธ We do not recommend to use this in production yet as many things are subject to change.

Heatmap screenshot

Heatmap

Welcome to Heatmap, the open-source software for your heatmapping needs ๐Ÿ–ฅ

Features

  • Click tracking
  • Movement tracking

Requirements

  • PHP >= 8.1
  • Database (MySQL, PostgreSQL)
  • Ability to configure x-frame options in your website

Installation

First set up a database, and remember the credentials.

git clone https://github.com/ploi-deploy/heatmap.git
composer install
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate

Now edit your .env file and set up the database credentials, including the app name you want.

php artisan heatmap:install

And login with the credentials you've provided, the user you've created will automatically be admin.

Deployment

To manage your servers and sites, we recommend using Ploi.io to speed up things, obviously you're free to choose however you'd like to deploy this piece of software ๐Ÿ’™

That being said, here's an deployment script example:

cd /home/ploi/example.com
git pull origin main
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
echo "" | sudo -S service php8.1-fpm reload

php artisan route:cache
php artisan view:clear
php artisan migrate --force

npm ci
npm run production

echo "๐Ÿš€ Application deployed!"

Alternatively you can also use the upgrade command to clean up your deployment script:

cd /home/ploi/example.com
git pull origin main
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
echo "" | sudo -S service php8.1-fpm reload

php artisan heatmap:upgrade

npm ci
npm run production

echo "๐Ÿš€ Application deployed!"

If you're using queue workers (which we recommend to do) also add php artisan queue:restart to your deployment script.

Setting up your webserver to allow X-Frame-Options

Chances are, when you're setting up the heatmap software and trying to display the heatmap you'll encounter an error like:

Refused to display 'https://yourwebsite.com' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

This means, it won't allow external iframes to load in your website. Luckily, this is easily solvable.

NGINX

If you have this line in your NGINX host configuration, either remove it, or put it in comments:

add_header X-Frame-Options "SAMEORIGIN";

to (or remove)

#add_header X-Frame-Options "SAMEORIGIN";

Next add this piece of code inside the server{} block:

add_header Content-Security-Policy "frame-ancestors 'self' https://your-heatmap-address.com";

Obviously, replace your-heatmap-address.com with the actual domain where your heatmap is hosted.

Apache

TODO

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Sponsor

We appreciate sponsors, we still maintain this repository, server, emails and domain. You can do that here. Each sponsor gets listed on in this readme.

Credits

License

The MIT License (MIT). Please see License File for more information.

heatmap's People

Contributors

cannonb4ll avatar stayallive 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.