Project rules
MongoDB Rules
Project rules for MongoDB: schema design around queries, deliberate indexes, schema validation, projections and no unbounded arrays.
CLAUDE.md
1Schema design
2- Model for the access pattern. Embed data that is read together and changes together; reference data that is shared or large. Write down each collection's read and write queries in a comment or doc.
3- Never let an array grow without bound. Cap it, bucket it by time, or move the items to their own collection with a reference. Keep documents far below the 16 MB limit.
4- Use consistent field names in camelCase, store dates as `Date`, money as integer minor units or `Decimal128`, and ids as `ObjectId`.
5Validation
mongodb
#
MongoDB Rules
Project rulesmongodb
Free