The backend framework that instantly turns MongoDB into REST, GraphQL, and WebSocket APIs.
RESTHeart is a Java backend framework that instantly exposes your MongoDB database through secure REST, GraphQL, and WebSocket APIs — no backend code required.
Build production-ready APIs in minutes, then extend them with custom business logic using a powerful plugin system.
Perfect for:
- Building APIs without writing boilerplate CRUD code
- Rapid prototyping and MVPs
- Extending MongoDB with custom Java services
- Microservices architectures
Key capabilities:
- 🚀 Zero-code APIs — Connect to MongoDB and start querying via REST/GraphQL
- 🔐 Built-in security — Authentication, authorization, and role-based access control
- ⚡ High performance — Java Virtual Threads for efficient concurrency, built on Undertow (the battle-tested web server from JBoss, default in Wildfly Application Server)
- 🔌 Extensible — Plugin architecture for custom services, interceptors, and validators
- 🌐 Polyglot — Write plugins in JavaScript, Python, or other languages when running on GraalVM
- 📦 Production-ready — Docker support, metrics, monitoring, and native executables
Get RESTHeart and MongoDB running in 30 seconds:
curl https://raw.githubusercontent.com/SoftInstigate/restheart/master/docker-compose.yml --output docker-compose.yml && docker compose up --pull=always --attach restheart
Test it:
curl localhost:8080/ping
That's it! You now have a running RESTHeart instance connected to MongoDB.
👉 Next steps:
- REST API Tutorial — Learn CRUD operations
- GraphQL API Tutorial — Query with GraphQL
- Configuration Guide — Customize your setup
- Plugin Development — Extend with custom logic
💡 Need help? Ask Sophia, our AI assistant, or join us on Slack.
Download and run:
# 1. Download from releases
curl -L https://github.com/SoftInstigate/restheart/releases/latest/download/restheart.tar.gz -o restheart.tar.gz
# 2. Extract
tar -xzf restheart.tar.gz && cd restheart
# 3. Run (requires MongoDB on localhost:27017)
java -jar restheart.jar
Connect to remote MongoDB:
RHO='/mclient/connection-string->"mongodb://your-mongo-host:27017"' java -jar restheart.jar
Run in standalone mode (no MongoDB required):
java -jar restheart.jar -s
This mode is perfect for testing custom plugins, services, or running RESTHeart as a pure Java API server.
Works with MongoDB and MongoDB-compatible databases:
- MongoDB — Full support
- MongoDB Atlas — Cloud database
- Percona Server for MongoDB — Full support
- FerretDB — Partial compatibility
- Amazon DocumentDB — Partial compatibility
- Azure CosmosDB — Partial compatibility
Looking for a fully managed solution? RESTHeart Cloud provides RESTHeart as a cloud service with zero infrastructure management. Get your API up and running in seconds without worrying about deployment, scaling, or maintenance.
Plugin Development with CLI: Use restheart-cli to scaffold and develop custom plugins with hot-reload support. The CLI streamlines plugin development, testing, and packaging.
Native Executables: Pre-built native executables for macOS, Linux, and Windows are available. See Native Executables for details.
Build from Source: Want to contribute or customize? Check out BUILD.md for build instructions and testing.
Full Documentation: Complete guides, API references, and examples at restheart.org/docs.
- 🤖 Ask Sophia — AI assistant for quick answers
- 💬 Join Slack — Chat with the community
- 🐛 GitHub Issues — Report bugs or request features
- 💡 Stack Overflow — Technical questions
- 📅 Book a demo — Free 1-to-1 session
RESTHeart is open source and free. If you find it valuable, consider sponsoring us on GitHub.
|
Made with ❤️ by SoftInstigate