Skip to content

Commit 8be5b09

Browse files
feat: initial release - high-performance bun-native html transcript generator
1 parent 50823ca commit 8be5b09

17 files changed

Lines changed: 2094 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Bun CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: oven-sh/setup-bun@v2
15+
with:
16+
bun-version: latest
17+
18+
- name: Install Dependencies
19+
run: bun install
20+
21+
- name: Type Check
22+
run: bunx tsc --noEmit
23+
24+
- name: Lint
25+
run: bun run lint

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store

.npmignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.github
2+
.idea
3+
.vscode
4+
.gitattributes
5+
.gitignore
6+
assets/
7+
docs/
8+
tsconfig.json
9+
tsup-config.json
10+
package-lock.json
11+
eslint.config.mjs
12+
13+
# Dev files
14+
tests/
15+
scripts/
16+
test_*.html
17+
index.ts
18+
bun.lock

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# **𝗧 𝗥 𝗔 𝗡 𝗦 𝗖 𝗥 𝗜 𝗣 𝗧**
2+
3+
<p align="left"><a href="https://github.com/sponsors/LuigiColantuono"><img src="https://img.shields.io/github/sponsors/LuigiColantuono?style=social"></a> <a href="https://paypal.me/l0g4n7"><img src="https://img.shields.io/badge/💖-Support-ff69b4"></a> <img src="https://img.shields.io/npm/v/@ovencord/transcript"> <img src="https://img.shields.io/npm/dm/@ovencord/transcript?label=downloads"> <img src="https://img.shields.io/npm/l/@ovencord/transcript"> <img src="https://img.shields.io/github/repo-size/ovencord/transcript"> <a href="https://github.com/ovencord/transcript"><img src="https://img.shields.io/badge/Bun-Networking-black?logo=bun"></a></p>
4+
5+
<div align="center">
6+
<img src="https://github.com/user-attachments/assets/70e8758e-f363-478a-a013-fd46ca3cf3ec" alt="@ovencord/transcript Logo" width="180"/>
7+
<p><b>The fastest, lightest, and most faithful Discord HTML transcript generator.</b></p>
8+
<p><i>Built exclusively for the Bun ecosystem.</i></p>
9+
</div>
10+
11+
---
12+
13+
Stop simulating browsers to generate simple text logs. **@ovencord/transcript** purges the bloat of JSDOM and React, replacing them with a high-performance, string-based rendering engine powered by Bun and a specialized fork of Mustache.
14+
15+
## **Blazingly Fast**
16+
17+
* **Zero Node Dependencies**: No `ws`, no `http` legacy, no `JSDOM`. Pure Bun-native execution.
18+
* **Mustache Powered**: Generates complex transcripts in milliseconds using optimized string templates instead of heavy, recursive DOM manipulation.
19+
* **Zero Memory Overhead**: While other libraries require hundreds of MBs to "render" a virtual DOM, Buncord processes messages through a stream-like logic that keeps your RAM footprint invisible.
20+
21+
## **Absolute Cinema UI**
22+
23+
* **Discord v2 Native**: First-class support for modern components: **Buttons**, **Select Menus**, and the new **Containers**.
24+
* **1:1 Visual Fidelity**: Unlike libraries with hardcoded styles, Buncord uses a dynamic CSS variable system mirrored directly from the official Discord client.
25+
* **Media-First**: Native support for **Multi-image Media Galleries**, high-res avatars, and custom emoji rendering.
26+
* **Smart Mentions**: Intelligently resolves user mentions and relative timestamps within the transcript context.
27+
28+
### **📦 Bundle Size Comparison: Transcripts**
29+
30+
| Package | Size (Unpacked) | Total Files | Dependencies | Install Weight (est.) |
31+
| :--- | :--- | :--- | :--- | :--- |
32+
| **discord-html-transcripts** | 170 kB | 87 | React, JSDOM, etc. | **~25.000 kB (25MB)** |
33+
| **@ovencord/transcript** | 33.8 kB | 8 | **NONE** (Native) | **~34 kB** |
34+
35+
> **Result: 99.8% savings on total installation weight!**
36+
37+
## **Installation**
38+
39+
```bash
40+
bun add @ovencord/transcript
41+
```
42+
43+
## **Quick Start**
44+
45+
```typescript
46+
import { createTranscript } from '@ovencord/transcript';
47+
48+
const messages = [...]; // Your Discord.js / Buncord messages
49+
const channel = { name: 'ticket-001' };
50+
51+
const html = await createTranscript(messages, channel);
52+
// Output is a high-performance HTML buffer/string ready to be served or saved.
53+
```
54+
55+
<div align="center">
56+
<img width="400" height="500" alt="Buncord-Transcript" src="https://github.com/user-attachments/assets/a63256bd-c22e-465a-a667-74d747526dfb" />
57+
</div>
58+
59+
## **The Philosophy**
60+
61+
Built out of frustration with outdated, bloated libraries that fail to render modern Discord components. Buncord-Transcript is a **"Performance Tier 1"** tool for developers who prioritize speed, code purity, and production stability.
62+
63+
---
64+
> This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.

eslint.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
4+
export default tseslint.config(
5+
...tseslint.configs.recommended,
6+
{
7+
languageOptions: {
8+
globals: {
9+
...globals.node,
10+
...globals.browser,
11+
Bun: 'readonly',
12+
},
13+
},
14+
rules: {
15+
'@typescript-eslint/consistent-type-imports': 'error',
16+
'@typescript-eslint/no-explicit-any': 'off',
17+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
18+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
19+
},
20+
}
21+
);

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello via Bun!");

package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "@ovencord/transcript",
3+
"version": "1.0.0",
4+
"description": "Ultrafast, zero-dependency Discord HTML transcript generator exclusively for the Bun ecosystem.",
5+
"module": "src/index.ts",
6+
"main": "src/index.ts",
7+
"type": "module",
8+
"author": {
9+
"name": "Luigi Colantuono",
10+
"url": "https://github.com/LuigiColantuono"
11+
},
12+
"homepage": "https://github.com/LuigiColantuono",
13+
"license": "MIT",
14+
"funding": {
15+
"type": "individual",
16+
"url": "https://paypal.me/l0g4n7"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/LuigiColantuono/Buncord-Transcript.git"
21+
},
22+
"keywords": [
23+
"discord",
24+
"transcript",
25+
"bun",
26+
"html",
27+
"generator",
28+
"performance",
29+
"zero-dependency",
30+
"discord-v2"
31+
],
32+
"scripts": {
33+
"lint": "eslint .",
34+
"typecheck": "tsc --noEmit"
35+
},
36+
"devDependencies": {
37+
"@types/bun": "latest",
38+
"eslint": "^9.39.2",
39+
"globals": "^17.2.0",
40+
"typescript": "^5.9.3",
41+
"typescript-eslint": "^8.54.0"
42+
},
43+
"dependencies": {
44+
"@ovencord/mustache": "^1.0.0"
45+
},
46+
"publishConfig": {
47+
"access": "public"
48+
}
49+
}

0 commit comments

Comments
 (0)