CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-nestjs--mongoose

NestJS module that provides seamless integration between NestJS and Mongoose ODM for MongoDB database operations

80

1.02x
Quality

Pending

Does it follow best practices?

Impact

80%

1.02x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

criteria.jsonevals/scenario-5/

{
  "context": "Evaluates how well the solution leverages @nestjs/mongoose factories and decorators to turn the catalog classes into both a runtime schema and a raw definition, including virtual exposure. Checks focus solely on correct use of SchemaFactory, DefinitionsFactory, and related decorators to satisfy the spec.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "SchemaFactory",
      "description": "buildProductSchema uses SchemaFactory.createForClass(Product) (or the module’s class-to-schema factory) instead of hand-written Mongoose schemas, honoring any @Schema options applied to the Product class.",
      "max_score": 20
    },
    {
      "name": "Field decorators",
      "description": "@Prop annotations (or equivalent) mark name and price as required strings/numbers, set inventoryCount default to 0, and declare tags as an array of strings so SchemaFactory carries these rules into the generated schema.",
      "max_score": 20
    },
    {
      "name": "Nested typing",
      "description": "Category and Dimensions are embedded via @Prop type metadata (e.g., type: () => Category/Dimensions or raw schema type hints) so SchemaFactory outputs nested subdocuments with required title/slug and optional width/height.",
      "max_score": 20
    },
    {
      "name": "Virtual setup",
      "description": "The fullTitle virtual is defined with @Virtual or schema.virtual and schema options enable JSON serialization of virtuals (e.g., @Schema({ toJSON: { virtuals: true }}) or schema.set), keeping the field non-persisted.",
      "max_score": 20
    },
    {
      "name": "DefinitionsFactory",
      "description": "buildProductDefinition calls DefinitionsFactory.createForClass(Product) (or equivalent) to emit the raw definition matching the schema’s required/default/array/subdocument settings, rather than duplicating field descriptions manually.",
      "max_score": 20
    }
  ]
}

tile.json