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

@incubrain/foundry

v0.11.0

Published

Nuxt layer for IncuBrain Foundry

Readme

@incubrain/foundry

A Nuxt 4 layer for marketing and validation sites that stream the full signal of whether they are working — visitor events and site errors alike — to an external consumer over an authenticated cursor endpoint.

Extending this layer gives you a content-driven site, the signal pipeline that feeds it, and an agent-readable surface. It does not give you a design system: the layer ships structure and signal, and your app supplies the taste.

Installation

npm install @incubrain/foundry
// nuxt.config.ts
export default defineNuxtConfig({
  extends: ['@incubrain/foundry'],
})

Requirements: Nuxt 4.x, Node 22+.

nuxt-llms ships as a real dependency — every site gets /llms.txt and /llms-full.txt with zero config, sections auto-populated from your content collections; set llms: {...} in your own nuxt.config.ts to override.

Optional peer dependencies, added in your own app when you want them: nuxt-studio (visual content editing), @iconify-json/lucide and @iconify-json/simple-icons (icon sets), better-sqlite3.

satori and @resvg/resvg-js are real dependencies: they render the layer's OG card (OgImageLanding.satori.vue), so a site does not install them itself.

The layer's dev tooling (@nuxt/eslint, @compodium/nuxt, @nuxt/hints) and @nuxt/test-utils/module load only when your app has them installed, so nuxt dev runs with just @incubrain/foundry and nuxt.

Styling

The layer compiles Tailwind once per site. Its generated entry (.nuxt/docus.css) is the only stylesheet that imports tailwindcss and @nuxt/ui. It then imports the layer's own tokens and utilities, and after them your Tailwind CSS. Your stylesheet holds directives only:

/* app/assets/css/theme.css — no @import 'tailwindcss', no @import '@nuxt/ui' */
@theme static {
  --color-primary-500: oklch(58% 0.15 250); /* bg-primary-500 etc. are generated */
}

@utility bg-hero { background-image: var(--hero); }
// nuxt.config.ts
css: ['~/assets/css/theme.css'],
  • Any css: file that uses Tailwind directives (@theme, @utility, @apply, @variant, @custom-variant, @plugin, @source, @reference) is taken out of the list and imported into that single entry, after the layer's CSS. Your @theme tokens override the layer's placeholders.
  • A css: file that still imports tailwindcss keeps working, but it runs a second full compilation: every utility, the preflight and Nuxt UI's CSS ship twice. The build warns about it. Delete its @import 'tailwindcss' and @import '@nuxt/ui' lines. That second compile also re-emitted Tailwind's and Nuxt UI's default theme after the layer's tokens. Once you delete the imports, the layer's own values apply to any token you never set: its neutral-* and info-* ramps replace Nuxt UI's ui.colors mapping for those utilities. To keep that mapping, add @theme inline { --color-neutral-500: var(--ui-color-neutral-500); … } to your stylesheet.
  • Plain CSS (no Tailwind directives) stays a separate stylesheet. Keep a remote @import url(…) (web fonts, for example) in a plain file, because an @import inside the Tailwind entry would no longer be at the top of the stylesheet.

What you get

Signal capture. Client events (useEvents()) and client errors are batched to POST /api/_signals/ingest; form captures and Nitro request errors are appended server-side. All of it becomes one SignalRow envelope in a capped ring buffer, pulled by a consumer at GET /api/_signals/export?since=<seq>&limit=<n≤2000> behind a bearer token. Every row carries a server-derived visitor.class of human, agent, or bot, and a cookieless visitor.hash (daily-salted hash of site + IP + User-Agent; nothing stored on the device, raw IP never stored, salt deleted at UTC midnight). Nothing is pushed out — no webhook forwarders, no analytics vendors, no second destination.

Identity events. Always on, for every visitor: ui.click, ui.section, and ui.page rows describing which authored thing was touched — never what was typed. No pixel coordinates, no input values, no keystrokes. Sections are identified by data-section (or a plain <section id>); SectionWrapper stamps it automatically. A ?polaris_review=<token> query param rides along as the row's own review field for one page load only, letting an external reviewer bind a review session to that day's visitor hash. Details in modules/events/AGENTS.md.

Convert components — the intent-capture surface, each wired to the event stream: ConvertForm, ConvertExternal, ConvertInternal, ConvertPricing, ConvertSocial, ConvertSocialShare, and ConvertRss.

Content collections. Zod schemas — basePageSchema, baseFaqSchema, baseConfigSchema, baseNavigationSchema, baseTeamSchema, bannerSchema — exported from @incubrain/foundry/schemas and composed in your own content.config.ts. Content lives in markdown and YAML, edited without touching code. basePageSchema carries two optional citation-first fields (see GEO content guide below): answer (a direct summary rendered before the body) and sources (a visible citation list rendered after it) — both additive, existing pages are unaffected.

Page structure. default, article, and landing layouts selected per route with an appLayout route rule, a catch-all content page, header/footer/banner components, MDC content components (AnswerBlock, StatGroup, CaseStudy, ComparisonList, FeatureGrid, FounderBio, FaqAccordion), and SectionWrapper — an accessible section primitive that fires a section_view_<id> event on intersection.

