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

@vireocodedev/infrastructure

v0.3.0

Published

React-free Vireo browser infrastructure for validated HTTP transport, connectivity, persistence, and execution modes.

Readme

@vireocodedev/infrastructure

React-free browser infrastructure primitives for validated HTTP transport, connectivity, persistent state, session-expiry coordination, and execution-mode-aware services.

The package owns reusable mechanisms. Applications still own configured transports, endpoint vocabulary, authentication and routing, heartbeat adapters, persistence services, query caching, service-worker lifecycle, and product UI.

Install

npm install @vireocodedev/infrastructure axios zod @preact/signals-core

The package is published publicly on npm; installation requires no registry authentication. TypeScript declarations are verified from the packed artifact with TypeScript 6, moduleResolution: "Bundler", and skipLibCheck: false. Relative source maps with embedded source content are published intentionally for debugging.

The package has no React, MUI, React Query, locale, or application singleton dependency.

React adapters live in Starter UI:

import { useVireoOnlineStatus } from "@vireocodedev/ui";
import { createVireoPagedSearchQueries } from "@vireocodedev/ui/tanstack-query";

Public architecture

application runtime and policy
  -> createConnectivityState / getAppOnlineStatus
  -> createModeAwareApi
  -> AxiosHttpClient or postPagedSearch
  -> Zod-validated response data
  -> application cache and product state

application storage -> createPersistentSignal
application authentication -> createSessionExpiryChannel

All stateful factories are instance-scoped. Importing the package creates no query client, listeners, timers, session state, or storage state.

Mode-aware services

createModeAwareApi composes online and offline service modules behind one application API. The application injects the current mode, guards, fallback classification, timing, and diagnostics policy. transactional can mark offline methods whose writes should prefer the online implementation while connectivity exists.

HTTP and pagination

AxiosHttpClient centralizes injected Axios transport and Zod response validation. postPagedSearch validates the complete pageable envelope, not only its rows. Malformed filter JSON and invalid metadata fail closed.

sanitizeAxiosError produces a deliberately small diagnostic object and never exposes request bodies, headers, query strings, or response data.

Connectivity

getAppOnlineStatus and subscribeToAppNetworkStatus expose the browser's lightweight network hint. createConnectivityState combines that hint with optional heartbeat freshness and explicit backend availability. Runtime adapters own browser subscriptions and scheduling; the state factory enforces one active runtime owner.

Persistent state

createPersistentSignal mirrors one typed storage key into a Preact core signal. Persistence occurs before the in-memory signal changes, so a failed write cannot leave the two representations inconsistent.

Session expiry

createSessionExpiryChannel creates an isolated coordination channel. It deduplicates expiry notifications, suppresses them during intentional logout, and lets applications decide how listeners affect routing or authentication.

Failure semantics

  • Invalid HTTP data raises the original Zod error without logging raw payloads.
  • Malformed query filters fail before a request is sent.
  • Invalid pageable metadata is rejected at the API boundary.
  • Request cancellation is recognized without assuming DOM globals exist.
  • Connectivity policy and concurrent runtime ownership fail synchronously.
  • Persistence failures leave the signal unchanged.
  • Session listeners are isolated and may report failures through injected policy.

Verification and live documentation

Package tests cover public services, transport boundaries, connectivity lifecycle, persistence, session isolation, and the React-free contract. The unified Vireo Storybook contains executable examples under Infrastructure; every displayed source file is the same TypeScript module Storybook executes.