SeeRepo with Mongoose
Mongoose describes your MongoDB data in code. SeeRepo reads it inside whatever framework your app uses, often Express or Next.js.
What SeeRepo reads
- Your models, from
mongoose.model("X", schema),model<T>("X", schema)and helpers your project writes with the same shape. Each one is a data model on your map. - The file that defines a model becomes data, so it sits with your data on the right of the map instead of inside your product.
- MongoDB as a service, from your packages, your environment variables and the URLs in your code.
An example from our test bank
hagopj13/node-express-boilerplate, an Express API, read at a fixed commit:
- 2 data models: Token and User
- 2 files of data, 3 actions and 34 inner pieces
- MongoDB, found as a service with its proof
async-labs/saas, a monorepo of Next.js apps and Express APIs, shows 7 Mongoose models: Discussion, EmailTemplate, Invitation, PasswordlessToken, Post, Team and User.
Good to know
- A model is found by the call that registers it, never by its file's name.