GithubHelp home page GithubHelp logo

rafe95 / visitorbadgereloaded Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nathan13888/visitorbadgereloaded

0.0 0.0 0.0 126 KB

A Visitor Badge made with Golang that prioritizes performance and customizability. README for more details.

Home Page: https://visitor-badge-reloaded.herokuapp.com/

License: MIT License

Dockerfile 4.97% Go 87.80% Makefile 5.08% Shell 2.15%

visitorbadgereloaded's Introduction

Visitor Badge Reloaded

Coverage Status

Visitor Badge Reloaded is a project inspired by visitor-badge which is no longer maintained, unfortunately.

In addition, it was missing some features which made it feel incomplete to me. It was also written using Python which I'm personally not a huge fan of, especially when used as a REST api.

Hence, something of better performance and functionality must be made!


VBR Visitor-Badge
Programming Language Golang Python
Performance Arguably better? Mux router is quick at matching and generation functions are optimized. Caching is available as well. Flask... ๐Ÿค”
Features There are many additional features for customizability... Select your page_id?
Potential downtime? Nope, as long as Heroku is up. Glitch instance may reach a request limit ๐Ÿ˜ข
Self hosting friendly? There are instructions and I am always open to help! Questionable documentation?
Maintained and under development? Yes... No, according to owner himself
Source code is readible? Maybe not? One file but not much better for readibility

Benchmarks

coming soon...

Settings/Configuration

Defaults

  • Colour: "blue"
  • Style: "square"
  • Text: "Visitors"
  • Logo: no logo
  • Cache: disabled

Examples

Migrating From Visitor Badge

TLDR; REPLACE THE DOMAIN NAME
ie. 'visitor-badge.glitch.me/badge?page_id=YOURPAGEID' --> 'visitor-badge-reloaded.herokuapp.com/badge?page_id=YOURPAGEID'

Visitor Badge Reloaded has ALL the same features as the original Visitor Badge with EVEN MORE FEATURES!

This means that all you have to do is replace the url of the badge with https://visitor-badge-reloaded.herokuapp.com/badge?page_id=<your own page_id here>. The total visits will remain the exact same as well!

Also, VBR features could be configured as a HTTP query parameter!

Options (add as a HTTP query parameter)

IMPORTANT: Other than the page_id option, there exists additional styling options and functional options (in the future). More details about the options could be found at the bottom of the Shields.io website. Also, all the options are specified as HTTP parameters!!!

  • page_id=<your id> --> identifies your badge, make this unique to yourself. eg. <your username.visitor.badge.reloaded or <username>-<username>
  • color=<colour here> --> the hex colour of the text background, do NOT include the #
  • lcolor=<colour here> --> the hex colour of the label background, do NOT include the #
  • style=<style name> --> refer to the Sheilds.IO website for the available options
  • text=<Some text other than "Visitors"> --> put a customizable label on your badge
  • logo --> logo to put beside the badge, go to https://simpleicons.org/ for the available names
  • logoColor --> refer to color for the formatting
  • cache --> *just put &cache=on at the end of the badge url

Deploying your own instance

If at any point, you feel the need to host your own instace, you could refer to the following information to do so. I personally don't believe in such a need but you are welcome to do so.

Docker/Kubernetes

This app could be packaged as a Docker image. Prebuilt docker images of VBR are also available on Docker Hub and on the Github Container Registry. Just run the relevant commands found in the Makefile. Then deploy to your choosen cloud service or even to your own server. However, note that there is no HTTPS support and VBR should be placed behind something else that provides HTTPS (eg. reverse proxy, Heroku...).

Heroku (recommended)

Heroku supports Docker containers even with their free dynos. __The current public instance of the app is deployed there as well. __Documentation for deploying Docker is found here. All the files necessary to deploy to Heroku is already present within the repository so this should be rather trivial. In addition make deploy-heroku pushes the git repo to the heroku remote if you have configured Heroku already.

You could also deploy to heroku using this widget (thanks to rzlamrr for the PR):

Deploy

"Stuff" Used

  • Golang
  • Docker
  • Mux (router)
  • Zerolog (logger)
  • shields.io

TODO

  • GOT FEATURE REQUEST??? Send me an issue!
  • website homepage
  • local badge generator (instead of relaying shields.io)
  • differentiates user by IP
  • differentiates user by Github account???
  • user analytics??
  • additional TODOs are in the code itself

Supporting this project!

I originally created this project because I personally wanted something that was built to my (relatively high) expectations of performance and customizability. I share this project and its hosted service to the public as I thought that this would be something that would benefit others. However, maintaining such a project and handling the demands of all the users that would use this service would incur additional work and costs for myself. Hence, it would be greatly appreciated if you could support this project by the following ways:

  1. Star โญ and share this project!
  2. Contribute to the development. Refer to Contributing
  3. Bug tracking! If you find any issues, please create an Issue so the problem could be fixed as soon as possible.

Contributing

If you are interested in helping make this project better, I highly welcome you to do so. I thank you in advance for your interest. If you are unsure of what you could do to improve the project, you may have a look in TODO list (above), or add to the list yourself

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.