Skip to content

sensoumya/mongodhara

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

69 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mongo Dhฤrฤ Logo


License: MIT CodeQL Trivy Security Scan Dependabot Updates Python FastAPI Svelte

MongoDB management made elegant, fast, and intuitive.

mongoDhฤrฤ is a blazing-fast web UI for MongoDB โ€” built with Svelte & FastAPI.
Manage databases, collections, documents, and GridFS visually with zero overhead.


๐Ÿ“– Table of Contents


๐Ÿ’ก Why mongoDhฤrฤ?

mongoDhฤrฤ bridges the gap between raw MongoDB power and intuitive usability โ€” without compromise.

At a Glance

Feature mongoDhฤrฤ Typical Web-Based Tools (e.g., Mongo Express)
Performance โœ… Near-native MongoDB driver with optimized async I/O โš ๏ธ Varies; often less efficient
GridFS Support โœ… Full streaming read/write with chunking. โš ๏ธ Limited to small file uploads
Query Builder โœ… Context-aware autocomplete for operators, fields, and values โš ๏ธ Basic JSON/text input
Enterprise Security โœ… AES-GCM encrypted resource IDs and granular RBAC โš ๏ธ Minimal access control, exposed ObjectIDs
Authentication โœ… OAuth2/OIDC proxy integration and custom providers โš ๏ธ Basic HTTP authentication, DIY OAuth
Audit Logging โœ… Built-in audit trails with TTL-based retention โŒ Rarely available or externalized
Kubernetes Integration โœ… Production-ready Helm charts with autoscaling (HPA) โš ๏ธ Basic container images, manual setup
User Interface โœ… Modern Svelte-based UI, responsive with dark mode โš ๏ธ Often legacy or inconsistent

Core Strengths

  • Blazing Fast: Near-native MongoDB performance with direct driver access โ€” no abstraction overhead
  • Production-Ready Security: Built-in RBAC, audit logging, and encrypted resource IDs for enterprise deployments
  • Developer Experience: Intelligent query builder with 50+ operator autocomplete, real-time field discovery, and smart templates
  • Kubernetes-Native: Helm charts with autoscaling, health checks, and production-grade configurations
  • Zero Lock-in: Open-source MIT license, standard MongoDB wire protocol, deploy anywhere

โœจ Key Features

๐Ÿ” Security & Enterprise Features

  • RBAC Authorization: Role-based access control with granular per-database permissions
  • Opaque IDs: AES-GCM encrypted resource identifiers to prevent enumeration attacks
  • Audit Logging: Comprehensive audit trail of all operations stored in MongoDB
  • Configurable Authentication: Support for various OAuth proxies and authentication systems
  • System Database Protection: Built-in safeguards against accidental system database modifications

โšก High-Performance UI

  • Near-native MongoDB speed with minimal overhead
  • Optimized queries with fast pagination and filtering
  • Responsive layout with light/dark theme support
  • Real-time status updates and notifications
  • Intuitive navigation with breadcrumbs and global search

๐Ÿ—‚๏ธ Database, Collection & Document Management

  • Create, rename, and delete databases and collections
  • Browse, query, and edit documents with a rich JSON editor
  • Column pinning for table view to keep important fields visible
  • Context-Aware Query Builder: Streamlines query writing with helpful suggestions:
    • @ Operator Autocomplete: Quickly inserts 50+ MongoDB operators (comparison, logical, array, geospatial) with convenient cursor placement
    • / Field Name Autocomplete: Suggests actual field names from your collections in real-time
    • # Value Helpers: Provides quick access to common values (DateTime ranges, null, booleans, UUIDs, empty arrays/objects)
    • Smart Templates: Inserts pre-defined query patterns with placeholders and cursor positioning
    • Real-time Validation: Checks query syntax and structure as you type
  • Full CRUD support with bulk import/export of documents (JSON)
  • Run large-scale bulk operations with progress and error tracking
  • MongoDB-compliant naming and validation

๐Ÿ“ GridFS File Storage

  • Upload, download, and manage files with GridFS
  • Search files by name or metadata
  • Create and manage multiple storage buckets

๐Ÿงพ Rich JSON Editing

  • Syntax-highlighted editor with real-time validation
  • Inline error detection and formatting
  • Auto-format and schema assistance
  • DateTime helpers for quick date range queries

