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

@async/web

v0.2.0

Published

Developer-facing Async app framework that lowers app conventions into WebRuntime configs.

Readme

@async/web

Developer-facing app framework for Async Web.

defineApp() records app topology and lowers it into @async/web/runtime config. Start with explicit apps and routes when the app is multiple systems wired together.

import {
  browserApp,
  defineApp,
  fetchApp,
  mount,
  toApp
} from '@async/web';

export default defineApp({
  origin: 'https://crm.acme.async.run',
  apps: {
    web: browserApp({
      document: './apps/web/index.html',
      basePath: '/',
      fallback: 'spa'
    }),
    api: fetchApp({
      runtime: 'origin',
      basePath: '/api/',
      fetch: apiFetch
    })
  },
  routes: [
    mount('/api', toApp('api')),
    toApp('web')
  ]
});

App names are arbitrary. browserApp() creates a static browser FetchApp, fetchApp() preserves raw Fetch handlers, and asyncDbApp() mounts the AsyncDB adapter when the DB app should be explicit in apps. Convention shortcuts such as api: { dir: './src/api' } and db: dbConfig are still supported for projects that want the defaults.

The framework defaults live in asyncWebDefaultConfig, exported from @async/web, so app authors and contributors can see the internal baseline that defineApp() merges user config against.

Configs compose recursively:

import crm from '../crm/async.config';
import admin from '../admin/async.config';
import {
  defineApp,
  mount,
  toApp
} from '@async/web';

export default defineApp({
  name: 'root',
  apps: {
    crm,
    admin
  },
  routes: [
    mount('/crm', toApp('crm')),
    mount('/admin', toApp('admin'))
  ]
});

Child apps can declare local dev intent with dev: { port, strictPort }. Routes stay logical and never point at localhost ports directly.

Root apps can also compose remote apps by contract. remoteApp() records the remote endpoint and manifest path; envValue() selects topology values during build/dev orchestration, and buildEnv() marks values supplied by deploy infrastructure.

import {
  buildEnv,
  defineApp,
  envValue,
  remoteApp
} from '@async/web';

export default defineApp({
  apps: {
    identity: remoteApp({
      endpoint: envValue({
        local: 'http://127.0.0.1:4102',
        staging: buildEnv('IDENTITY_STAGING_URL'),
        production: buildEnv('IDENTITY_PRODUCTION_URL')
      }),
      manifest: '/.well-known/async-app.json'
    })
  },

  connections: {
    data: {
      'crm.users': envValue({
        local: 'identityLocal.contracts.public.users',
        production: 'identity.contracts.public.users'
      })
    },
    auth: {
      provider: 'identity'
    },
    api: {
      'crm.identity': 'identity.contracts.public.operations'
    },
    events: {
      'crm.customer.created': ['identity.contracts.internal.events.audit']
    }
  }
});

Use routes for HTTP request flow. Use connections for app dependencies and contract wiring. envValue() is for topology values such as endpoints, contract refs, route targets, provider hints, and deployment names; keep secrets in a separate binding model.