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

@launchbasex/sdk

v1.0.0

Published

LaunchBase SDK for connecting generated backends to LaunchBase platform services

Downloads

104

Readme

@launchbasex/sdk

Official SDK for connecting generated backends to LaunchBase platform services.

Installation

npm install @launchbasex/sdk

Quick Start

import LaunchBase from '@launchbasex/sdk'

const client = new LaunchBase({
  apiKey: process.env.LAUNCHBASE_API_KEY,
  projectId: process.env.LAUNCHBASE_PROJECT_ID,
})

// Health check
await client.healthCheck()

// Get project info
const project = await client.getProject()

Authentication

// Sign up
const { user, token } = await client.auth.signUp('[email protected]', 'password', {
  name: 'John Doe',
})

// Sign in
const auth = await client.auth.signIn('[email protected]', 'password')

// OAuth
const { url } = await client.auth.signInWithProvider('google')

// Verify token
const payload = await client.auth.verifyToken(token)

// Refresh token
const newAuth = await client.auth.refreshToken(auth.refreshToken)

Database

// Query
const users = await client.database.query('SELECT * FROM users WHERE active = $1', [true])

// CRUD
const user = await client.database.create('users', { email: '[email protected]', name: 'Test' })
const found = await client.database.findUnique('users', user.id)
const updated = await client.database.update('users', user.id, { name: 'Updated' })
await client.database.delete('users', user.id)

// Query with options
const activeUsers = await client.database.findMany('users', {
  where: { active: true },
  orderBy: { createdAt: 'desc' },
  take: 10,
})

// Transaction
await client.database.transaction(async (tx) => {
  const user = await tx.create('users', { email: '[email protected]' })
  await tx.create('profiles', { userId: user.id, bio: 'Hello' })
})

Storage

// Upload file
const file = await client.storage.upload('avatars/user.jpg', buffer, {
  contentType: 'image/jpeg',
  public: true,
})

// Download
const data = await client.storage.download('avatars/user.jpg')

// Get signed URL
const url = await client.storage.getSignedUrl('private/doc.pdf', 3600)

// List files
const files = await client.storage.list('avatars/')

// Delete
await client.storage.delete('avatars/user.jpg')

Realtime

// Subscribe to channel
const unsubscribe = client.realtime.subscribe('chat', (event) => {
  console.log('New message:', event.data)
})

// Publish event
await client.realtime.publish('chat', {
  type: 'message',
  data: { text: 'Hello world!' },
})

// Unsubscribe
unsubscribe()

Webhooks

// Create webhook
const webhook = await client.webhooks.create('https://example.com/webhook', [
  'user.created',
  'user.updated',
])

// List webhooks
const webhooks = await client.webhooks.list()

// Verify incoming webhook signature
import { WebhookClient } from '@launchbase/sdk/webhooks'

const { valid, event } = WebhookClient.constructEvent(
  payload,
  signature,
  webhook.secret,
  timestamp
)

if (valid) {
  console.log('Event:', event)
}

Configuration

| Option | Required | Default | Description | |--------|----------|---------|-------------| | apiKey | Yes | - | Your project API key | | projectId | Yes | - | Your project ID | | apiUrl | No | https://api.launchbase.dev | API base URL | | timeout | No | 30000 | Request timeout in ms | | retries | No | 3 | Number of retries on failure |

Environment Variables

LAUNCHBASE_API_KEY=your_api_key
LAUNCHBASE_PROJECT_ID=your_project_id
LAUNCHBASE_API_URL=https://api.launchbase.dev  # optional

License

MIT