Skip to content

Server-Side Template Rendering Plugin #571

@ujibang

Description

@ujibang

Brief overview

A RESTHeart plugin that enables server-side rendering of HTML pages by fetching data resources (such as MongoDB documents) and applying template transformations to generate dynamic HTML responses.

Rationale

Modern web applications often require server-side rendering for improved SEO, faster initial page loads, and enhanced accessibility. This plugin bridges RESTHeart's data layer with presentation logic, allowing developers to:

  • Serve dynamic HTML content directly from MongoDB data
  • Support multiple templating engines (Mustache, Handlebars, Thymeleaf, etc.)
  • Maintain separation between data and presentation
  • Reduce client-side complexity for content-driven pages

Detailed documentation

Overview

The Template Rendering Plugin intercepts GET requests to designated endpoints and transforms JSON data into HTML using configurable template engines.

How it works

  1. Client sends GET request to a resource endpoint
  2. Plugin retrieves the requested document(s) from MongoDB
  3. Data is passed to the specified template engine
  4. Template is rendered with the data as context
  5. Generated HTML is returned to the client

TBD

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions