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

@tributary-so/api

v1.0.0

Published

Tributary API - Modular Express API for subscription and payment services

Readme

@tributary-so/api

Modular Express API for Tributary subscription and payment services.

Features

  • Modular Architecture: Clean separation of routes, middleware, services, and types
  • Easy to Split: Designed to easily split individual API endpoints into separate microservices
  • RESTful Design: Standard REST API with /api/v1 prefix
  • Subscription Status: Check subscription status by tracking ID using the PaymentTracker
  • Health Monitoring: Built-in health check endpoint
  • Error Handling: Centralized error handling and logging
  • Type Safety: Full TypeScript support with comprehensive types

Project Structure

api/
├── src/
│   ├── routes/          # Individual route modules (easy to split into separate services)
│   │   ├── health.ts   # Health check endpoint
│   │   ├── skill.ts    # Lando skill markdown generation
│   │   └── subscription.ts  # Subscription status checking
│   ├── middleware/      # Shared middleware
│   │   ├── errorHandler.ts
│   │   └── requestLogger.ts
│   ├── services/       # Business logic services
│   │   ├── solana.ts      # Solana connection management
│   │   └── subscription.ts # Subscription status tracking
│   ├── types/          # TypeScript types
│   └── index.ts        # Main application entry point
├── package.json
├── tsconfig.json
└── Dockerfile

API Endpoints

Health

  • GET /api/v1/health - Health check endpoint

Skill

  • GET /api/v1/skill/:encoded - Generate Lando skill markdown from encoded subscription data

Subscription

  • GET /api/v1/subscription/status/:trackingId - Check subscription status
    • Query params:
      • userPublicKey (optional): User's public key for user-based lookup
      • gatewayPublicKey (optional): Gateway's public key for gateway-based lookup
      • tokenMint (optional): Token mint address
  • GET /api/v1/subscription/:trackingId - Get full subscription details
    • Query params:
      • userPublicKey (optional): User's public key for user-based lookup
      • gatewayPublicKey (optional): Gateway's public key for gateway-based lookup
      • tokenMint (optional): Token mint address

Development

Install Dependencies

cd api
pnpm install

Development Mode

pnpm dev

Build

pnpm build

Start Server

pnpm start

Environment Variables

  • PORT - Server port (default: 3002)
  • SOLANA_RPC - Solana RPC URL (default: https://api.mainnet-beta.solana.com)

Microservice Splitting

The modular structure makes it easy to split individual APIs into separate projects:

  1. Each route module (src/routes/*.ts) is self-contained
  2. Services and types can be extracted into shared packages
  3. Middleware can be reused across services
  4. Each endpoint can be deployed independently

Example: To split /api/v1/subscription into a separate service:

  1. Copy src/routes/subscription.ts to new project
  2. Copy required services (src/services/subscription.ts, src/services/solana.ts)
  3. Copy types (src/types/index.ts)
  4. Copy middleware (src/middleware/*)
  5. Adjust imports and deploy

License

MIT