RESTHeart logo RESTHeart

GitHub last commit Build snapshot release Github stars Maven Central Version javadoc Docker Pulls Join the chat on Slack CLA assistant

What RESTHeart is

Every application built on MongoDB ends up with the same backend layer: routes that map to collections, permission checks on each endpoint, pagination and filtering logic, a way to push updates to clients in real time. That layer is largely mechanical, and writing it by hand for each project is where a lot of backend code goes.

RESTHeart generates that layer directly from the database. Point it at a MongoDB instance and it exposes the data through REST, GraphQL, WebSocket, and SSE APIs, with authentication, authorization, and real-time change streams already in place. Permissions and behavior are configured declaratively; custom logic is added only for the parts a data API cannot express, through plugins written in Java, Kotlin, JavaScript, or TypeScript.

RESTHeart logical architecture

Example

curl "https://demo.restheart.org/messages?filter={\"from\":\"Bob\"}&pagesize=1"

No route was written for /messages. It is a MongoDB collection, and the query parameters (filter, pagesize, sorting) map directly to MongoDB's query language.

Core capabilities

Distributed as a Docker image and a GraalVM native binary. Built on Java 25, Undertow, and virtual threads.

Running it

Fully managed, no installation required, and including Sophia, an MCP server and browser assistant that exposes RESTHeart's docs and plugin API to AI coding assistants such as Claude Code, Cursor, or VS Code:

Try RESTHeart Cloud for free

Or self-hosted, since the core is free and open source:

curl https://raw.githubusercontent.com/SoftInstigate/restheart/master/docker-compose.yml \
  --output docker-compose.yml && docker compose up --attach restheart

curl http://localhost:8080/ping

Full documentation: https://restheart.org/docs/

License

RESTHeart core is licensed under the GNU AGPL v3.

restheart-commons, the Maven artifact plugins depend on to reach the Approved Interfaces, is licensed under the Apache License 2.0. Plugins that depend only on restheart-commons, without linking against RESTHeart's AGPL-licensed core, can be distributed under any license, including proprietary ones. See PLUGIN_EXCEPTION.md for the exact terms of this permission.