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

socialfi

v0.1.14

Published

Build social features into your app with ease

Readme

Tapestry Social SDK

A TypeScript/JavaScript SDK for interacting with the Tapestry Social API. Build social features into your app with ease.

Features

  • 🔑 Profile Management: Create, update, and manage user profiles with support for wallet addresses and phone numbers
  • 👥 Social Graph: Handle follows/unfollows and social relationships
  • 💬 Content & Comments: Manage user-generated content and interactions
  • ❤️ Likes: Handle social engagement through likes
  • 🔍 Search: Search for profiles and content
  • 📱 Notifications: Send notifications to users (wallet notifications supported)
  • 📊 Activity Feed: Get user activity feeds including follows, content, likes, comments, and new followers
  • 💱 Swap Activity: Track swap transactions from followed wallets or specific tokens
  • 🔓 Direct API Access: Access the underlying API client for advanced use cases
  • 🎯 Identity Resolution: Find associated profiles across namespaces using phone numbers or wallet addresses
  • 🛠️ Debug Mode: Optional debug logging for API calls

Installation

npm install socialfi
# or
yarn add socialfi
# or
pnpm add socialfi

Quick Start

import { SocialFi } from 'socialfi';

// const API_URL = 'https://api.usetapestry.dev/v1/'; // tapestry prod URL
const API_URL = 'https://api.dev.usetapestry.dev/v1/'; // tapestry dev URL

const API_KEY = process.env.TAPESTRY_API_KEY; // Get you API key from https://app.usetapestry.dev/

const client = new SocialFi({
  baseURL: API_URL,
});

// Example: Create a profile
async function createProfile() {
  try {
    const profile = await client.profiles.findOrCreateCreate(
      {
        apiKey: API_KEY, 
      },
      {
        walletAddress: 'YOUR_WALLET_ADDRESS',
        username: 'johndoe',
        bio: 'Hello World!',
        blockchain: 'SOLANA',
      },
    );
    console.log('Profile created:', profile);
  } catch (error) {
    console.error('Error creating profile:', error);
  }
}

// Example: Follow a user
async function followUser() {
  try {
    await client.followers.postFollowers(
      {
        apiKey: API_KEY,
      },
      {
        startId: 'YOUR PROFILE ID',
        endId: 'ANOTHER PROFILE ID',
      },
    );
    console.log('Successfully followed user');
  } catch (error) {
    console.error('Error following user:', error);
  }
}

API Documentation

Configuration

The TapestryClient constructor accepts the following configuration options:

interface SocialFi {
  baseURL?: string; // Optional: Override the default API URL
  apiKey?: string;  // Optional: Your Tapestry API key
  debug?: boolean;  // Optional: Enable debug logging
}

TypeScript Support

This SDK is written in TypeScript and provides comprehensive type definitions for all API responses and parameters. Import types directly:

import  {
  SocialFi,

  // Profile types
  ProfileSchema,
  FindOrCreateProfileSchema,
  UpdateProfileSchema,

  // Content types
  ContentSchema,
  FindOrCreateContentSchema,

  // Comment types
  CreateCommentSchema,

  // Social types
  CreateFollowSchema,


  // Search types
  SearchProfilesResponseSchema,

  // Common types
  CustomPropertySchema,

} from 'socialfi';

Best Practices

  1. API Key Security: Never expose your API key in client-side code. Use environment variables and server-side authentication.

  2. Error Handling: Always implement proper error handling for API calls.

  3. Rate Limiting: Be mindful of API rate limits and implement appropriate retry logic.

  4. Custom Properties: Use custom properties to extend functionality while maintaining compatibility.

  5. Debug Mode: Enable debug mode during development to log API calls for troubleshooting.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes:

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

Support

License

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