๐Ÿš€ Quick Start

Kubernetes/Helm Deployment

The easiest way to deploy mongoDhฤrฤ is using the included Helm chart:

# Clone the repository
git clone <your-repo-url>
cd mongodhara

# Deploy with custom MongoDB URI and images
helm install mongodhara ./helm-chart \
  --set backend.image.repository=mongodhara/api \
  --set backend.image.tag=1.0.0 \
  --set frontend.image.repository=mongodhara/web \
  --set frontend.image.tag=1.0.0 \
  --set backend.env[0].value="mongodb://your-mongo-host:27017/yourdb"

๐Ÿ’ก For production deployments and advanced configuration options, see the Helm Chart README.


๐Ÿณ Docker Images

Build and push Docker images:

# Backend
docker build -f dockerfiles/backend.Dockerfile -t your-registry.com/mongodhara/api:1.0.0 .
docker push your-registry.com/mongodhara/api:1.0.0

# Frontend
docker build -f dockerfiles/frontend.Dockerfile -t your-registry.com/mongodhara/web:1.0.0 .
docker push your-registry.com/mongodhara/web:1.0.0

๐Ÿ“ฆ Published Packages

After publishing (triggered by pushes to release/** branches), you can use the pre-built artifacts from GitHub Container Registry (GHCR).

Helm Chart

Install the published Helm chart directly from GHCR:

# Install the latest version
helm install my-mongodhara oci://ghcr.io/sensoumya/mongodhara

# Or install a specific version
helm install my-mongodhara oci://ghcr.io/sensoumya/mongodhara --version <chart-version>

๐Ÿ“‹ View Packages: GitHub Packages

Docker Images

Pull the published Docker images:

# Backend API
docker pull ghcr.io/sensoumya/mongodhara/api:<branch>-<short-sha>

# Frontend Web UI
docker pull ghcr.io/sensoumya/mongodhara/web:<branch>-<short-sha>

๐Ÿ“‹ View Images: API Package | Web Package


๐Ÿง‘โ€๐Ÿ’ป Local Development

Prerequisites

  • Python 3.9+
  • Node.js 16+
  • MongoDB server running locally

Setup Backend

cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python app/main.py  # Development server with auto-reload

Setup Frontend

cd frontend
npm install
npm run dev  # Opens at http://localhost:5173

๐Ÿ”ง Configuration

Detailed configuration guides:

  • Helm Chart: Kubernetes deployment, security features, scaling
  • Backend: Environment variables, RBAC, opaque IDs, audit logging

๐Ÿ›ก๏ธ Security

Production Security Checklist

  • โœ… Use TLS/HTTPS with valid certificates (Ingress + cert-manager)
  • โœ… Enable ENABLE_AUTHZ=true and configure user permissions
  • โœ… Enable ENABLE_OPAQUE_IDS=true to prevent resource enumeration
  • โœ… Configure OAuth proxy at ingress level (oauth2-proxy, Authelia, etc.)
  • โœ… Enable global.features.auditLogging.enabled=true for compliance tracking
  • โœ… Use network policies to restrict pod-to-pod communication
  • โœ… Configure strong MongoDB authentication and encryption in transit
  • โœ… Set appropriate resource limits and enable HPA for scaling
  • โœ… Regularly review audit logs and monitor for anomalies

Built-in protections: RBAC with per-database permissions, AES-GCM encrypted resource IDs, system database write blocks (admin, local, config, mongodhara), TTL-based audit retention (365 days)


๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit with clear messages (git commit -m 'Add amazing feature')
  4. Push and open a Pull Request

โš–๏ธ Legal Notice

This project is not affiliated with, endorsed by, or sponsored by MongoDB, Inc.

MongoDBยฎ is a registered trademark of MongoDB, Inc. All product names, logos, and brands are property of their respective owners. Use of these names, trademarks, and brands does not imply endorsement.


๐Ÿ“„ License

MIT License - see LICENSE for details.


Made with โค๏ธ by the Soumya Sen

About

An intuitive Svelte + FastAPI interface to visualize and interact with MongoDB databases. Includes Docker, Kubernetes, and OAuth2 proxy support.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors