A fast Discord badge aggregation API built with bun
Find a file
creations cbd92de7a5
All checks were successful
Code quality checks / biome (push) Successful in 13s
add Enmity shame!
2025-04-19 20:47:06 -04:00
.forgejo/workflows first commit 2025-04-19 11:58:49 -04:00
config add Enmity shame! 2025-04-19 20:47:06 -04:00
public/assets first commit 2025-04-19 11:58:49 -04:00
src add Enmity shame! 2025-04-19 20:47:06 -04:00
types add Enmity shame! 2025-04-19 20:47:06 -04:00
.editorconfig first commit 2025-04-19 11:58:49 -04:00
.env.example first commit 2025-04-19 11:58:49 -04:00
.gitattributes first commit 2025-04-19 11:58:49 -04:00
.gitignore fix cors 2025-04-19 12:49:54 -04:00
biome.json first commit 2025-04-19 11:58:49 -04:00
LICENSE first commit 2025-04-19 11:58:49 -04:00
package.json first commit 2025-04-19 11:58:49 -04:00
README.md first commit 2025-04-19 11:58:49 -04:00
tsconfig.json first commit 2025-04-19 11:58:49 -04:00

Badge Aggregator API

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

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

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
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

Example

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

Development

Run formatting and linting with BiomeJS:

bun run lint
bun run lint:fix

Start the Server

bun run start

License

MIT