docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates how well the solution uses @nestjs/mongoose to register schemas as injectable models on default and named connections. Checks async model factories and whether models are exported for injection in downstream providers.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Default forFeature",
"description": "Uses MongooseModule.forFeature to register the Book schema on the default connection with the fields in the spec, and injects it via @InjectModel('Book') or getModelToken('Book') for create/read operations.",
"max_score": 25
},
{
"name": "Analytics connection",
"description": "Registers the Audit schema with MongooseModule.forFeature using connectionName 'analytics' (or equivalent) and injects it via @InjectModel('Audit', 'analytics') / getModelToken('Audit', 'analytics') so writes go to the named connection only.",
"max_score": 20
},
{
"name": "Async model factory",
"description": "Implements MongooseModule.forFeatureAsync (or AsyncModelFactory array) for the FeatureFlag schema with a useFactory that awaits config, applies the collection suffix, and returns the schema definition before registration.",
"max_score": 20
},
{
"name": "Model injection",
"description": "Services/providers obtain Book, Audit, and FeatureFlag models through @InjectModel or getModelToken rather than manual connections, demonstrating proper @nestjs/mongoose DI integration.",
"max_score": 20
},
{
"name": "Exports for reuse",
"description": "CatalogModule exports the configured MongooseModule (and related providers) so consumer modules can inject Book and Audit models without redeclaring schemas, matching @nestjs/mongoose module export patterns.",
"max_score": 15
}
]
}