A disciplined data monastery — synchronizing MongoDB and Elasticsearch in silent harmony.
Monasticx is a TypeScript-based sync service designed to maintain perfect order between MongoDB and Elasticsearch.
Inspired by monastic discipline, it performs its work quietly and reliably — bringing structure, devotion, and clarity to your data flow.
No noise. No chaos. Just disciplined synchronization.
- 🔁 Real-time Sync: Uses MongoDB Change Streams to instantly capture and sync inserts, updates, and deletes.
- 🧩 Self-Healing Reconciliation: A quiet, polling job runs every 2 minutes to scan for and repair any data that was missed during a connection drop or downtime.
- ⚡ Batch-Powered Initial Sync: A simple API endpoint (POST /sync/initial) triggers a full, high-speed, batch-processed sync of your entire collection.
- 🧘 Silent operation — runs continuously with minimal overhead
- 🔍 Built-in Embeddings: Generates all-MiniLM-L6-v2 embeddings for all documents out-of-the-box. Models are downloaded on install, requiring no external API keys.
# Clone the repository
git clone https://github.com/chiefdfo/monasticx.git
cd monasticx
# or Install through npm
npm install -g monasticx
# Configure your environment variables
cp .env.example .env
# Run the service
npx monasticxIn monasteries, monks preserve knowledge through quiet devotion.
Monasticx follows the same principle — preserving data integrity and order between systems.
No noise. No chaos. Just disciplined synchronization.
Once running, monasticx exposes a small API (defaulting to http://localhost:3000):
Provides a real-time JSON object detailing the syncer's health, including total documents processed, error counts, and whether the change stream is running.
Triggers a full re-sync of the entire collection. This is a "fire and forget" background task—the API will return a 202 Accepted message immediately while the sync begins.
- TypeScript
- MongoDB
- Elasticsearch
- Node.js
MIT License © chiefdfo