mongodb-persistence

Installation
SKILL.md

MongoDB Persistence Skill

Installation: If not already installed, add the required packages:

  • pnpm add @efesto-cloud/entity (for IEntityMapper interface)
  • pnpm add @efesto-cloud/maybe (for nullable results)
  • pnpm add @efesto-cloud/mongodb-database-context (for transaction support)

Helps you build the persistence layer — document type, repository interface, implementation, and mapper — for a hexagonal architecture TypeScript/MongoDB project following the ports-and-adapters pattern.

Scope: document type, repository interface, repository implementation, mapper. Population (the system for eager-loading related entities via aggregation pipelines) is a separate concern with its own skill — this skill only declares the hook for it where needed, without implementing the internal machinery.

Assumes the entity class and DTO interface already exist and are correct. Read them before writing any persistence code.


Before You Write Anything

Installs
1
First Seen
Aug 7, 2026
mongodb-persistence — efesto-cloud/lib