MDDB Documentation
This directory contains the documentation for MDDB.
GitHub Pages
The documentation is published at: https://mddb.tradik.com/mddb/
Markdown Viewer
All .md files are automatically rendered using md-viewer.html, which uses:
- marked.js - Markdown parser
- github-markdown-css - GitHub-style rendering
Usage: md-viewer.html?doc=FILENAME.md
Example: https://mddb.tradik.com/mddb/md-viewer.html?doc=QUICKSTART.md
Welcome to the MDDB documentation! This guide will help you understand, deploy, and use MDDB effectively.
π Documentation Index
Documentation Index
- Quick Start Guide - Get up and running in 5 minutes
- API Documentation - Complete HTTP/JSON API reference
- OpenAPI/Swagger Specification - Machine-readable API spec (OpenAPI 3.0)
- Swagger UI - Interactive API documentation
- Health Check Guide - Health checks for Docker, Kubernetes, and load balancers
- gRPC Documentation - High-performance gRPC API guide
- Usage Examples - Code examples and integration patterns
- Architecture Guide - System design and internals
- Deployment Guide - Production deployment instructions
- Error handling
- Data models
- Best practices
Guides
Usage Examples - Practical examples and patterns
- Basic operations
- Advanced search queries
- Export and backup
- Shell scripts
- Client libraries (Node.js, Python, Go)
Architecture Guide - System design and internals
- High-level architecture
- Storage layer details
- Data flow diagrams
- Design decisions
- Performance characteristics
- Scalability considerations
Deployment Guide - Production deployment
- System requirements
- Systemd service setup
- Docker deployment
- Reverse proxy configuration
- Backup strategies
- Monitoring and troubleshooting
- Security hardening
- Scaling strategies
π Quick Links
For New Users
- Start with Quick Start Guide
- Try the examples in Usage Examples
- Read API Documentation for details
For Developers
- Understand the Architecture
- Review API Documentation
- Check Usage Examples for integration patterns
For DevOps
- Follow Deployment Guide
- Set up monitoring and backups
- Review security recommendations
π What is MDDB?
MDDB (Markdown Database) is an AI-native embedded document database for markdown content. Single ~29 MB binary, embedded BoltDB storage, zero external dependencies. Core capabilities at a glance (full list in FEATURES.md and the root README.md):
- Triple protocol β HTTP/JSON REST, gRPC/Protobuf, GraphQL, all over TCP or Unix Domain Sockets
- Built-in MCP server β 67 tools, MCP 2025-11-25 compliant, stdio + Streamable HTTP + SSE transports for Claude / Cursor / Windsurf / ChatGPT / Ollama / DeepSeek
- Vector / semantic search β 7 index algorithms (Flat / HNSW / IVF / PQ / OPQ / SQ / BQ) with per-collection int8/int4 quantization; OpenAI / Ollama / Cohere / Voyage embeddings
- Full-text search β TF-IDF / BM25 / BM25F / PMISparse, 7 modes (simple / boolean / phrase / wildcard / proximity / range / fuzzy), 18-language stemming, typo tolerance
- Hybrid search β sparse BM25 + dense vector via alpha blending or Reciprocal Rank Fusion
- Geosearch β R-tree + geohash radius / bounding-box queries, composable with FTS and vector
- Memory RAG β conversational memory with session management and semantic recall
- Multi-format upload β
.md,.txt,.html,.pdf,.docx,.odt,.rtf,.tex,.yamlauto-converted to Markdown; URL import; Wikipedia XML dump streaming - Authentication β JWT, API keys, per-collection RBAC, per-protocol access modes
- TLS / mTLS β built-in HTTPS with optional client certificate authentication
- Replication β leader-follower binlog streaming for read scaling
- Automation β triggers, crons, webhooks, sentiment analysis, template variables
- Document TTL with auto-expiry, full revision history, schema validation, aggregations (facets + histograms)
- Web Admin Panel β React UI for documents, users, search, geo, settings
π― Common Use Cases
Content Management
- Blog posts and articles
- Documentation systems
- Knowledge bases
- Static site generators
Multi-language Content
- Internationalized websites
- Multi-region documentation
- Localized marketing content
Version Control
- Content approval workflows
- Change tracking
- Audit trails
- Point-in-time recovery
π§ Key Features
The full feature matrix is maintained in FEATURES.md. Storage internals (buckets, data flow, design decisions) are in ARCHITECTURE.md. Don't duplicate them here.
π Performance
Numbers, methodology and benchmarks live in their own document β see BENCHMARK.md or run the bench suite under tools/bench/. This index intentionally does not pin throughput targets that would drift from reality.
π Security
For the security model (the layers a request passes through, trust boundaries, what's deliberately out of scope) see the Security Model section in ARCHITECTURE.md. For practical setup:
- AUTHENTICATION.md β JWT, API keys, RBAC, group permissions
- TLS.md β HTTPS + mTLS setup, openssl recipes, deployment patterns
- config.md β Unix Domain Socket transport
- DEPLOYMENT.md β production hardening checklist
Version-by-version changes for any of these layers live in CHANGELOG.md, not here.
π οΈ Development
Building from Source
git clone <repository-url>
cd mddb
make build
Running Tests
make test
make test-coverage
Development Mode
make install-dev-tools
make dev
Code Quality
make fmt # Format code
make lint # Run linter
make tidy # Tidy modules
π¦ Installation Methods
Binary Release
Download from releases page and run:
./mddbd
Build from Source
make build
make run
Docker
docker run -p 11023:11023 -v mddb-data:/data mddb:latest
Docker Compose
docker-compose up -d
π€ Contributing
Contributions are welcome! Please:
- Read the Architecture Guide
- Follow Go best practices
- Add tests for new features
- Update documentation
- Update CHANGELOG.md
Standards & References
This documentation follows industry standards:
RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in our documentation are to be interpreted as described in RFC 2119.
π License
See LICENSE file for details.
π Links
π‘ Support
- Check documentation first
- Search existing issues
- Open new issue with details
- Include version and OS information
πΊοΈ Roadmap
The roadmap is maintained per release in ROADMAP.md. Past releases live in CHANGELOG.md.
Happy documenting with MDDB! π