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

@texakey/frontend-sdk

v0.1.0

Published

Reusable frontend infrastructure for authentication, tenancy, permissions, feature gates, API access, deployment modes, and runtime configuration.

Downloads

109

Readme

@texakey/frontend-sdk

Shared frontend infrastructure for Texakey product apps. This package contains auth, tenant resolution, RBAC, feature gates, API client setup, deployment helpers, and runtime config helpers.

This repo is a library, not a Next.js app. Product repos such as EHR, admin, AI, or portal apps run Next.js and install this SDK.

Package Workflow

Install dependencies:

npm install

Run local checks:

npm run typecheck
npm run build
npm run test

Watch SDK source while developing:

npm run dev

Preview the package that npm would publish:

npm run pack:dry

Use In A Next.js Repo

For local development, add the SDK as a file dependency in the product repo:

{
  "dependencies": {
    "@texakey/frontend-sdk": "file:../frontend-sdks"
  }
}

Then install from the product repo:

npm install

Add the SDK to next.config.ts:

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  transpilePackages: ["@texakey/frontend-sdk"],
};

export default nextConfig;

Create a client-side provider wrapper in the Next.js app, for example app/providers.tsx:

"use client";

import type { ReactNode } from "react";
import {
  AuthProvider,
  FeatureProvider,
  PermissionProvider,
  TenantProvider,
  createStorageAuthAdapter,
  createTenantFromSubdomain,
  loadRuntimeConfig,
} from "@texakey/frontend-sdk";

const runtimeConfig = loadRuntimeConfig({
  apiBaseUrl: process.env.NEXT_PUBLIC_API_BASE_URL ?? "http://localhost:3001",
  productKey: process.env.NEXT_PUBLIC_PRODUCT_KEY ?? "platform-admin",
  environment: process.env.NEXT_PUBLIC_APP_ENV ?? "local",
  features: {},
});

const authAdapter = createStorageAuthAdapter();

export function Providers({ children }: { children: ReactNode }) {
  return (
    <AuthProvider adapter={authAdapter}>
      <TenantProvider
        resolver={() => createTenantFromSubdomain()}
      >
        <PermissionProvider roles={[]} permissions={[]}>
          <FeatureProvider features={runtimeConfig.features ?? {}}>
            {children}
          </FeatureProvider>
        </PermissionProvider>
      </TenantProvider>
    </AuthProvider>
  );
}

Wrap the root layout:

import type { ReactNode } from "react";
import { Providers } from "./providers";

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html lang="en">
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}

Run the product app:

npm run dev

Best Pre-Ship Test

Before publishing, test the exact package shape in a product repo:

cd ../frontend-sdks
npm run typecheck
npm run build
npm pack

Then install the tarball in a Next.js product repo:

cd ../texakey-platform-admin
npm install ../frontend-sdks/texakey-frontend-sdk-0.1.0.tgz
npm run dev
npm run build

If both next dev and next build pass, the SDK is ready to publish.

Publish

The package is scoped as @texakey/frontend-sdk. Choose the access mode that matches your registry policy.

npm publish --access public

For a private npm organization package:

npm publish --access restricted

After publishing, product repos install it normally:

npm install @texakey/frontend-sdk

Import Paths

Use the root export for most app code:

import { AuthProvider, createApiClient } from "@texakey/frontend-sdk";

Use subpath exports when a repo only needs one area:

import { AuthProvider } from "@texakey/frontend-sdk/auth";
import { PermissionGate } from "@texakey/frontend-sdk/rbac";
import { FeatureGate } from "@texakey/frontend-sdk/feature-gates";