No-Nonsense badge generator service. Ideal for on-premises hosting!
BadgeServ is designed to be completely un-opinionated about what sort of data you want to display, but to make displaying any data easy. It includes no built-in badges or services at all and is intneded principally for supporting private deployments which could benefit from a badge-generator service.
This is an entirely stateless service. Run it with:
docker run -it --rm -p 8080:8080 ghcr.io/wrouesnel/badgeserv
And visit http://127.0.0.1:8080 to use it.
The Web UI is the easiest way to make badges - simply enter your parameters, and the badge sample will be generated in your browser. Copying the image link will allow you to embed it on any other page.
All features can be explored from the swagger UI at /api/v1/ui
GET /api/v1/badge/static?name=Name&value=Value&color=green
Generate simple badges directly from a URL.
GET /api/v1/badge/dynamic/?target=https://my-json-service/this/should/be/encoded/properly&label=This can be Pongo2&message=So can this {{like.with.a.value}}
Generate dynamic badges from any JSON endpoint using pongo2 for data extraction.
Pongo2 is a Jinja2-like syntax derivative for Go, and is chosen because it provides advanced features like conditions and text handling. Using this language in badge queries, almost any type of data can be handled.
GET /api/v1/badge/<predefined name>/?param1=something¶m2=something
The predefined badge endpoints can be customized and configured when the service is deployed. This is a handy solution for surfacing data which requires authentication tokens to retrieve. BadgeServ supports retrieving secrets from Hashicorp Vault directly, for maximum configuration security.
The following features will be implemented soon
Endpoint badges implement a compatible interface similar to shields.io and badgen.net.
Adapted from original code by Luzifer/badge-gen.