Agent-readiness. GET /api/_health — unauthenticated liveness+identity check for external monitors (Polaris), pure computation with Cache-Control: no-store. MCP tools (list-pages, get-page, what-changed) served by @nuxtjs/mcp-toolkit; the markdown-rewrite module (see below); @nuxtjs/seo for sitemap, robots, schema.org, link checking, and canonical redirects; a Satori OG image component for landing pages.

Raw markdown. Every content page also serves its own source, so a coding agent or an MCP-less LLM can read the document instead of scraping rendered HTML. Two access patterns, both handled by a Nitro middleware and so live on any Node/Docker/Railway deploy (and in dev), not just Vercel:

GET /blog/post.md                          # `.md` suffix (also `/raw/blog/post.md`)
GET /blog/post  -H 'Accept: text/markdown' # content negotiation on the canonical URL

Both answer text/markdown; charset=utf-8 with the file verbatim, frontmatter included — the source, not a re-render. Vary: Accept is set so caches key on the header, and the .md form carries a Link: <…>; rel="canonical" back to the HTML route. A .md URL with no content document 404s; Accept: text/markdown on a route with no markdown representation simply falls through to HTML. API, asset, and Nitro-internal routes are never intercepted. On Vercel the module additionally writes the legacy edge rules that make / serve llms.txt.

RSS. Config-driven feeds from any content collection — declare rss: { feeds: {} } in your app config and they are served at /rss/{key}.

GEO content guide

Research (Princeton/Georgia Tech) found inline citations, statistics, and named-expert quotes lift AI-citation rates 22–40% — more than any markup tactic. Nothing here requires new tooling: it's four content patterns, all optional and additive.

1. Answer-first structure. Open a page or section with a direct, quotable answer before the supporting detail — the shape generative engines lift verbatim.

  • Page-level: set answer in frontmatter; the article layout renders it in an AnswerBlock before the prose body automatically.
    ---
    title: Does Foundry replace Google Analytics?
    answer: No — Foundry streams raw signal for you to interpret; it ships no dashboards.
    ---
  • Mid-article: drop ::answer-block inline wherever a section needs its own summary: ::answer-block{answer="..." label="In short"}.

2. Statistics need a named source. A bare number is a claim; a sourced number is citable. Use StatGroup for a row of stats, each with an optional visible source:

::stat-group
---
stats:
  - value: "22–40%"
    label: AI-citation lift from citation-first content
    source: Princeton/Georgia Tech GEO study
    href: https://example.com/study
---
::

Omit source/href for a plain number — they're optional, but a stat without one is just decoration.

3. Named-expert quotes. CaseStudy doubles as the expert-quote pattern: give it client (name + role, company optional) and quote; add sourceUrl (where the quote was published) to get a semantic <blockquote cite> plus a visible citation line. Skip partner/website for a bare attributed quote — those are for customer testimonials.

4. Page-level sources. Set sources in frontmatter ([{ label, href }]) for a whole-page citation list; the article layout renders it as a visible, linked list after the body.

Checklist before publishing a page you want AI engines to cite:

  • [ ] Does the page (or its key sections) answer the question in the first paragraph?
  • [ ] Is every load-bearing statistic attributed to a named, checkable source?
  • [ ] Are expert claims attached to a real name and role, not "our team"?
  • [ ] Would the page still make sense read with zero JavaScript (SSR-rendered, no <ClientOnly> around anything a crawler needs)?

Configuration

NUXT_SIGNAL_EXPORT_TOKEN=<random-secret>   # bearer token for the export endpoint (unset → 503)
NUXT_PUBLIC_SITE_ID=my-site                # stamped on every signal row (defaults to request host)
NUXT_PUBLIC_SITE_URL=https://example.com   # canonical URL, consumed by @nuxtjs/seo
// nuxt.config.ts
events: {
  signals: { enabled: true, capacity: 170_000, captureErrors: true },
  debug: false,  // console.info every tracked event; the layer turns it on only under `nuxt dev`
}

Signal rows are held in useStorage('signals') — memory by default. Mount nitro.storage.signals to an fs or KV driver to survive restarts.

// app.config.ts
content: {
  decorateInternalLinks: false, // plain internal Markdown links: no file icon, no hover preview
},

The blog module's options (foundry.blog.*, the blog: copy in site.yml, and the BlogPostAfter / BlogIndexAfter extension components) are in modules/blog/README.md.

Not included

Email sequences, authentication, payment processing, in-product dashboards or charts, analytics vendor integrations, per-platform webhook notifiers, and an opinionated design system. Validation captures intent; products deliver value — mixing them creates scope creep.

Credits

Foundry's content and layout foundation is adapted from Docus (GitHub) by the Nuxt Content team. i18n was removed — browser-native translation is improving fast and maintaining translations slows shipping — and signal capture, agent-readiness, and the export endpoint were added. For Docus-inherited behaviour (MDC components, content collections, search, theming), the Docus documentation remains a good reference.

License

MIT