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

fakedev

v1.1.0

Published

Generator gambar PLP (Profile Layer Picture) berbasis canvas — nama melengkung + role di bawahnya, pilih background per index atau acak. Bisa dipakai di bot WhatsApp (Baileys), Telegram, atau platform apapun. Tidak punya dependency ke platform manapun.

Readme

fakedev

Generator PLP (Profile Logo Picture) berbasis Canvas untuk Node.js.

Hasil berupa PNG Buffer yang berisi:

  • Foto profil bulat
  • Nama melengkung (⌣) di atas, dengan opsi role/jabatan kecil di bawahnya
  • Badge centang
  • Background yang dapat dipilih (termasuk mode acak)

Package ini 100% platform-agnostic. Tidak memiliki kode khusus Telegram, WhatsApp, Discord, maupun framework bot lainnya. Output hanya berupa Buffer, sehingga bisa digunakan di project Node.js apa pun.


Install

npm install fakedev

Assets

Struktur default:

assets/
├── background1.jpg
├── background2.jpg
├── background3.jpg
├── centang.png
└── font.ttf

| File | Required | Keterangan | |------|----------|------------| | background{N}.jpg | ✅ | Background PLP | | centang.png | ❌ | Badge centang | | font.ttf | ❌ | Font custom |


Basic Usage

const { generatePLP } = require("fakedev");
const fs = require("fs");

(async () => {
  const image = await generatePLP({
    photo: "./photo.jpg",
    name: "Kyuuu",
    bgIndex: 1,
    textColor: "#FFFFFF",
    shadowColor: "#00ffff",
    checkSize: 220
  });

  fs.writeFileSync("result.png", image);
})();

Nama + Role ("Nama|Role")

Nama besar selalu di atas (melengkung). Mulai versi ini, kamu bisa menambahkan baris role/jabatan kecil tepat di bawah nama, cukup pisahkan dengan karakter |:

const image = await generatePLP({
  photo: "./photo.jpg",
  name: "Kyuu|Not Dev", // "Kyuu" jadi nama besar, "Not Dev" jadi role di bawahnya
  bgIndex: 1
});

Format ini fleksibel, contoh lain: "text|text2", "Sanaka|Owner", "Alya|Bot Developer".

Kalau tidak butuh format "Nama|Role", role juga bisa diisi terpisah lewat opsi role:

const image = await generatePLP({
  photo: "./photo.jpg",
  name: "Kyuu",
  role: "Not Dev",
  bgIndex: 1
});

Tidak menulis role sama sekali (baik lewat "|" maupun opsi role) tetap didukung — hasilnya sama seperti versi sebelumnya, hanya nama tanpa role.


Pilih Background

bgIndex mendukung tiga cara:

// 1) Pilih background tertentu lewat nomor file (assets/background5.jpg)
await generatePLP({ photo, name, bgIndex: 5 });

// 2) Pilih acak dari semua background yang ada di assetsDir
await generatePLP({ photo, name, bgIndex: "random" }); // atau "acak"

// 3) Default kalau tidak diisi -> bgIndex: 1
await generatePLP({ photo, name });

Kalau index yang diminta tidak ada filenya, generatePLP akan melempar error yang menyebutkan daftar index background yang valid, supaya gampang di-debug.

Untuk bikin menu pilih background sendiri (misalnya tombol interaktif di bot), ambil daftar index yang tersedia lewat:

const { listAvailableBackgrounds } = require("fakedev");
const indexes = listAvailableBackgrounds("./assets"); // contoh: [1, 2, 3, ..., 30]

Options

| Option | Type | Default | Description | |---------|------|---------|-------------| | photo | string \| Buffer | required | Path lokal, URL, atau Buffer foto. | | name | string | required | Nama yang ditampilkan. Bisa berupa "Nama\|Role" untuk sekaligus mengisi role. | | role | string | "" | Role/jabatan kecil di bawah nama. Diabaikan kalau name sudah mengandung "\|". | | bgIndex | number \| "random" | 1 | Background yang digunakan, atau "random"/"acak" untuk acak. | | textColor | string | #FFFFFF | Warna teks nama. | | shadowColor | string | #00ffff | Warna glow/shadow (dipakai untuk nama & role). | | roleColor | string | sama dengan textColor | Warna teks role. | | assetsDir | string | ./assets | Folder assets custom. | | checkSize | number | 220 | Ukuran badge centang. |


Color Presets

const {
  textColors,
  shadowColors
} = require("fakedev");

console.log(textColors.white);
console.log(shadowColors.cyan);

Tersedia lebih dari 90 preset warna untuk teks dan glow.


WhatsApp (Baileys)

const { generatePLP } = require("fakedev");

const buffer = await generatePLP({
  photo: photoBuffer,
  name: "Kyuuu|Not Dev",
  bgIndex: "random"
});

await sock.sendMessage(chatId, {
  image: buffer
});

Telegram (Telegraf)

const { generatePLP } = require("fakedev");

const buffer = await generatePLP({
  photo: photoUrl,
  name: "Kyuuu|Owner"
});

await ctx.replyWithPhoto({
  source: buffer
});

node-telegram-bot-api

const { generatePLP } = require("fakedev");

const buffer = await generatePLP({
  photo: photoUrl,
  name: "Kyuuu"
});

await bot.sendPhoto(chatId, buffer);

API

const { generatePLP, listAvailableBackgrounds } = require("fakedev");

generatePLP(options)

Mengembalikan:

Promise<Buffer>

Output berupa PNG Buffer yang siap digunakan untuk:

  • WhatsApp Bot
  • Telegram Bot
  • Discord Bot
  • Express API
  • Fastify API
  • Next.js API Routes
  • Vercel Functions
  • Node.js Project

listAvailableBackgrounds(assetsDir)

Mengembalikan array nomor index background yang tersedia di assetsDir, contoh: [1, 2, 3, ..., 30]. Berguna untuk membuat menu pilih background sendiri (tombol interaktif, dsb).


License

MIT