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

@pluskode/client-expo

v0.1.1

Published

Pluskode Client SDK for Expo - Optimized for Expo managed workflow with HTTPS/WSS support

Readme

Pluskode Expo Client SDK

Expo-optimized client SDK for Pluskode Backend Framework.

Status

Ready - Optimized for Expo managed workflow

Features

  • ✅ HTTP client (HTTPS required in production)
  • ✅ WebSocket client (WSS required in production)
  • ✅ SSE client
  • ✅ gRPC client (via gRPC-Web)
  • ✅ MQTT client (over WebSocket)
  • ✅ Binary stream support (via WebSocket binary frames)
  • ✅ Automatic HTTPS/WSS enforcement
  • ✅ App Store/Play Store compliant
  • ✅ Pure JavaScript/TypeScript (no native modules)

Installation

npm install @pluskode/client-expo
# or
yarn add @pluskode/client-expo

Usage

Basic Setup

import { PluskodeExpoClient } from '@pluskode/client-expo';

// Production (HTTPS required)
const client = new PluskodeExpoClient({
    baseURL: 'https://api.example.com',
    timeout: 30000,
    retries: 3
});

// Development (localhost HTTP allowed)
const devClient = new PluskodeExpoClient({
    baseURL: 'http://localhost:3000',
    enforceSecure: false // Allow HTTP for localhost
});

HTTP Requests

// GET request
const users = await client.get('/api/users');

// POST request
const newUser = await client.post('/api/users', {
    name: 'John',
    email: '[email protected]'
});

// PUT, PATCH, DELETE
await client.put('/api/users/123', { name: 'Jane' });
await client.patch('/api/users/123', { email: '[email protected]' });
await client.delete('/api/users/123');

WebSocket

// Subscribe to channel (uses WSS automatically)
const unsubscribe = client.subscribe('chat/room1', (data) => {
    console.log('Message:', data);
});

// Send message
client.send('chat/room1', { text: 'Hello!' });

// Unsubscribe
unsubscribe();

Server-Sent Events (SSE)

const unsubscribe = client.subscribeSSE('/events/stream', (event) => {
    console.log('Event:', event.event, 'Data:', event.data);
});

// Close
unsubscribe();

gRPC (via gRPC-Web)

const user = await client.rpc(
    'UserService',
    'GetUser',
    { id: '123' }
);

MQTT (over WebSocket)

// Subscribe
const unsubscribe = client.subscribeMQTT(
    'sensors/temperature',
    (topic, message, qos) => {
        console.log(`${topic}: ${message} (QoS: ${qos})`);
    },
    { qos: 1 }
);

// Publish
await client.publishMQTT(
    'sensors/temperature',
    '25.5',
    { qos: 1, retain: false }
);

Expo Example

import React, { useEffect, useState } from 'react';
import { View, Text, FlatList } from 'react-native';
import { PluskodeExpoClient } from '@pluskode/client-expo';

const client = new PluskodeExpoClient({
    baseURL: __DEV__ ? 'http://localhost:3000' : 'https://api.example.com'
});

export function UsersScreen() {
    const [users, setUsers] = useState([]);
    const [messages, setMessages] = useState([]);

    useEffect(() => {
        // Load users
        client.get('/api/users')
            .then(res => setUsers(res.data))
            .catch(err => console.error(err));

        // Subscribe to chat
        const unsubscribe = client.subscribe('chat/room1', (data) => {
            setMessages(prev => [...prev, data]);
        });

        return () => unsubscribe();
    }, []);

    return (
        <View>
            <FlatList
                data={users}
                renderItem={({ item }) => <Text>{item.name}</Text>}
            />
            <FlatList
                data={messages}
                renderItem={({ item }) => <Text>{item.text}</Text>}
            />
        </View>
    );
}

Security & Compliance

HTTPS/WSS Enforcement

  • Production: HTTPS/WSS is automatically enforced
  • Development: HTTP/WS allowed only for localhost
  • App Store/Play Store: Fully compliant

Why HTTPS/WSS?

  1. App Store Requirements: iOS requires HTTPS for network requests
  2. Play Store Requirements: Android requires secure connections
  3. Security: Protects data in transit
  4. Expo Managed Workflow: No native modules, pure JS/TS

Differences from React Native Client

| Feature | Expo Client | React Native Client | |---------|-------------|---------------------| | Native Modules | ❌ Not supported | ✅ Can use native modules | | HTTPS Enforcement | ✅ Automatic | ⚠️ Manual | | Managed Workflow | ✅ Optimized | ⚠️ May require custom native code | | App Store Ready | ✅ Yes | ⚠️ Depends on setup |

Limitations

Since Expo managed workflow doesn't support custom native modules:

  • gRPC: Uses gRPC-Web (via HTTP/HTTPS) instead of native gRPC
  • MQTT: Uses MQTT over WebSocket instead of native MQTT
  • Binary Streams: Uses WebSocket binary frames instead of raw TCP

These limitations are acceptable for most use cases and ensure App Store/Play Store compliance.

Requirements

  • Expo SDK 45.0+
  • React Native 0.60+
  • TypeScript 5.0+ (optional)

License

MIT


Note: This client is optimized for Expo managed workflow. For bare React Native projects, use @pluskode/client-react-native instead.