GithubHelp home page GithubHelp logo

splittydev / spacebadgers Goto Github PK

View Code? Open in Web Editor NEW
251.0 2.0 4.0 1019 KB

Fast and clean SVG badges

Home Page: https://badgers.space

License: MIT License

Rust 94.44% JavaScript 0.09% CSS 0.01% TypeScript 5.47%
badge badge-generator badges svg svg-badge

spacebadgers's Introduction

badgers.space Logo

SpaceBadgers - Fast SVG Badges

Yes, badgers is an ingenious name. It contains the word badge, is similar to badgen (a popular badge generation service), includes the -rs suffix ๐Ÿฆ€ and it's an actual word! Badgers are awesome animals. And they're also the mascot of the University of Wisconsin-Madison. I don't know why I'm telling you this, I don't even live in the US. But hey, the more you know.

Live instance at badgers.space

Project Structure

  • badgers: Core spacebadgers library
  • badgers-utils: Internal utilities for spacebadgers
  • badgers-cli: CLI for generating SVG badges
  • badgers-worker: Cloudflare worker
  • badgers-web: Web frontend for badgers.space

Service Integrations

  • GitHub
  • Codeberg
  • crates.io
  • npm
  • PyPI

More integrations coming soon!

Why SpaceBadgers?

The creation of SpaceBadgers was spurred by my experiences and challenges with existing badge generators such as shields.io and badgen.net. These platforms offer excellent services, but I found certain issues that could be improved upon. Here's why I decided to build SpaceBadgers:

1. Performance: Acknowledging past speed concerns with platforms like Shields.io, SpaceBadgers emphasizes high performance and reliability. Our Rust-based core library and Cloudflare worker enable swift, edge-based badge delivery. Smooth integration with third-party services is achieved via NextJS API routes on Vercel, and we continually aim to enhance speed by utilizing the edge runtime.

2. Stability: Badgen.net was created as a faster alternative to shields.io, but due to its lack of active maintenance, it often breaks, leading to broken images. SpaceBadgers is actively maintained and is committed to ensuring stability and uptime.

3. SVG Exclusivity: In contrast to Shields.io, which produces images, SpaceBadgers dedicates itself solely to the generation of SVGs. Recognizing the scalability and high-quality visuals of SVGs, we deemed them the ideal choice. To optimize performance, we serve SVGs in a minified form, ensuring a swift and efficient delivery of badges.

Building SpaceBadgers has been a labor of love, aiming to offer a superior, reliable, and open-source SVG badge generator for the developer community. I am excited to hear your feedback and to continue evolving this project with your help. Your suggestions, contributions, and active participation are always welcome.

Development

Clone the repository and make sure to initialize the submodules

git submodule update --init --recursive

Environment Variables

Paste this template into badgers-web/.env.local

#
# Frontend Configuration
#

# Worker protocol
NEXT_PUBLIC_API_PROTO=http

# Worker host
NEXT_PUBLIC_API_HOST=127.0.0.1:8787

# Web frontend protocol
NEXT_PUBLIC_WEB_PROTO=http

# Web frontend host
NEXT_PUBLIC_WEB_HOST=127.0.0.1:3000

#
# API Tokens
#

# Required for GitHub badges
GITHUB_TOKEN=ghp_Foo1234567

# Required for crates.io badges
CRATESIO_TOKEN=cio51fdR1234567

# Required for Codeberg badges
CODEBERG_TOKEN=foobar123456789

spacebadgers

Click to expand

Prerequisites

  • cargo

Running tests

cargo test -p spacebadgers

badgers-worker

Click to expand

Prerequisites

  • cargo
  • yarn (preferred) or npm

Installing dependencies

cd badgers-worker
npm install         # If you're using npm
yarn                # If you're using yarn

Running locally

cd badgers-worker
npm run dev         # If you're using npm
yarn dev            # If you're using yarn

Deploying to Cloudflare

cd badgers-worker
npm run deploy      # If you're using npm
yarn deploy         # If you're using yarn

badgers-web

Click to expand

Prerequisites

  • yarn (preferred) or npm

Installing dependencies

cd badgers-web
npm install         # If you're using npm
yarn                # If you're using yarn

Running locally

cd badgers-web
npm run dev         # If you're using npm
yarn dev            # If you're using yarn

Contributors

Ross MacArthur
Ross MacArthur

๐Ÿ’ป
Marcin Puc
Marcin Puc

๐Ÿ’ป
Michael Altfield
Michael Altfield

๐Ÿ› ๐Ÿค”
Add your contributions

spacebadgers's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar rossmacarthur avatar splittydev avatar tranzystorekk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

spacebadgers's Issues

Replace feather icons with Lucide

Motivation

Feather Icons are abandoned and there are some issues with it.
Lucide is a commuity-maintained fork of Feather: https://lucide.dev.

TODO

  • Lucide is ISC licensed. Check license compatibility with MIT.
  • Check whether Lucide has significantly changed any of the base icons of feather.
  • Alias lucide-* icons to feather-* (or just keep feather entirely?) to prevent breakage

Incorrect GitHub Actions result

I've been having some issues with this although I'm struggling to identify what the main issue is.

Currently happening right now on my sheldon repository. I'm using the following to generate a badge for the trunk branch:

https://badgers.space/github/checks/rossmacarthur/sheldon/trunk?label=build

The latest build for the trunk branch is passing but the badge still shows an error. I have also observed the reverse, where there is an error but it is showing success.

Edit this is strange, there is a failing build but it doesn't show on the commit because the same commit is on another branch where the same build succeeded with the same commit.

Parse PyPI classifiers

Parsing the PyPI classifiers is sometimes needed to determine the license.

Example (fastapi):

{
    "info": {
        // ...
        "classifiers": [
            // ...
            "License :: OSI Approved :: MIT License",
            "Operating System :: OS Independent",
            "Typing :: Typed"
            // ...
        ],
        // ...
    },
    // ...
}

[REQ] More badges for codeberg

Hi there, 1st of all thanks for this cool project !

It would be extremely useful to have more badges (such as license for codeberg) and language (for both codeberg and github).

Last but not least, sourceforge and gitlab support would be very nice too.

Thanks in advance !

Add named icon support

Right now we have support for fetching icons from URLs, but it would be nice to include a set of named icons too.

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.