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

@thewhateverapp/platform

v0.13.21

Published

Universal SDK for The Whatever App platform services

Readme

@thewhateverapp/platform

⚠️ Beta Release (v0.0.1): This package is in early preview. Backend platform API is in development. Use mock: true mode for local development and testing. Production mode will be available when the platform API is deployed.

Universal SDK for building apps on The Whatever App platform. Provides domain-specific services for storage, AI, database, analytics, identity, and more.

Features

  • Auth Service: OAuth-like permission system for app access to user data
  • Storage Service: Persistent KV storage scoped per app
  • Database Service: MongoDB-compatible document storage
  • AI Service: Multi-provider AI access (Claude, GPT, Gemini)
  • Analytics Service: Event tracking and metrics
  • Identity Service: User authentication across apps
  • Assets Service: File storage with CDN delivery
  • Social Service: Comments, likes, shares across apps

Coming Soon

  • Payments Service: Accept payments (Stripe + crypto) - Feature gated
  • Notifications Service: Email, push, and in-app notifications - Feature gated

Installation

npm install @thewhateverapp/platform

Quick Start

import { createPlatform } from '@thewhateverapp/platform';

// In your app's worker
export default {
  async fetch(request, env, ctx) {
    const platform = createPlatform({
      env,
      request,
      waitUntil: ctx.waitUntil
    });

    const { storage, db, ai, analytics } = platform.getServices();

    // Use services
    await storage.set('user:123', { score: 100 });
    const user = await db.collection('users').findOne({ _id: '123' });
    const response = await ai.ask('Generate a greeting');
    await analytics.track('page_view', { path: '/home' });

    return new Response('Hello from Whatever!');
  }
};

Architecture

App Code (using @thewhateverapp/platform)
    ↓
WhateverPlatform Container (DI)
    ↓
7 Services (abstracted)
    ↓
Platform API (platform.thewhatever.app)
    ↓
Backend Microservices (Kubernetes)
    ↓
MongoDB + Cloudflare

Services

Auth Service

OAuth-like permission system where apps start with minimal access (user ID only) and request additional permissions.

import { AuthAPI } from '@thewhateverapp/platform';

const auth = new AuthAPI({
  apiUrl: 'https://api.thewhatever.app/platform',
  apiKey: env.PLATFORM_API_KEY
});

// Verify user access token from tile SDK
const payload = await auth.verifyUserToken(token);
console.log(payload.userId, payload.scopes);

// Get user context with granted scopes
const user = await auth.getUserContext(userId, ['profile', 'email']);
console.log(user.username, user.email);

// Check what permissions user granted
const perms = await auth.checkPermissions(userId, tileId, ['email', 'wallet']);
console.log(perms.granted, perms.pending, perms.denied);

// Grant permissions (called by parent window)
await auth.grantPermissions(userId, tileId, ['profile', 'email']);

// Revoke app permissions
await auth.revokePermissions(userId, tileId);

Permission Scopes:

  • id - User ID (always granted)
  • profile - Username, avatar, display name
  • email - Email address
  • wallet - Wallet addresses
  • analytics:read - View user analytics
  • analytics:write - Track analytics (auto-granted)
  • storage:read - Read storage (auto-granted)
  • storage:write - Write storage (auto-granted)

Storage Service

await storage.set('key', value, { ttl: 3600 });
const data = await storage.get('key');
await storage.delete('key');
const keys = await storage.list({ prefix: 'user:' });

Database Service

const users = db.collection('users');
await users.insertOne({ name: 'Alice', score: 100 });
const user = await users.findOne({ name: 'Alice' });
await users.updateOne({ name: 'Alice' }, { $inc: { score: 50 } });

AI Service

const response = await ai.ask('What is the meaning of life?', {
  provider: 'anthropic',
  maxTokens: 500
});

const result = await ai.prompt({
  prompt: 'Analyze this image',
  capabilities: ['vision'],
  images: [{ type: 'url', data: 'https://...' }]
});

Analytics Service

await analytics.track('button_click', { button: 'submit' });
await analytics.pageView('/home');
const metrics = await analytics.getMetrics('7d');

Identity Service

const { userId, isNew } = await identity.resolve({
  email: '[email protected]'
});

await identity.link(userId, { walletAddress: '0x...' });
const user = await identity.getUser(userId);

Assets Service

const result = await assets.upload('images/avatar.jpg', buffer, {
  contentType: 'image/jpeg'
});

const url = assets.getUrl('images/avatar.jpg');
await assets.delete('images/avatar.jpg');

Payments Service

const session = await payments.createCheckout({
  amount: 999, // cents
  currency: 'USD',
  description: 'Premium feature'
});

const status = await payments.getStatus(session.id);

Notifications Service

await notifications.send({
  userId: 'user_123',
  channel: 'email',
  template: 'welcome',
  data: { name: 'Alice' }
});

await notifications.schedule({
  userId: 'user_123',
  channel: 'push',
  message: 'Your report is ready',
  scheduledFor: '2025-12-25T10:00:00Z'
});

Social Service

await social.addComment({
  entityId: 'post_123',
  userId: 'user_456',
  content: 'Great post!'
});

await social.like('post_123', 'user_456');
const likes = await social.getLikes('post_123');
const comments = await social.getComments('post_123');

Security

  • All services are automatically scoped by app ID
  • Rate limiting enforced per app
  • API keys never exposed to client
  • All data isolated between apps
  • Type-safe APIs with full TypeScript support

License

Proprietary - All rights reserved