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

@solid-stack/create

v1.0.7

Published

An interactive, type-safe CLI generator for scaffolding Solid Stack Clean Architecture features, usecases, domain entities, infrastructure, interfaces, httpHandlers, and injectables.

Readme

@solid-stack/create

An interactive, type-safe CLI for scaffolding and bootstrapping everything in the Solid Stack Clean Architecture ecosystem. Built with TypeScript, tsup, cac, and @clack/prompts.


🏗️ Clean Architecture Principles

@solid-stack/create enforces the architectural conventions of Solid Stack services (@solid-stack/agnos, @solid-stack/agnos-express, and @solid-stack/di):

features/<feature>/
├── domain/                    # Zero DI dependencies! Pure interfaces & entities
│   ├── <Entity>.ts            # Domain entity model / value object
│   └── I<Entity>Repository.ts # Domain repository / service abstract class (DI token & type)
├── infrastructure/            # Implementations of domain interfaces (@MakeInjectable)
│   └── Stub<Entity>Repository.ts # In-memory stub with test helpers (clear, setError, etc.)
├── useCases/                  # Business logic (@MakeInjectable)
│   ├── <UseCase>.ts           # Use case class with typed input/output DTOs & execute()
│   └── <UseCase>.test.ts      # Vitest unit test with DI container & mock stubs
├── pxExpress/                 # Express presentation layer (@solid-stack/agnos-express)
│   ├── index.ts               # Route prefix (export const path = "/<feature>")
│   └── handlers/              # Route handlers extending ExpressRoute
│       └── <Handler>Http.ts   # HTTP endpoint with @MakeInjectable & Zod validation
└── diProvider.ts              # Feature DI module registering domain interface -> infrastructure bindings

🚀 Installation & Quick Start

Run interactively via npx or pnpm dlx:

# Launch interactive wizard
npx @solid-stack/create

# Or run specific commands directly
npx @solid-stack/create feature users
npx @solid-stack/create usecase CreateUser -f users
npx @solid-stack/create domain User -f users
npx @solid-stack/create infrastructure StubUserRepository -f users
npx @solid-stack/create interface IUserRepository -f users
npx @solid-stack/create httpHandler CreateUserHttp -f users
npx @solid-stack/create injectable PasswordHasher

🛠️ Commands Reference

1. @solid-stack/create feature [name]

Scaffolds a complete Clean Architecture vertical slice with domain models, interface abstract classes, infrastructure stubs, use cases, Express presentation routes, and a feature DI provider.

# Interactive prompt for feature details
npx @solid-stack/create feature

# Specify feature name directly
npx @solid-stack/create feature billing

# Non-interactive mode with default choices
npx @solid-stack/create feature orders --yes

# Exclude Express presentation layer
npx @solid-stack/create feature auth --no-express

Prompts:

  • Feature name (e.g. users, auth, billing)
  • Target directory (defaults to ./features/<feature>)
  • Include Express presentation (pxExpress) and route prefix path
  • Include initial Domain Entity
  • Include initial Domain Interface
  • Include initial Infrastructure Stub
  • Include initial Use Case and Vitest test
  • Include feature DI Provider (diProvider.ts)

2. @solid-stack/create usecase [name]

Creates a business logic use case decorated with @MakeInjectable, typed input/output DTOs, constructor dependency injection via DepsType, and optional Vitest tests and HTTP route handlers.

npx @solid-stack/create usecase CreateUser -f users

Prompts:

  • Target feature (scans existing features under ./features/)
  • Use Case name (e.g. CreateUser, GetUser, CancelOrder)
  • Injected dependencies (scans existing domain interfaces I*.ts for multi-selection)
  • Input DTO properties
  • Output DTO properties
  • Generate Vitest unit test (<UseCase>.test.ts)
  • Generate matching Express HTTP handler in pxExpress/handlers/

3. @solid-stack/create domain [name]

Creates a domain entity, model, or value object. Enforces the strict rule: zero DI dependence (@solid-stack/di or @MakeInjectable are never imported into domain entities).

npx @solid-stack/create domain User -f users

