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-1/

{
  "context": "Evaluates how well the solution uses @nestjs/mongoose discriminator support to store article and video variants in one collection while exposing the required service API.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Base schema setup",
      "description": "Defines a parent schema with @Schema/SchemaFactory.createForClass (or equivalent) that sets a discriminatorKey and registers it via MongooseModule.forFeature or the model token helpers as the shared collection.",
      "max_score": 25
    },
    {
      "name": "Article discriminator",
      "description": "Registers an article discriminator (kind \"article\") on the parent model using the library’s discriminator configuration (discriminators array or model.discriminator) so wordCount/author fields are enforced on saves.",
      "max_score": 20
    },
    {
      "name": "Video discriminator",
      "description": "Registers a video discriminator (kind \"video\") on the parent model using the library’s discriminator configuration so durationSeconds/resolution fields are enforced on saves.",
      "max_score": 20
    },
    {
      "name": "Shared model usage",
      "description": "Creates, lists, and finds records through the parent model so both discriminator types land in the same MongoDB collection and come back with the correct subclass documents.",
      "max_score": 20
    },
    {
      "name": "DI wiring",
      "description": "Injects or retrieves the parent/discriminator models using @InjectModel, getModelToken, or equivalent NestJS Mongoose helpers rather than manual connections, enabling the service methods to call the registered discriminators.",
      "max_score": 15
    }
  ]
}

tile.json