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

@mostajs/orm-samples

v0.2.0

Published

Runnable samples covering 100% of @mostajs/orm's llms.txt — copy-paste install per feature.

Downloads

276

Readme

@mostajs/orm-samples

Runnable samples covering 100% of @mostajs/orm's public API — copy-paste install per feature.

Auteur : Dr Hamid MADANI [email protected] Statut : V1 — Lot 1 (samples 01-05) livré


Pourquoi ce module ?

Chaque sample démontre une fonctionnalité de @mostajs/orm en moins de 100 lignes de code, runnable en une commande, sans framework parasite (pas d'Express, pas de Next.js — juste l'ORM).

Couverture cible : chaque ligne du llms.txt de @mostajs/orm est démontrée par au moins un sample (garde-fou via test pérenne).

Install rapide

# 1. Lister tous les samples
npx @mostajs/orm-samples list

# 2. Scaffolder un sample chez vous
npx @mostajs/orm-samples scaffold <feature> ~/my-app

# 3. Lancer
cd ~/my-app && ./<feature>.sh

Pattern d'install copier-coller (par feature)

Chaque sample s'installe via 4 commandes :

# 1. Install package (cwd ne compte pas — temporaire)
mkdir tmp && cd tmp && npm init -y && npm install @mostajs/orm-samples

# 2. Copy the scaffold to your project location
cp -r node_modules/@mostajs/orm-samples/examples/<feature> ~/my-<feature>-app
cd ~/my-<feature>-app
rm -rf ../tmp

# 3. Install external resources éventuelles (driver SGBD, ffmpeg, etc.)
sudo apt install <package>           # ou : brew install <package>

# 4. Launch (auto-handles npm install)
./<feature>.sh

Catalogue (Lots 1 & 2 — Fondamentaux + CRUD & queries)

Lot 1 — Fondamentaux

| # | Sample | Démontre | |---|---|---| | 01 | 01-quickstart-sqlite | Pattern de base : createConnection + BaseRepository + create + findOne | | 02 | 02-multi-dialect-switch | getConfigFromEnv + DialectType + DIALECT_CONFIGS — un seul code, plusieurs SGBD | | 03 | 03-isolated-connections | createIsolatedDialect + connexions nommées pour multi-tenant | | 04 | 04-schema-registry | Registre global registerSchema/getSchema/validateSchemas/clearRegistry | | 05 | 05-types-cles-entity-schema | Tous les FieldType/FieldDef/IndexDef + softDelete + discriminator |

Lot 2 — CRUD & queries

| # | Sample | Démontre | |---|---|---| | 06 | 06-base-repository-crud | 15 méthodes BaseRepository : create/read/update/delete + atomic (increment/addToSet/pull) + upsert + search/distinct | | 07 | 07-filter-query-mongodb-like | 12 opérateurs FilterOperator ($eq/$ne/$gt/$gte/$lt/$lte/$in/$nin/$regex/$exists/$or/$and) + QueryOptions complets | | 08 | 08-aggregate-pipeline | Pipeline d'agrégation $match+$group+$sort+$limit (MongoDB-only) | | 09 | 09-findbyid-polymorphic | 4 formes de findById (string / {id} / natural key / composite) + extractRelId + OrmIntrospectionError |

Lots suivants (cf. ROADMAP propriétaire entreprise) : Relations & lifecycle (10-15), Plugins & sous-modules (16-18), Validator & erreurs (19-25).

CLI mostajs-orm-samples

mostajs-orm-samples list                       # liste les samples
mostajs-orm-samples list --json                # machine-readable
mostajs-orm-samples scaffold <feature> [dest]  # copie le scaffold
mostajs-orm-samples check <feature>            # ressources requises
mostajs-orm-samples help [feature]             # aide globale ou par sample

Licence

AGPL-3.0-or-later — voir LICENSE.