Prompts:

  • Target feature
  • Model name (e.g. User, Invoice, CartItem)
  • Model type:
    • TypeScript Interface: Lightweight data structure
    • Entity Class: Class with constructor and typed properties
    • Value Object: Immutable class with private constructor, static create(), and equals()
  • Interactive property definitions (name, type, optional)

4. @solid-stack/create interface [name]

Creates a domain repository or service interface abstract class. In Solid Stack, abstract classes are preferred over plain interfaces because they exist at runtime and serve directly as type-safe DI tokens.

npx @solid-stack/create interface IUserRepository -f users

Prompts:

  • Target feature
  • Interface name (automatically formats to I<Name>Repository or I<Name>Service)
  • Style: Abstract Class (recommended for DI) or TypeScript Interface
  • Associated domain entity (scans existing entities in domain/)
  • Method signature preset (Standard CRUD or custom)
  • Auto-generate infrastructure Stub (Stub<Name>)
  • Auto-register binding in diProvider.ts

5. @solid-stack/create infrastructure [name]

Creates an infrastructure adapter or in-memory stub implementing a domain interface.

# In-memory stub with test helpers
npx @solid-stack/create infrastructure StubUserRepository -f users

# Concrete production adapter
npx @solid-stack/create infrastructure PostgresUserRepository -f users

# Global infrastructure (e.g. ConsoleLogger in infrastructure/)
npx @solid-stack/create infrastructure ConsoleLogger --global

Prompts:

  • Scope: Feature-level (features/<feature>/infrastructure) or Global (infrastructure/)
  • Target feature
  • Class name (e.g. StubUserRepository, PostgresUserRepository)
  • Implemented domain interface (scans domain/I*.ts)
  • Kind: In-Memory Stub (with in-memory Map, test helper methods clear(), setError(), getAll()) or Concrete Adapter Skeleton
  • Auto-register in feature diProvider.ts

6. @solid-stack/create httpHandler [name]

Creates an Express route handler extending ExpressRoute for @solid-stack/agnos-express, decorated with @MakeInjectable and exported as default. Automatically creates pxExpress/index.ts route prefix if missing.

npx @solid-stack/create httpHandler GetUserHttp -f users -m get -p /:id

Prompts:

  • Target feature
  • Handler class name (e.g. CreateUserHttp, GetUserHttp)
  • HTTP method: GET, POST, PUT, PATCH, DELETE
  • Route subpath (e.g. /, /:id)
  • Connect to domain Use Case (scans existing use cases in the feature)
  • Inbound validation with Zod (req.body, req.query, or req.params)
  • Schema field definitions

7. @solid-stack/create injectable [name]

Creates a generic @MakeInjectable class for services, transformers, or utilities across the architecture.

npx @solid-stack/create injectable PasswordHasher
npx @solid-stack/create injectable UserTransformer -f users

Prompts:

  • Class name
  • Architectural location:
    • Feature Service (features/<feature>/services/)
    • Feature Transformer (features/<feature>/pxExpress/transformers/)
    • Shared Service (shared/<name>/)
    • Core Module (modules/<name>/)
    • Custom path
  • Injected dependencies
  • Generate runtime abstract class interface / DI token

💻 Programmatic Usage

You can import generators directly into scripts or build pipelines:

import {
  generateFeature,
  generateUseCase,
  generateDomain,
  generateInterface,
  generateInfrastructure,
  generateHttpHandler,
  generateInjectable,
  updateOrGenerateDiProvider,
} from "@solid-stack/create";

// Scaffold feature programmatically
const files = generateFeature({
  name: "billing",
  includeExpress: true,
  includeTests: true,
});

🏗️ Development & Scripts

| Command | Description | | --- | --- | | pnpm dev | Starts tsup in watch mode | | pnpm build | Compiles ESM/CJS bundles and declaration files to dist/ | | pnpm test | Runs the full Vitest test suite | | pnpm typecheck | Typechecks using TypeScript (tsc --noEmit) | | pnpm check | Runs typecheck, tests, and build in sequence |


📄 License

UNLICENSED © Solid Stack Digital