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

sml-baseline

v1.0.12

Published

Baseline features for the SML framework, pensati per essere esposti come un package npm che riutilizzi i moduli Nest già presenti nel repository.

Readme

sml-baseline

Baseline features for the SML framework, pensati per essere esposti come un package npm che riutilizzi i moduli Nest già presenti nel repository.

Descrizione della proposta npm

Questo package espone i tool condivisi (controller di base, servizi CRUD e DTO di supporto) e i moduli applicativi (smlentity, smlgrid, smlform, ecc.) in modo che possano essere importati da altri progetti Nest. La build sfrutta lo schema Nest CLI già presente (nest build), mentre gli script start:dev, lint, test e doc sono configurati per esporre la stessa esperienza di sviluppo usata nel repository di partenza. È pensato per fornire:

  • Moduli riutilizzabili (es. smlentity, smlgrid, smlquery, smlform, ecc.) che espongono controller, service, DTO, entità Mongoose e schemi MongooseModule.forFeature.
  • Utility comuni (common/config, common/constants, common/dto, common/interceptors, common/logger, common/utility) che standardizzano configurazioni di query, risposte API, log e filtri globali.
  • Controller/servizi di base (common/core) che wrappano le operazioni CRUD con guardie, Swagger e gestione degli errori, pronti per essere estesi o istanziati dinamicamente tramite createCrudController.

L’idea è che il package distribuisca questi moduli (esportandoli da un barrel src/index.ts o simile) in modo che un altro progetto Nest possa fare import { SmlentityModule } from 'sml-baseline' e avere subito tutta la logica di base.

Gerarchia delle classi e dei file principali

La struttura del repository può essere vista come una serie di moduli Nest affiancati da utility condivise:

  • common/

    • core/
      • SmlBaseController.ts / SmlBaseService.ts: controller e servizio astratti che gestiscono le rotte CRUD (create, findAll, findOne, update, remove) con serializzazione JSON e gestione degli errori standard Nest.
      • CrudControllerFactory.ts + CrudOptions.ts: helper che generano dinamicamente controller CRUD con guardie di autorizzazione (AuthorizationGuard, RoleGuard), decorator Swagger e versioning (es. @Version('1')).
    • config/: file JSON che definiscono filtri, limiti, paginazione, proiezioni e risposte standard per l’API REST.
    • constants/, dto/, enum/, interceptors/, logger/, utility/: costanti, DTO condivisi, enumerazioni, interceptor (es. per log o trasformazioni), logger basato su Winston e funzioni di utilità per la trasformazione dei payload.
  • Moduli funzionali (ognuno con module, controller, service, dto, entities):

    • smlentity/: gestisce le entità principali, include SmlentityModule, SmlentityController, SmlentityService (che crea query, form e grid di default), DTO per create/update e la definizione dell’entità Mongoose.
    • smlgrid/, smlform/, smlquery/, smlappmenu/, smlattachments/, smlchart/, smlcomposedview/, smlconfig/, smlcustomcode/, smlcustomfunction/, smlentity-definition/, smlentity-manager/, smlflowpanels/, smlflowpanelanalistance/, smlnavigationpanels/, smlrecordlink/, smlrecordlock/, smlview/, smlproxy-query/: ciascun modulo contiene i rispettivi controller, service e DTO, espone il proprio schema Mongoose e implementa la logica business-layer specifica (es. gestione di viste, pannelli, query proxy, link/lock dei record, pannelli di navigazione, ecc.).
  • Ogni modulo espone test (*.controller.spec.ts, *.service.spec.ts) pronti per essere riutilizzati in una pipeline CI/CD, e può essere registrato nel modulo principale dell’app Nest (es. AppModule) tramite importazione diretta.

Con questa base, il package npm deve fornire un entrypoint documentato che spiega come installare (npm install sml-baseline), configurare (es. @nestjs/config + file JSON), e importare i moduli più usati per comporre un’applicazione SML completa su Nest.