Badgify
🌀 Badgify is an easy-to-use API for generating online custom GitHub badges
Install / Use
/learn @siloxa/BadgifyREADME
What Is In V1.4.0
- JHipsetrize it! =))
Contents
Install and Run
Requirements
Having at least java-11 on your machine installed would be best.
Build
Packaging as jar
To build the final jar and optimize the Badgify for production, run:
./mvnw -Pprod clean verify
This will concatenate and minify the client CSS and JavaScript files. It will also modify index.html so it references these new files. To ensure everything worked, run:
java -jar target/*.jar
Packaging as war
To package Badgify as a war in order to deploy it to an application server, run:
./mvnw -Pprod,war clean verify
Test
To launch Badgify's tests, run:
./mvnw verify
Then navigate to http://localhost:8080 in your browser.
Code quality
Sonar is used to analyse code quality. You can start a local Sonar server (accessible on http://localhost:9001) with:
docker-compose -f src/main/docker/sonar.yml up -d
Note: I have turned off authentication in src/main/docker/sonar.yml for out of the box experience while trying out SonarQube, for real use cases turn it back on.
You can run a Sonar analysis with using the sonar-scanner or by using the maven plugin.
Then, run a Sonar analysis:
./mvnw -Pprod clean verify sonar:sonar
If you need to re-run the Sonar phase, please be sure to specify at least the initialize phase since Sonar properties are loaded from the sonar-project.properties file.
./mvnw initialize sonar:sonar
Using Docker to simplify development (optional)
You can use Docker to improve your JHipster development experience. A number of docker-compose configuration are available in the src/main/docker folder to launch required third party services.
For example, to start a mysql database in a docker container, run:
docker-compose -f src/main/docker/mysql.yml up -d
To stop it and remove the container, run:
docker-compose -f src/main/docker/mysql.yml down
You can also fully dockerize your application and all the services that it depends on. To achieve this, first build a docker image of your app by running:
npm run java:docker
Or build a arm64 docker image when using an arm64 processor os like MacOS with M1 processor family running:
npm run java:docker:arm64
Then run:
docker-compose -f src/main/docker/app.yml up -d
When running Docker Desktop on MacOS Big Sur or later, consider enabling experimental Use the new Virtualization framework for better processing performance (disk access performance is worse).
For more information refer to [Using Docker and Docker-Compose][], this page also contains information on the docker-compose sub-generator (jhipster docker-compose), which is able to generate docker configurations for one or several JHipster applications.
APIs
Label Badge
GET http://localhost:8080/api/badge/lable
OPTIONS
<details> <summary>👀 Example</summary>http://localhost:8080/api/badge/label?text=Badgify&fontColor=lavender&size=l&theme=simple&backgroundColor=indigo&icon=github
Icon Badge
GET http://localhost:8080/api/badge/icon
OPTIONS
<details> <summary>👀 Example</summary>http://localhost:8080/api/badge/icon?fontColor=lavender&size=l&theme=simple&backgroundColor=indigo&icon=github
Text Badge
GET http://localhost:8080/api/badge/text
OPTIONS
<details> <summary>👀 Example</summary>http://localhost:8080/api/badge/text?fontColor=lavender&size=l&theme=simple&backgroundColor=indigo&text=Badgify
Counter Badge
for repository
GET http://localhost:8080/api/badge/counter
OPTIONS
id: String (required)type:repository(required)text: StringfontColor: ColorbackgroundColor: Colorsize: Sizetheme: Theme
http://localhost:8080/api/badge/counter?fontColor=lavender&size=l&theme=simple&backgroundColor=indigo&type=repository&icon=github&id=Badgify
Social Badge
GET http://localhost:8080/api/badge/{social}/{id}
OPTIONS
<details> <summary>👀 Example</summary>http://localhost:8080/api/badge/twitter/shuoros
</details>
Supported Socials
app-store
http://localhost:8080/api/badge/app_store/{id}
behance
http://localhost:8080/api/badge/behance/{id}
