MongoSchemaViz is an innovative tool designed to visualize MongoDB schemas and analyze their relationships. It provides a clear, interactive representation of your database structure, enhancing understanding and facilitating better database design decisions.
- Schema Visualization: Automatically generate visual representations of your MongoDB schemas.
- Relationship Analysis: Infer and visualize relationships between collections, with optional AI-powered insights.
- Collection and Field Filtering: Easily navigate through your data structure.
- Interactive UI: User-friendly interface for exploring your MongoDB architecture.
MongoDB's flexible schema design is powerful but can lead to challenges in understanding the overall data structure, especially in large, complex applications. MongoSchemaViz addresses this by:
- Automatically analyzing and visualizing your MongoDB collections.
- Inferring relationships between collections, even without explicit references.
- Providing a clear, visual representation of your data structure.
This tool is invaluable for teams working on large-scale MongoDB projects, during codebase onboarding, or when planning data structure changes.
- Node.js (version 14 or later)
- A MongoDB instance (local or remote)
- OpenAI API key (optional, for enhanced relationship analysis)
- Clone the repository:
https://github.com/Kimkykie/mongo-collection-visualizer.git
- Navigate to the project directory:
cd MongoSchemaViz
- Install dependencies:
npm install
- Create a
.env.local
file in the root directory and add your MongoDB URI and OpenAI API key (if using):
MONGODB_URI=your_mongodb_uri_here
OPENAI_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open http://localhost:3000 with your browser to see the result.
- Next.js 14
- React
- MongoDB
- Mongoose
- OpenAI API (optional)
- Framer Motion
- React Flow
- Zustand
- Tailwind CSS
- Headless UI
- Hero Icons
- Connect to your MongoDB instance using the connection string.
- MongoSchemaViz will automatically analyze your schemas and visualize the collections.
- Explore your data structure using the interactive visualization.
- Use the "Fetch Relationships" feature for additional insights (AI-powered if configured).
- Use filters to focus on specific collections or fields.
- Implement filtering functionality for collections and fields
- Add dark mode support
- Develop a manual mode for relationship definition
- Introduce data sampling for large collections
- Add export functionality for visualizations
This project is licensed under the MIT License - see the LICENSE.md file for details.
- The MongoDB and Mongoose communities for inspiring this project
- OpenAI for providing AI capabilities for enhanced analysis