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

@aerostack/sdk-react-native

v0.8.13

Published

Aerostack SDK for React Native

Readme

@aerostack/sdk-react-native

npm version License: MIT

The official React Native SDK for Aerostack. Build mobile apps with unified access to authentication, database, caching, storage, AI, and realtime services.

Features

  • Authentication — Email/password sign-in, sign-up, and session management
  • Database — Execute SQL queries against D1 and Postgres
  • Cache — Key-value caching with TTL, bulk operations, and atomic counters
  • Storage — Upload, download, and manage files
  • Queue — Background job scheduling and tracking
  • AI — Chat completions, vector search, and embeddings
  • Realtime — WebSocket subscriptions with presence tracking, pub/sub, and chat history
  • Expo Compatible — No native linking required in managed workflows

Installation

npm install @aerostack/sdk-react-native
# or
yarn add @aerostack/sdk-react-native
# or
pnpm add @aerostack/sdk-react-native

Expo: This SDK uses standard fetch and web-compatible APIs, so it works out of the box with Expo managed workflows — no native linking or ejecting required.

Quick Start

Initialize the SDK

import { Aerostack } from '@aerostack/sdk-react-native';

const client = new Aerostack({
  projectUrl: 'https://your-project.aerostack.dev',
  apiKey: 'your-public-api-key',
});

Authentication

// Sign up a new user
const { user, token } = await client.auth.signUp({
  email: '[email protected]',
  password: 'securePassword123',
});

// Sign in an existing user
const session = await client.auth.signIn({
  email: '[email protected]',
  password: 'securePassword123',
});
console.log('Logged in:', session.user.id);

Database Queries

// Execute a parameterized query
const users = await client.db.query(
  'SELECT * FROM users WHERE active = ? LIMIT ?',
  [true, 10]
);

Cache Operations

// Set a value with TTL
await client.cache.set('session:abc', { userId: '123' }, { ttl: 3600 });

// Retrieve a cached value
const session = await client.cache.get('session:abc');

Storage

// Upload a file
await client.storage.upload('avatars/user-123.jpg', fileBlob);

// Get a signed URL
const url = await client.storage.getUrl('avatars/user-123.jpg');

AI Chat

const response = await client.ai.chat({
  messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);

Realtime Subscriptions

// Subscribe to database changes
const channel = client.realtime.channel('todos');

channel.on('INSERT', (payload) => {
  console.log('New todo:', payload);
});

channel.on('UPDATE', (payload) => {
  console.log('Updated todo:', payload);
});

await channel.subscribe();

// Publish custom events
await channel.publish('typing', { userId: 'user-123' });

// Track user presence
await channel.track({ userId: 'user-123', status: 'online' });

Connection Status

client.realtime.onStatusChange((status) => {
  // status: 'idle' | 'connecting' | 'connected' | 'reconnecting' | 'disconnected'
  console.log('Realtime status:', status);
});

API Key Management

You can update the API key at runtime (useful after authentication):

client.setApiKey('new-api-key');

Error Handling

try {
  await client.auth.signIn({ email, password });
} catch (error) {
  if (error.status === 401) {
    console.error('Invalid credentials');
  } else if (error.status === 429) {
    console.error('Rate limited, try again later');
  } else {
    console.error('Unexpected error:', error.message);
  }
}

Configuration Options

const client = new Aerostack({
  projectUrl: 'https://your-project.aerostack.dev',  // Required
  apiKey: 'your-public-api-key',                       // Required
  maxReconnectAttempts: 10,                             // Realtime reconnection limit (default: Infinity)
});

Related Packages

| Package | Use Case | |---------|----------| | @aerostack/react | React web apps with hooks | | @aerostack/web | Vanilla JS browser apps | | @aerostack/node | Node.js server-side | | @aerostack/sdk | Cloudflare Workers (server + client) |

Documentation

For full documentation, visit docs.aerostack.dev.

License

MIT