Facet Documentation - SSR Framework for MongoDB REST APIs

Everything you need to add server-rendered HTML to your API

Facet turns MongoDB REST API endpoints into server-rendered HTML pages through convention-based templates. No backend code required: drop a template file in the right directory and the endpoint starts serving HTML alongside JSON.

Get Started

Reference

  • Developer's Guide — Template structure, HTMX integration, authentication, JavaScript plugins, and configuration
  • JavaScript Plugins — Custom backend logic in JavaScript: services, interceptors, hot-reload, no Java required
  • Template Context Reference — All variables available in Pebble templates
  • Changelog — Version history and release notes

Source & Examples

Dependencies

  • RESTHeart — The agent-ready backend for MongoDB that Facet is built on
  • Pebble Templates — The template engine (Twig/Jinja2-like syntax)
  • GraalVM — High-performance JDK with optional native image compilation

License

Apache License 2.0 — Free for commercial use. Read license.