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

@expo/snapback-vite

v0.1.29

Published

Managed Snapback Vite dev plugin: mode-aware backend lifecycle, /__snapback app-route proxy allowlist, and structured diagnostics.

Readme

@expo/snapback-vite

@expo/snapback-vite is Snapback's local-development Vite plugin. It attaches to or manages the backend lifecycle, resolves generated imports through the digest-verified codegen cache, exposes sanitized state through virtual:snapback/dev, and relays only allowlisted application-data HTTP and WebSocket routes under /__snapback.

This is a project development dependency, not a production server adapter or a general reverse proxy. The React starter created by @expo/snapback-cli installs and configures it already. Install it directly only when adding the managed Snapback loop to an existing Vite application.

Add the managed development integration

For a new application, the supported route is the prepared starter:

npm install --global @expo/snapback-cli
snapback new my-app --template react
cd my-app
bun install
bun run dev

An existing Vite application can use the same plugin shape:

import { defineConfig } from 'vite';
import { snapbackDev } from '@expo/snapback-vite';

export default defineConfig({
  plugins: [
    snapbackDev({
      server: { mode: 'managed', port: 3210 },
      setup: { backendDirectory: 'snapback' },
      generatedRoots: ['snapback/generated'],
    }),
  ],
});

Run that configuration with the application's ordinary Vite command. The plugin consumes the fixed-port/external-client profile of snapback dev, pins Vite's actual loopback origin with strictPort, declares that exact origin to the backend lifecycle, and waits for the authoritative snapback.application-ready.v1 receipt. Attach mode compares the receipt's complete application, authority, artifact, target-profile, capability, and admission bind-set with live operational readiness before asking the shared CLI lifecycle to perform its idempotent generated load and binding reissue. An expired binding is reissued only after that identity cut. Browser code receives a same-origin projection of the receipt-issued binding at /__snapback; the backend origin, admin token, receipt/runtime paths, and qualified-binary facts remain private.

The relay registry includes the exact server-registered methods under /auth/password/* and /auth/recovery/*, so the generated binding supports signup, sign-in, recovery, logout, and live data on that one page origin. This is not a broad /auth/* proxy; unknown and privileged auth routes remain refused. See the served Guide's authoring loop.

Documentation outside a checkout

A running Snapback server serves the Guide compiled into that exact build. These links use the first default development port; use the origin printed by snapback dev or snapback start if yours differs.

  • Follow the authoring loop for the complete React/Vite development flow.
  • Read generated artifact custody for verified generated-import behavior.
  • Read first: the start packets — the budgeted per-template first read (LLP 0259).
  • Look up (do not linear-read) the capability index before assuming a relayed route or target is supported.
  • Run snapback guide or snapback guide <query> to browse or search the embedded Guide.
  • Run snapback mcp for the same build-bound corpus as read-only MCP resources, starting at snapback-guide://manifest.