Cool little discord profile page
Find a file
creations a4f139406c
All checks were successful
Code quality checks / biome (push) Successful in 9s
reformat the html for better seo?
2025-05-03 07:28:23 -04:00
.forgejo/workflows update biome.json and add workflow 2025-04-10 06:29:21 -04:00
config add plausible support 2025-05-03 07:07:26 -04:00
public reformat the html for better seo? 2025-05-03 07:28:23 -04:00
src reformat the html for better seo? 2025-05-03 07:28:23 -04:00
types move to raw html, make readme use buns html rewrite and always set to 2025-04-26 11:10:31 -04:00
.editorconfig stinky editor configs 2025-04-05 01:29:03 -04:00
.env.example add plausible support 2025-05-03 07:07:26 -04:00
.gitattributes stinky editor configs 2025-04-05 01:29:03 -04:00
.gitignore remove uneeded 2025-04-26 08:34:29 -04:00
biome.json add css kv var, move away from ssr ( multiple queries ), remove colors kv var, add option to disable logging per route 2025-04-25 21:20:08 -04:00
compose.yml add env var, add docker files, idk how i forgot there in the readme 2025-04-22 20:21:24 -04:00
Dockerfile add env var, add docker files, idk how i forgot there in the readme 2025-04-22 20:21:24 -04:00
LICENSE change license to BSD 3-Clause 2025-04-28 04:11:57 -04:00
package.json didnt push for some reason? 2025-04-26 11:13:57 -04:00
README.md add plausible support 2025-05-03 07:07:26 -04:00
tsconfig.json move to biomejs 2025-04-07 04:36:07 -04:00

Discord Profile Page

A cool little web app that shows your Discord profile, current activity, and more. Built with Bun.

Preview

https://creations.works


Requirements

This project depends on the following services to function properly:

1. Lanyard Backend

This project depends on a self-hosted or public Lanyard instance to fetch real-time Discord presence data. Make sure the Lanyard instance is running and accessible before using this.

2. Redis Instance

A Redis-compatible key-value store is required to cache third-party data (e.g., SteamGridDB icons). I recommend Dragonfly, a high-performance drop-in replacement for Redis.

3. Badge API

A lightweight API to render Discord-style badges.

Only needed if you want to show badges on profiles: https://git.creations.works/creations/badgeAPI

4. SteamGridDB

Only needed if you want to fetch game icons that Discord doesnt provide: https://www.steamgriddb.com/api/v2


Getting Started

1. Clone & Install

git clone https://git.creations.works/creations/profilePage.git
cd profilePage
bun install

2. Configure Environment

Copy the example environment file and update it:

cp .env.example .env

.env Variables

Variable Description
HOST Host to bind the Bun server (default: 0.0.0.0)
PORT Port to run the server on (default: 8080)
REDIS_URL Redis connection string
LANYARD_USER_ID Your Discord user ID, for the default page
LANYARD_INSTANCE Endpoint of the Lanyard instance
BADGE_API_URL Badge API URL (badgeAPI)
STEAMGRIDDB_API_KEY SteamGridDB API key for fetching game icons

Optional Lanyard KV Variables (per-user customization)

These can be defined in Lanyard's KV store to customize the page:

Variable Description
snow Enables snow background (true / false)
rain Enables rain background (true / false)
stars Enables starfield background (true / false)
badges Enables badge fetching (true / false)
readme URL to a README displayed on the profile (.md or .html)
css URL to a css to change styles on the page, no import or require allowed

3. Start the Instance

bun run start

Optional: Analytics with Plausible

You can enable Plausible Analytics tracking by setting a script snippet in your environment.

.env Variable

Variable Description
PLAUSIBLE_SCRIPT_HTML Full <script> tag(s) to inject into the <head> for analytics

Example

PLAUSIBLE_SCRIPT_HTML='<script defer data-domain="example.com" src="https://plausible.example.com/js/script.js"></script><script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>'
  • The script will only be injected if this variable is set.
  • Plausible provides the correct script when you add a domain.
  • Be sure to wrap it in single quotes (') so it works in .env.

Docker Support

Build & Start with Docker Compose

docker compose up -d --build

Make sure the .env file is configured correctly before starting the container.


Routes

These are the main public routes exposed by the server:

Route Description
/ Loads the profile page for the default Discord user defined in .env (LANYARD_USER_ID)
/[id] Loads the profile page for a specific Discord user ID passed in the URL

Example: https://creations.works/209830981060788225 shows the profile of that specific user.


License

BSD 3