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

@itsliaaa/starcore

v0.0.0-alpha.35

Published

A Baileys wrapper for WhatsApp bot development with multi-session support, built-in stores, and more.

Readme

✨ @itsliaaa/starcore

Logo

☕ For donation: Saweria

⚠️ Notice

This project is still in development and may contain bugs or incomplete features. If you encounter any issues, feel free to open an issue here

⚡ Quick Start

  1. Install the packages
npm i @itsliaaa/starcore qr file-type
  1. Create the client, store and handle events
import Client, { createSqliteStore } from '@itsliaaa/starcore'

/* createSqliteStore is compatible with bun:sqlite, node:sqlite, and better-sqlite3 */
const store = createSqliteStore()

const client = new Client({
  sessionId: 'main',
  store
})

// Display QR code for authentication
client.on('qr', ({ ascii }) => {
  console.log('📷 Scan this QR code')
  console.log(ascii)
})

// Called when authentication is successful
client.on('auth_paired', ({ id }) => {
  console.log('☁️ Paired as', id)
})

// Handle incoming messages
client.on('message', (m) => {
  const { chat, text } = m

  if (text === 'ping') {
    client.sendMessage(chat, '🏓 *Pong!*', { quote: m })
  }
})

// Connect to WhatsApp
await client.connect()

📕 Note: If no store is provided, the client automatically falls back to an in-memory store. The in-memory store is not persistent and will be cleared when the process exits. For persistent storage, use createSqliteStore() or createJsonStore().

Run the script and scan the QR code displayed in your terminal. Once the client is paired, incoming messages containing ping will receive a 🏓 *Pong!* reply.

👥 Multi-Session

Create multiple isolated sessions using a shared store. Each client is identified by a unique sessionId.

import Client, { createSqliteStore } from '@itsliaaa/starcore'

const store = createSqliteStore('./stores.sqlite')
const clients = new Map()

function createClient(sessionId) {
   if (clients.has(sessionId))
      return clients.get(sessionId)

   const client = new Client({
      sessionId,
      store
   })

   clients.set(sessionId, client)
   return client
}

const main = createClient('main')
const bot = createClient('bot')

for (const client of clients.values()) {
   client.on('qr', ({ ascii }) => {
      console.log('📷 Scan this QR code')
      console.log(ascii)
   })

   client.on('ready', () => {
      console.log(`✅ Session ${client.sessionId} is ready`)
   })
}

await Promise.all(
   [...clients.values()].map(client => client.connect())
)

⚙️ Configuration

const DEFAULT_CONFIG = {
  store: null,
  sessionId: null,
  phoneNumber: null,
  pairingCode: null,
  reconnect: {
    enabled: true,
    maxAttempts: 10,
    delayMs: 3000,
    resetAfterReconnectMs: 30000
  },
  linkPreview: {
    enabled: true,
    timeoutMs: 1000,
    thumbnailWidth: 255,
    uploadLargeThumbnail: false
  },
  message: {
    autoRead: false,
    decryptAddon: true,
    messageIdPrefix: 'STARCORE',
    newsletterAnnotation: null
  },
  media: {
    timeoutMs: 60000,
    detectDuration: true,
    generateThumbnail: true,
    generateWaveform: true,
    normalizeAudio: true,
    ffmpegPath: 'ffmpeg',
    ffprobePath: 'ffprobe',
    cache: null
  }
}

📡 Event References

client.on('connection', (ctx) => console.log('=> CONNECTION', ctx))
client.on('qr', (ctx) => console.log('=> QR', ctx))
client.on('pairing_code', (ctx) => console.log('=> PAIRING_CODE', ctx))
client.on('auth_paired', (ctx) => console.log('=> AUTH_PAIRED', ctx))
client.on('ready', () => console.log('=> SOCKET IS READY'))
client.on('message', (ctx) => console.log('=> MESSAGE', ctx))
client.on('message.addon', (ctx) => console.log('=> MESSAGE.ADDON', ctx))
client.on('message.edit', (ctx) => console.log('=> MESSAGE.EDIT', ctx))
client.on('message.delete', (ctx) => console.log('=> MESSAGE.DELETE', ctx))
client.on('message.stub', (ctx) => console.log('=> MESSAGE.STUB', ctx))
client.on('group.add', (ctx) => console.log('=> GROUP.ADD', ctx))
client.on('group.remove', (ctx) => console.log('=> GROUP.REMOVE', ctx))
client.on('group.promote', (ctx) => console.log('=> GROUP.PROMOTE', ctx))
client.on('group.demote', (ctx) => console.log('=> GROUP.DEMOTE', ctx))
client.on('group.join_request', (ctx) => console.log('=> GROUP.JOIN_REQUEST', ctx))
client.on('poll_update', (ctx) => console.log('=> POLL_UPDATE', ctx))
client.on('event_response', (ctx) => console.log('=> EVENT_RESPONSE', ctx))
client.on('call', (ctx) => console.log('=> CALL', ctx))
client.on('presence', (ctx) => console.log('=> PRESENCE', ctx))

📥 Updating WAProto

An outdated WAProto version may cause newer WhatsApp message features to fail when sending, such as hideParticipantName in Poll V6 and A2UI-based interactive messages.

To update WAProto to the latest available version:

import { updateWAProto } from '@itsliaaa/starcore'

await updateWAProto()

This ensures the latest WhatsApp protocol definitions are available to your application.