MongoDB-models-visualizer (v0.1.18) is a developer tool for Node.js/Express applications using Mongoose (v6+) that automatically introspects all registered Mongoose models and serves both a Swagger-like web UI and JSON API endpoints. It extracts schema fields, types, validations, references (ref), and collection names, and optionally includes sample documents. Unlike generic MongoDB GUIs, it integrates directly into an Express server as middleware, providing a live view of the current model state without external services. Current release cadence is irregular; it is an early-stage project with roadmap for v0.2 and v1.0.
npm install mongodb-models-visualizerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Mount modelAnalyzer middleware on an Express app, connect Mongoose, and access the UI at /models-analyzer.
Ensure all Mongoose model definitions are required/imported before mounting the middleware.
Do not rely on the auth option. Wrap the middleware with a separate auth middleware (e.g., express-basic-auth).
Only enable sampleDocs in development environments.
Always protect the /models-analyzer route with authentication in production.
Run 'npm install mongodb-models-visualizer' and ensure node_modules contains it.
Pass the mongoose object: modelAnalyzer({ mongoose: mongoose }) or use shorthand { mongoose }.Import/require all Mongoose model files before mounting the middleware.