Fast, Lightweight Email Rendering Over gRPC, gRPC-Web, HTTP, and Connect
Talaria is a high-performance email rendering service built around the excellent Hermes library. It provides a structured way to generate HTML and plain-text emails using a flexible API that supports gRPC, gRPC-Web, HTTP, and Connect.
- Multi-Protocol Support – Works with gRPC, gRPC-Web, HTTP, and Connect.
- Efficient Email Rendering – Convert structured email data into HTML and plain-text outputs.
- Streaming & Batch Processing – Supports both unary and streaming RPCs for high-throughput rendering.
- Lightweight & Scalable – Optimized for speed and minimal resource usage.
- Fully OpenAPI & gRPC Compatible – Can be easily integrated into different backend systems.
- Hermes-Based Email Templating – Uses the Hermes templating engine to generate beautiful emails.
Talaria is available on both DockerHub and GitHub Container Registry (GHCR).
docker run -p 9999:9999 petermghendi/talaria:latestdocker run -p 9999:9999 ghcr.io/peter-mghendi/talaria:latestPre-compiled binaries for major platforms are available on the Releases Page.
Talaria is built in Go and can be run directly:
git clone https://github.com/peter-mghendi/talaria.git
cd talaria
go run cmd/server/main.goSee render.proto for use with gRPC clients.
Talaria exposes the following APIs:
Render– Converts structured email data into HTML and plain text (Unary RPC).RenderStream– Handles batch or streaming requests for rendering multiple emails (Bidirectional Streaming RPC).
The unary RPC accepts a request consisting a hermes.Hermes object and a hermes.Email object.
Note
Themes are passed in as lowercase strings, i.e. to apply hermes.Default pass in theme: default and to apply hermes.Flat pass in theme: flat.
hermes.Default will be used if no theme is selected.
Using grpcurl:
grpcurl -plaintext -d @ -proto render/v1/render.proto \
localhost:9999 render.v1.RenderService/Render < render_request.jsonExample JSON Payload (render_request.json):
{
"hermes": {
"theme": "default",
"text_direction": "ltr",
"disable_css_inlining": false,
"product": {
"name": "Hermes",
"link": "https://example-hermes.com/",
"logo": "http://www.duchess-france.org/wp-content/uploads/2016/01/gopher.png"
}
},
"email": {
"body": {
"name": "Jon Snow",
"intros": ["Welcome to Hermes!"],
"outros": ["Thanks for using Hermes."]
}
}
}Using curl:
curl -X POST http://localhost:9999/render.v1.RenderService/Render \
-H "Content-Type: application/json" \
-d @render_request.json{
"html": "<html><body>...</body></html>",
"text": "Welcome to Hermes!"
}For batch processing or live email previews, Talaria supports bidirectional streaming via RenderStream.
The identifier can be any string and is used to corrrelate streaming responses with the original requests.
The request is the same payload as above, consisting a hermes.Hermes object and a hermes.Email object.
grpcurl -plaintext -d '{"identifier": "stream-1", "request": YOUR_JSON_PAYLOAD}' \
-proto render/v1/render.proto \
localhost:9999 render.v1.RenderService/RenderStreamTo benchmark Talaria's performance:
ghz --insecure \
--proto render/v1/render.proto \
--call render.v1.RenderService/Render \
-d @render_request.json -n 10000 -c 50 \
localhost:9999ghz --insecure \
--proto render/v1/render.proto \
--call render.v1.RenderService/RenderStream \
-d @render_request.json -n 5000 -c 20 --stream-call-duration 10s \
localhost:9999For easy deployment, you can use docker-compose:
version: "3"
services:
talaria:
image: petermghendi/talaria:latest # or ghcr.io/peter-mghendi/talaria:latest
ports:
- "9999:9999"
environment:
- LOG_LEVEL=infoStart the service:
docker-compose up -dgo build -o talaria cmd/server/main.gogo test ./...buf lint
buf generateContributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git switch --create feature-name). - Commit changes (
git commit --message "Add feature"). - Push the branch (
git push origin feature-name). - Open a Pull Request.
This project is licensed under the MIT License.