The backend framework that instantly turns MongoDB into REST, GraphQL, and WebSocket APIs — no code required.
RESTHeart is a Java backend framework that instantly exposes your MongoDB database through secure REST, GraphQL, and WebSocket APIs — no backend code required.
The framework allows direct data access through standard HTTP clients, without requiring SDKs or specialized libraries.
For example, MongoDB documents can be queried directly from a browser using standard JavaScript:
const url = encodeURI('https://demo.restheart.org/messages?filter={"from":"Bob"}&pagesize=1');
fetch(url)
.then(response => response.json())
.then(json => console.log(JSON.stringify(json, null, 2)));📄 Complete documentation available at https://restheart.org/docs/
RESTHeart isn’t just a MongoDB REST layer — it’s a complete backend foundation.
| Capability | Description |
|---|---|
| 🧩 Automatic API generation | Exposes MongoDB collections and documents via REST and GraphQL |
| ⚙️ Plugin framework | Extend functionality with custom services, interceptors, and validators in Java or JavaScript |
| 🔐 Security layer | Built-in authentication, authorization, role-based access control, and TLS support |
| 💬 WebSocket support | Real-time data updates and change stream notifications |
| 🚀 Undertow-based runtime | Non-blocking I/O with Virtual Threads (Project Loom) support |
| 🌐 Polyglot plugins | Run JavaScript or Python plugins when using GraalVM |
| 📈 Monitoring | Prometheus metrics, health checks, and observability endpoints |
| 🧰 Development tools | CLI tooling, hot-reload support, Docker images, and native compilation |
RESTHeart is suitable for:
- 🚧 Rapid prototyping and MVPs
- 🧠 Scalable microservices architectures
- 🧩 Enterprise backends extending MongoDB with custom logic
- ☁️ Deployments on AWS, GCP, Azure, or RESTHeart Cloud
Run MongoDB + RESTHeart in 30 seconds:
curl https://raw.githubusercontent.com/SoftInstigate/restheart/master/docker-compose.yml --output docker-compose.yml && docker compose up --pull=always --attach restheartVerify the deployment:
curl localhost:8080/pingRESTHeart is now running and connected to MongoDB.
curl 'http://localhost:8080/people?filter={"age":{"$gt":30}}'{
people(filter: "{'age': {'$gt': 30}}", pagesize: 5) {
_id
name
age
}
}const ws = new WebSocket("wss://demo.restheart.org/ws/messages");
ws.onmessage = e => console.log("New message:", e.data);RESTHeart configuration is managed through a YAML file or the RHO environment variable for runtime overrides.
Configurable components include:
- MongoDB connection strings and client settings
- Authentication mechanisms and user management
- Authorization policies and ACL rules
- Plugin configuration and registration
- Metrics collection and logging levels
See the Configuration Guide.
The plugin architecture allows extending RESTHeart with custom services, interceptors, and validators.
- Implement custom APIs in Java, JavaScript and other GraalVM suported languages
- Register plugins via configuration or programmatically at runtime
- Use the restheart-cli tool for scaffolding, testing, and hot-reload during development
Want RESTHeart as a managed service?
RESTHeart Cloud provides:
- Managed deployment and infrastructure
- Automatic scaling and load balancing
- Centralized monitoring and logging
- API management and publishing capabilities
Suitable for production deployments or development environments.
- ✅ MongoDB / MongoDB Atlas
- ✅ Percona Server for MongoDB
- ⚙️ FerretDB (partial)
- ⚙️ Amazon DocumentDB (partial)
- ⚙️ Azure CosmosDB (partial)
Compatibility depends on MongoDB wire protocol support.
- 📄 Documentation - Comprehensive configuration, development and deployment documents.
- 🤖 Ask Sophia — AI-powered documentation assistant
- 💬 Slack — Community discussion channel
- 🐛 GitHub Issues — Bug reports and feature requests
- 💡 Stack Overflow — Technical questions
- 📅 Book a demo — Schedule a consultation
Made with ❤️ by SoftInstigate