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

@enfyra/sdk-nuxt

v1.0.2

Published

Nuxt module for Enfyra — SSR-safe client, composables, and cookie bridge proxy

Readme

@enfyra/sdk-nuxt

Nuxt 3/4 module for Enfyra. Cookie-bridge auth, SSR-safe request-scoped client, and auto-imported composables.

Install

yarn add @enfyra/sdk-nuxt @enfyra/sdk-core

Set ENFYRA_APP_URL in your environment — that's it:

ENFYRA_APP_URL=https://admin.example.com
export default defineNuxtConfig({
  modules: ['@enfyra/sdk-nuxt'],
})

If you prefer config over env (e.g. for multi-tenant or per-environment overrides), set enfyra.appUrl instead — it takes precedence over the env var:

export default defineNuxtConfig({
  modules: ['@enfyra/sdk-nuxt'],
  enfyra: {
    appUrl: 'https://admin.example.com',
  },
})

No plugin, server middleware, route rule, or cookie handler needs to be written manually.

Options

All options are optional. appUrl falls back to ENFYRA_APP_URL when omitted.

| Option | Type | Default | Notes | |---|---|---|---| | appUrl | string | process.env.ENFYRA_APP_URL | Server-only. Overrides the env var when set. | | routePrefix | string | '/enfyra' | Exposed to browser as the cookie-bridge proxy prefix. |

Composables

All composables are auto-imported — no manual imports needed.

useEnfyra

Returns the EnfyraClient instance for direct API access.

const client = useEnfyra()
const { data } = await client.get('/projects')

useAuth

const { user, isAuthenticated, pending, login, logout, refresh, oauthLogin } = useAuth()

await login({ email: '[email protected]', password: '...' })
oauthLogin('google')

useQuery / useMutation

const { data, error, pending, meta, refresh } = useQuery('articles', {
  select: 'id,title,status',
  filter: { status: { _eq: 'published' } },
  limit: 20,
})

const { execute, pending: saving } = useMutation('articles')
await execute({ data: { title: 'Hello' } })

useStorage

const { upload, uploading, download, getDownloadUrl, getFolderTree } = useStorage()
const file = await upload(fileInput.files[0], { folder: 1 })

useWebSocket

const ws = useWebSocket('cloud', { immediate: true })
ws.on('cloud:project-changed', (event) => { ... })

SSR behavior

  • One EnfyraClient per incoming request; never cached across requests.
  • Forwards the request's Cookie and Authorization headers to the Enfyra App.
  • Appends rotated Set-Cookie headers back to the SSR response.
  • Browser traffic uses the same-origin /enfyra proxy with HttpOnly cookies.

What the module does

  • Proxies /${routePrefix}/**${appUrl}/api/** with manual redirects.
  • Creates a request-scoped client (SSR) or singleton (CSR) via a Nuxt plugin.
  • Auto-imports all composables.
  • Sets cookieBridgePrefix for OAuth redirect flows.