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

@kompojs/blueprints

v0.1.3

Published

Unified Kompo blueprints

Downloads

770

Readme

Blueprints & Starters Architecture

This document explains the organization and nomenclature of Starters and Blueprints in Kompo, and how the CLI uses them to generate projects.

1. Directory Structure (packages/blueprints)

The blueprints package is the single source of truth for all templates and definitions.

packages/blueprints/
├── elements/        # Technical building blocks (Blueprints)
│   ├── apps/        # Application templates (Next.js, Vite, etc.)
│   ├── libs/        # Shared libraries (Adapters, Domains, Ports)
│   │   ├── adapters/
│   │   ├── domains/
│   │   └── ui/      # Design Systems implementations
│   └── shared/      # Shared snippets and files
├── starters/        # User-facing entry points (Starters)
│   ├── nextjs/      # Starters for Next.js
│   │   ├── antd/    # Starters using Ant Design
│   │   │   ├── blank/   # "Blank" starter (starter.json)
│   │   │   └── starter.json # Base config for this family
│   │   └── ...
│   └── vite/        # Starters for Vite
└── ...

Key Distinction

  • Elements (elements/): These are the "Lego bricks". They contain the actual code templates (files/, snippets/) and technical definitions (blueprint.json). They are framework-agnostic where possible.
  • Starters (starters/): These are the "Models". They define combinations of bricks. A starter doesn't usually contain code; it contains a Recipe (starter.json) that tells the CLI which bricks to assemble.

2. File Roles

starter.json (The Recipe)

Located in products/starters/.... This is what the user selects when running kompo add app --template <id> or via the interactive starter picker.

Key Attributes:

  • id (required): Unique technical identifier (dot notation).
    • Example: nextjs.shadcn.blank
  • name (required): Human-readable display name.
    • Example: "Blank Project"
  • description: Short description shown in CLI.
  • steps: The Orchestration Array. This is the most important part. It defines the sequence of CLI commands to run to build this starter.

Example (nextjs/shadcn/blank/starter.json):

{
  "id": "nextjs.shadcn.blank",
  "name": "Blank",
  "steps": [
    {
      "command": "new", // 1. Initialize Project & Workspace
      "type": "app",
      "name": "web", // 2. Create 'apps/web'
      "driver": "nextjs", //    using Next.js driver
      "designSystem": "shadcn"
    },
    {
      "command": "add",
      "type": "adapter",
      "name": "auth-js", // 3. Add Auth Adapter
      "port": "auth-provider"
    }
  ]
}

blueprint.json (The Definition)

Located in elements/.... This defines a specific component (App, Adapter, Port).

Key Attributes:

  • id (required): Unique identifier (matching directory usually).
    • Example: stripe, nextjs
  • name: Human identifier.
    • Example: "Stripe Adapter"
  • type: app, adapter, feature, driver.
  • env: Environment variables definition (Zod schema generation).
  • requires: NPM dependencies or other blueprints.
  • provides: Capabilities (e.g., exports, factory name).

3. How the CLI Works (kompo add app)

When you run kompo add app --template <id> (or select a starter interactively):

  1. Selection: The CLI loads the starter.json corresponding to your choice.
  2. Validation: It validates the JSON against starter.schema.json.
  3. Extraction: It reads the steps array.
  4. Execution (The "Engine"):
    • The CLI executes each step logically, as if you ran them manually.
    • command: "new", type: "app" -> triggers AppGenerator.
    • command: "add", type: "adapter" -> triggers AdapterGenerator.
  5. Generation:
    • Generators look up the corresponding Elements in packages/blueprints/elements.
    • They copy files from elements/**/files to your project.
    • They render templates using Eta (.eta).
    • They inject dependencies into package.json.

Why this split?

This architecture allows Infinite Combinations. We don't need to maintain a "Next.js + Stripe + Tailwind" template AND a "Next.js + Stripe + MUI" template. We just have:

  • 1 Next.js Element
  • 1 Stripe Element
  • 1 Tailwind Element
  • 1 MUI Element

And we can create as many starter.json recipes as we want combining them differently.