https://github.com/rondevhub/mini-badges
A small, standalone badge system in PHP that works without Redis/Docker/Node. It supports static and dynamic (GitHub, Codeberg, Forgejo) badges, styles (similar to Shields), colors, languages (German/English), and simple file caching.
https://github.com/rondevhub/mini-badges
badge-generator badge-maker badges banner codeberg codeberg-badges forgejo forgejo-badges forgejo-integration github icons open-source self-hosted self-hosting self-service shields shields-io shieldsio
Last synced: 2 months ago
JSON representation
A small, standalone badge system in PHP that works without Redis/Docker/Node. It supports static and dynamic (GitHub, Codeberg, Forgejo) badges, styles (similar to Shields), colors, languages (German/English), and simple file caching.
- Host: GitHub
- URL: https://github.com/rondevhub/mini-badges
- Owner: RonDevHub
- License: mit
- Created: 2025-08-19T16:07:47.000Z (10 months ago)
- Default Branch: beta
- Last Pushed: 2026-02-27T11:02:48.000Z (4 months ago)
- Last Synced: 2026-02-27T15:40:49.388Z (4 months ago)
- Topics: badge-generator, badge-maker, badges, banner, codeberg, codeberg-badges, forgejo, forgejo-badges, forgejo-integration, github, icons, open-source, self-hosted, self-hosting, self-service, shields, shields-io, shieldsio
- Language: PHP
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Mini-Badges 
> 🫵 Please note that this is not a complete alternative to Shields.io, nor is it intended to replace or extend it. This is a small project I created for personal use. It is aimed at anyone who wants to run their own badges privately. It is not designed to be used as a service for multiple users.
> Please also keep in mind that, due to API calls, this project may eventually reach its limits. Nevertheless, I hope that some people will enjoy it and perhaps make use of it.
> The [**Wiki**](https://commitcloud.net/RonDevHub/Mini-Badges/wiki) is still **under construction**.
> Support: [**Matrix Chat**](https://matrix.to/#/#mini-badges:matrix.s3cr.net)
---











[](https://ci.commitcloud.net/repos/1)
[](https://www.buymeacoffee.com/RonDev)
[](https://ko-fi.com/U6U31EV2VS)
[](https://github.com/sponsors/RonDevHub)
[](https://www.paypal.com/paypalme/Depressionist1/4,99)
---
A small, standalone **PHP Badge System** – no Redis, Docker, or Node required.
It supports **static** and **dynamic (GitHub)** badges, multiple **styles** (similar to Shields),
**colors**, **languages** (de/en), and simple **file caching**.
---
## 🚀 Installation
1. Upload the contents of this folder to your webspace (e.g. `/www/htdocs/.../badges/`).
2. Make sure the `cache/` directory is writable (e.g. `0775` or `0777`).
3. *(Optional)* Add a GitHub token in `helpers/config.php` (for higher rate limits).
4. Open `examples.html` in your browser.
---
## 🎯 Usage (Examples)
| URL input | Badge output |
| :----------------------- | :------------- |
| Underscore `_` | Space ` ` |
| Double underscore `__` | Underscore `_` |
| Double dash `--` | Dash `-` |
| Star (asterisk) `*` | Placeholder Default Value |
---
### 🔹 Static
**URL pattern:**
`static/{textLabel}-{bgColor}-{textColor}/{textMessage}-{bgColor}-{textColor}/{style}`
Example:

`static/RonDevHub❤️PHP-000000/Awesome-3a6e8f/flat`
---
### 🔹 With Icon
**URL pattern:**
`icon/{icon}-{iconColor}/{textMessage}-{bgColor}-{textColor}/{style}/{textLabel}-{bgColor}-{textColor}`
Examples:

`/icon/github-gray/Github-*-000000/flat`

`/icon/github/👍-teal/*/Github-6d6e70`
---
### :computer: GitHub
**URL pattern:**
`/github/{owner}/{repo}/{metric}/{style}/{icon}-{iconColor}/{lang}/{backgroundColorMessage}-{textColorMessage}/{backgroundLabelColor}-{textColorLabel}`
Examples:
- Stars: 
`github/{owner}/{repo}/stars/*/*/de`
- Top language: 
`github/{owner}/{repo}/top_language/*/*/*/green`
- With icon: 
`github/{owner}/{repo}/forks/round/codefork/*/green`
---
## ⚙️ Parameters
- `{textMessage}` – Badge message text (right side)
- `{textLabel}` – Badge label text (left side)
- `{bgColor}` – Background color (default: Label `#555`, Message `#0B7DBE`)
- `{textColor}` – Text color (default: Label & Message `#fff`)
- `{style}=flat|flat-square|plastic|round|for-the-badge` (default: `flat`)
Examples:









- `{lang}=en|de` (default: `en`) → Used for GitHub badges. Can be extended.
- `{icon}` – Name of an SVG in `icons/` (without `.svg`). Colored with `currentColor`.
- `{iconColor}` – Icon color (default: `#fff`)
---
### :computer: GitHub-specific
- `{metric}` - For example `stars`, `license`, `issues` ... more metrics are listed in the **wiki**
- `{owner}` – GitHub user/org
- `{repo}` – GitHub repository
---
### :codeberg: Codeberg-specific
- `{metric}` - For example `stars`, `license`, `issues` ... more metrics are listed in the **CHANGELOG.md**
- `{owner}` – Codeberg user/org
- `{repo}` – Codeberg repository
---
## 🖼️ Icons
> **⚠️ Note:**
> This download contains **no icons**.
> Place your SVGs (with `fill="currentColor"`) in the `icons/` folder, e.g. `icons/star.svg`.
> Then use `/star/` in the URL.
---
## 📜 License
