MongoDB + TypeScript
Type documents (interface or schema). Do not pass any through the driver.
Collection/module paths are defaults. Real directories come from the implement/tdd recon of package.json and tsconfig.json (monorepo, paths).
Defaults
- Indexes for fields you filter/sort on. Call out missing indexes when adding queries.
- Do not store secrets in documents. Do not print connection strings in chat.
vs Postgres
If the repo already uses Drizzle/Postgres, do not add Mongo “for variety”. Split databases only when the user wants a document store for a defined bounded context.