npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cardforge

v1.0.1

Published

A powerful TypeScript library for generating beautiful, customizable card images - forge stunning welcome cards, music players, rank cards, and relationship compatibility displays

Readme

🔥 CardForge

A powerful TypeScript library for generating beautiful, customizable card images

npm version TypeScript License

CardForge provides an easy-to-use API for creating stunning social media cards, welcome banners, music players, ranking systems, and relationship compatibility cards with professional designs and extensive customization options.

✨ Features

  • 🎯 Welcome Cards - Futuristic cyber-themed welcome banners
  • 🎵 Spotify Cards - Modern music player interfaces
  • 📊 Rank Cards - Level/XP progress indicators
  • 💕 Ship Cards - Relationship compatibility displays
  • 🎨 Multiple Themes - Various pre-built design themes
  • ⚙️ Full Customization - Colors, fonts, backgrounds, effects
  • 🚀 TypeScript Support - Full type safety and intellisense
  • 📱 High Quality Output - PNG images with crisp resolution

🖼️ Card Examples

Welcome Card

Welcome Card Example Futuristic cyber-themed welcome card with neon effects

Spotify Card

Spotify Card Example Modern music player with album art and progress bar

Rank Card

Rank Card Example Level progression card with XP tracking

Ship Card

Ship Card Example Relationship compatibility with modern glass design

📦 Installation

npm install cardforge

🚀 Quick Start

import { WelcomeCard, SpotifyCard, RankCard, ShipCard } from 'cardforge';
import fs from 'fs';

// Create a Welcome Card
const welcomeCard = new WelcomeCard()
  .setUsername('CyberUser')
  .setAvatar('https://example.com/avatar.jpg')
  .setWelcomeText('SYSTEM ONLINE')
  .setSubText('Welcome to the cybernetic network!')
  .setMemberCount(1337);

const buffer = await welcomeCard.build();
fs.writeFileSync('welcome.png', buffer);

📚 Card Types & Usage

🎯 Welcome Card

Create futuristic welcome banners with cyberpunk aesthetics.

const welcomeCard = new WelcomeCard()
  .setUsername('Username')
  .setAvatar('avatar-url')
  .setWelcomeText('Welcome!')
  .setSubText('Welcome message here')
  .setMemberCount(1234)
  .setTheme('cyber'); // cyber, neon, hologram, geometric, aurora

const buffer = await welcomeCard.build();

Available Themes:

  • cyber - Blue/cyan cyberpunk (default)
  • neon - Pink/green neon lights
  • hologram - Purple holographic effects
  • geometric - Green/teal geometric patterns
  • aurora - Multi-color aurora effects

Customization Methods:

welcomeCard
  .setBackgroundColors(['#color1', '#color2'])
  .setTextColors('#welcome', '#sub', '#username')
  .setAvatarStyle('#borderColor', borderWidth)
  .setBackgroundImage('image-url');

🎵 Spotify Card

Modern music player interface with album art and controls.

const spotifyCard = new SpotifyCard()
  .setTrack('Song Name')
  .setArtist('Artist Name')
  .setAlbum('Album Name')
  .setAlbumArt('album-art-url')
  .setProgress(currentMs, totalMs)
  .setSpotifyLogo(true);

const buffer = await spotifyCard.build();

Features:

  • Blurred album art background
  • Progress bar with time display
  • Official Spotify logo
  • Custom background support
  • 2000x565 optimal size for sharing

Customization Methods:

spotifyCard
  .setCustomBackground('background-url')
  .setBackgroundOpacity(0.7)
  .setSpotifyLogo(false);

📊 Rank Card

Level progression and XP tracking cards.

const rankCard = new RankCard()
  .setUsername('GameMaster')
  .setAvatar('avatar-url')
  .setLevel(42)
  .setXP(8750, 10000) // current, required
  .setRank(15);

const buffer = await rankCard.build();

Features:

  • Animated progress bars
  • Level badges
  • XP tracking with abbreviations (K, M, B)
  • Modern glass morphism design
  • Customizable colors and effects

Customization Methods:

rankCard
  .setBackgroundColors(['#color1', '#color2'])
  .setProgressBarColors(['#progress'])
  .setTextColors('#username', '#xp', '#percentage')
  .setBadgeStyle(['#badge1', '#badge2'], '#border', '#text')
  .setAvatarStyle('#border', width)
  .setPattern(true, '#color', 0.1)
  .setEffects(true, true); // glow, shadow

💕 Ship Card

Relationship compatibility cards with modern design.

const shipCard = new ShipCard()
  .setUser1('Alice', 'avatar1-url')
  .setUser2('Bob', 'avatar2-url')
  .setShipPercentage(85);

const buffer = await shipCard.build();

