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

@tristan2828/ui-foundation

v3.10.0

Published

Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.

Readme

@tristan2828/ui-foundation

npm release

The shared layer of a family of small, contract-first, database-backed React apps: shadcn primitives, the DataTable/EntityView/EntityForm composites, an app shell with session-cookie auth, the gateway's error seam, design tokens, lint rules, Playwright suites, and the conventions an AI agent follows to build on it. Apps upgrade by bumping the version.

Built for Vite + React 19 + TypeScript, Tailwind v4, shadcn/ui on Base UI, React Router 7 and TanStack Query. Start a new app from the template rather than installing this by hand: docs/create-an-app.md.

Entry points

| Import | What | |---|---| | @tristan2828/ui-foundation | AppShell, DataTable, EntityView, EntityForm, Markdown, ErrorState, MultiChoice, MultiReference, ListEditor, PasswordInput, RouteErrorBoundary, FoundationProviders, LoginRoute, RegisterRoute, useAuth, useTableUrlState, useDebouncedValue, createQueryClient, cn; types Page, AppError, QuerySpec | | @tristan2828/ui-foundation/ui/<name> | shadcn primitives: badge, button, calendar, card, checkbox, combobox, dialog, empty, field, input, input-group, label, popover, select, separator, sheet, sidebar, skeleton, sonner, spinner, switch, table, textarea, tooltip | | @tristan2828/ui-foundation/gateway | safeFetch, toAppError, networkError — for an app's src/api/gateway/ only | | @tristan2828/ui-foundation/mocks | MSW: authHandlers, resetMockAuth, getMockCurrentUser, MOCK_USER, exposeMswForE2E | | @tristan2828/ui-foundation/testing | Playwright: defineA11ySuite, defineMockModeBannerSuite, forceMswOverride, forceLoggedOut, waitForMswReady | | @tristan2828/ui-foundation/eslint | the lint rules, as a flat config: export default [...uiFoundation()] | | @tristan2828/ui-foundation/styles.css | tokens and base styles, after @import "tailwindcss"; | | @tristan2828/ui-foundation/openapi.yaml | the part of an app's API contract the package calls: /auth/* and the error bodies |

The ui-foundation command

Run from an app's root:

  • ui-foundation sync writes the conventions into the app: the rules block in AGENTS.md, docs/foundation/, and the agent files in .claude/ and .codex/. Run it after every upgrade and commit what it writes. sync --check (in verify) fails when they differ from the installed version.
  • ui-foundation check-contract [openapi.yaml] fails unless the app's spec contains the foundation's part unchanged. A path marked x-optional may be left out, and so may the components only such a path uses.
  • ui-foundation check-deps fails if package.json names a dependency missing from deps-allowlist.json.

Upgrading

npm install @tristan2828/ui-foundation@<version>
npx ui-foundation sync
npm run verify

Release notes: https://github.com/Tristan2828/ui-foundation/releases.

MIT licensed.