Fork 1
A web service and GUI for ./badges (development concluded)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

4.1 KiB

./badges web

A web service and GUI for ./badges

Development on dot-slash-badges-web has concluded. It will not receive any more feature or maintenance updates. Use at your own risk! Beware of outdated dependencies!

Status: Concluded Issue Tracker License: Apache v2.0 ./badges


This repository contains a web service and GUI for generating and downloading repository badges, powered by ./badges.

It consists of a small webservice, written in Go, and a lightweight HTML/JavaScript frontend, written using Vue.js 3.

Web Service

The ./badges web service is a small REST webservice, written in Go.

To build it, simply run

go build

in the webservice subdirectory.

For a development server, you can run

go run main.go

The web service exposes an /openapi.json endpoint, that gives a description of the service's endpoints.

It also exposes a /templates endpoint, that provides an index of all available templates and for each template a list of available themes as well as each theme's parameters.

Configuration of the webservice is done by passing in a JSON file using the -c command line parameter. An example configuration file is provided in webservice/example-config.json.

In its default configuration, it is configured for allowing any Cross-Origin requests. You can configure a stricter setting in the server configuration file.

By default, the webservice will support the template and themes built into ./badges.


Building the entire GUI

The ./badges web GUI is a lightweight HTML/JavaScript GUI (< 100KiB gzipped for v1.0.0), written with Vue.js 3 and Halfmoon CSS.

It features live-updating badges and interactive selection of themes, as well as example Markdown generation.

You can configure it using the frontend/.env file, where you can set the web service URL and whether the download and remote inclusion sections should be shown.

To run it, first make sure the web service (see above) is running and its URL is configured in the file frontend/.env. Then run:

npm run serve

for a development server and

npm run build

for a production build.

The GUI is suitable for local use. For production use, you might need to add legal and privacy links as well as further copyright attribution, if you use custom themes and templates. For these customizations, it is suggested to include the GUI as a NPM dependency and to re-use its components or to create your custom fork, modifying App.vue and other relevant files in place.

Reusing the GUI components

The GUI components are published on npm and can be re-used in your own application. Please be sure to include LICENSE and NOTICE in this scenario.

npm install dot-slash-badges-web


Development on dot-slash-badges-web has concluded. The project is closed to additional contributions, but you are welcome to create your own forks. Use at your own risk! Beware of outdated dependencies!

For urgent requests, the author is available under the contact data referenced at the bottom of this README.

./badges web is (C) 2021 Lucas Hinderberger

It is licensed under the Apache Licence Version 2.0.

The output of the ./badges generator using the built-in fonts, themes and templates is unencumbered by copyright restrictions (to the extent possible under law), due to the built-in fonts, themes and templates being released under CC0 1.0 Universal.

For details, please refer to the LICENCE file and the NOTICE file.

Author and Contact

./badges web is authored by Lucas Hinderberger.

You can contact the author via email at mail@lhinderberger.com

The repository of ./badges web can be found at https://codeberg.org/lhinderberger/dot-slash-badges-web

You're welcome to file bug reports, other issues and pull requests there.