badgeAPI/README.md
creations 0ba0181e2b
All checks were successful
Code quality checks / biome (push) Successful in 8s
Update README.md
last time trust
2025-05-02 23:05:40 +02:00

2.1 KiB

Badge Aggregator API

A fast Discord badge aggregation API built with Bun and Redis caching.

Preview

https://badges.creations.works

Features

  • Aggregates custom badge data from multiple sources (e.g. Vencord, Nekocord, Equicord, etc.)
  • Optional caching via Redis (1 hour per user-service combo)
  • Supports query options for service filtering, separated output, and cache bypass
  • Written in TypeScript with formatting and linting using BiomeJS

Requirements

Environment

Copy the .env.example file in the root:

cp .env.example .env

Then edit the .env file as needed:

# NODE_ENV is optional and can be used for conditional logic
NODE_ENV=development

# The server will bind to this host and port
HOST=0.0.0.0
PORT=8080

# Redis connection URL, password isn't required
REDIS_URL=redis://username:password@localhost:6379

# Value is in seconds
REDIS_TTL=3600

#only use this if you want to show discord badges
DISCORD_TOKEN=discord_bot_token

Endpoint

GET /:userId

Path Parameters

Name Description
userId Discord User ID to query

Query Parameters

Name Description
services A comma or space separated list of services to fetch badges from, if this is empty it fetches all
cache Set to true or false (default: true). false bypasses Redis
seperated Set to true to return results grouped by service, else merged array

Supported Services

  • Vencord
  • Equicord
  • Nekocord
  • ReviewDb
  • Enmity
  • Discord ( some )

Example

GET /209830981060788225?seperated=true&cache=true&services=equicord

Start the Server

bun i
bun run start

License

BSD 3