Features:

  • Glass morphism background
  • Geometric connection elements
  • Compatibility percentage
  • Status labels in multiple languages
  • Floating heart effects

Customization Methods:

shipCard
  .setTheme('romantic') // romantic, modern, minimal, neon
  .setBackgroundColors(['#color1', '#color2'])
  .setHeartColors(['#heart1', '#heart2'])
  .setConnectionLineColor('#line')
  .setAvatarStyle('#border', width)
  .setFloatingHearts(true, '#color')
  .setStatusLabels({
    perfectMatch: 'Mükemmel Eşleşme',
    greatChemistry: 'Harika Kimya',
    // ... other labels
  });

🎨 Theme System

Each card type supports multiple built-in themes:

Welcome Card Themes

  • Cyber: Dark blue cyberpunk with cyan accents
  • Neon: Black background with pink/green neon
  • Hologram: Purple holographic effects
  • Geometric: Teal/green geometric patterns
  • Aurora: Multi-color gradient effects

Spotify Card Themes

  • Modern: Clean minimal design (default)
  • Classic: Traditional Spotify green
  • Neon: Bright neon aesthetics

Rank Card Themes

  • Blue: Professional blue gradients (default)
  • Green: Nature-inspired greens
  • Purple: Royal purple themes
  • Orange: Energetic orange accents
  • Red: Bold red styling

Ship Card Themes

  • Modern: Clean glass morphism (default)
  • Romantic: Warm pink/red tones
  • Minimal: Simple black/white
  • Neon: Bright cyberpunk colors

🛠️ Advanced Customization

Custom Backgrounds

// Image backgrounds
card.setBackgroundImage('https://example.com/bg.jpg');

// Gradient backgrounds
card.setBackgroundColors(['#ff6b6b', '#4ecdc4', '#45b7d1']);

Text Styling

// Custom text colors
welcomeCard.setTextColors('#ffffff', '#cccccc', '#00ffff');

// Custom fonts are supported via system fonts

Effects & Styling

// Enable/disable effects
rankCard.setEffects(true, true); // glow, shadow

// Pattern overlays
rankCard.setPattern(true, '#ffffff', 0.1); // show, color, opacity

// Avatar styling
card.setAvatarStyle('#ffffff', 6); // border color, width

📐 Output Specifications

| Card Type | Dimensions | Format | Typical Size | |-----------|------------|--------|--------------| | Welcome Card | 1000x450 | PNG | ~280KB | | Spotify Card | 2000x565 | PNG | ~320KB | | Rank Card | 800x200 | PNG | ~55KB | | Ship Card | 700x350 | PNG | ~55KB |

🔧 API Reference

Base Methods (All Cards)

card.build(): Promise<Buffer>        // Generate the card image

Welcome Card Methods

setUsername(username: string)
setAvatar(avatar: string)
setWelcomeText(text: string)
setSubText(text: string)
setMemberCount(count: number)
setTheme(theme: string)
setBackgroundColors(colors: string[])
setBackgroundImage(imageUrl: string)
setTextColors(welcome?, sub?, username?)
setAvatarStyle(borderColor?, borderWidth?)

Spotify Card Methods

setTrack(track: string)
setArtist(artist: string)
setAlbum(album: string)
setAlbumArt(albumArt: string)
setProgress(current: number, total: number)
setCustomBackground(background: string)
setSpotifyLogo(show: boolean)
setBackgroundOpacity(opacity: number)

Rank Card Methods

setUsername(username: string)
setAvatar(avatar: string)
setLevel(level: number)
setXP(current: number, required: number)
setRank(rank: number)
setBackground(background: string)
setBackgroundColors(colors: string[])
setProgressBarColors(colors: string[])
setTextColors(username?, xp?, percentage?)
setBadgeStyle(colors?, borderColor?, textColor?)
setAvatarStyle(borderColor?, borderWidth?)
setPattern(show: boolean, color?, opacity?)
setEffects(glow?: boolean, shadow?: boolean)

Ship Card Methods

setUser1(username: string, avatar: string)
setUser2(username: string, avatar: string)
setShipPercentage(percentage: number)
setBackground(background: string)
setTheme(theme: string)
setBackgroundColors(colors: string[])
setHeartColors(colors: string[])
setConnectionLineColor(color: string)
setPercentageCircleColors(colors: string[])
setUsernameTagColors(colors: string[])
setAvatarStyle(borderColor?, borderWidth?)
setFloatingHearts(show: boolean, color?)
setEffects(glow?: boolean, shadow?: boolean)
setStatusLabels(labels: object)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with @napi-rs/canvas for high-performance image generation
  • Inspired by modern UI/UX design principles
  • Special thanks to the TypeScript community