Quickstart
This guide will walk you through creating your first template in the Accord Project Template Playground.Access the playground
Open the playground
Navigate to https://playground.accordproject.org in your web browser.You’ll see the main interface with three editor panels on the left (Concerto Model, TemplateMark, JSON Data) and a Preview panel on the right.
Explore the interface
The playground loads with a default sample template. Take a moment to familiarize yourself with the layout:
- Concerto Model: Defines the data structure for your template
- TemplateMark: Contains your template text with dynamic variables
- JSON Data: The actual data that will be merged with your template
- Preview: Shows the rendered output in real-time
Try a sample template
The fastest way to learn is by exploring existing examples.Load a sample
Click the dropdown menu next to “Concerto Model” in the top-left panel. You’ll see a list of sample templates.Select “Hello World” to load a simple example.
Examine the model
The Concerto Model defines a simple data structure:This model declares that our template expects a single
name property of type String.Review the template
The TemplateMark template uses the The
name variable:{{name}} syntax tells the template engine to substitute the value from your JSON data.Check the data
The JSON Data panel contains:The
$class property identifies which Concerto concept this data represents.Create your first template
Now let’s build a simple template from scratch.Define your model
In the Concerto Model panel, replace the contents with:This model defines a greeting with a recipient, occasion, and event date.
Write your template
In the TemplateMark panel, add:Notice the date formatting using
as "MMMM D, YYYY" - this formats the date nicely in the output.Add your data
In the JSON Data panel, provide the values:
The
$class value must match your namespace and concept name from the Concerto model.Add conditional logic
Let’s enhance the template with conditional content.Use TypeScript formulas
Add dynamic calculations to your templates with embedded TypeScript.Load the Formula sample
Select “Formula” from the sample dropdown to see a working example:The
{{% return ... %}} syntax lets you write TypeScript expressions that execute at render time.Share your template
Once you’re happy with your template, share it with others.Generate a shareable link
Click the Share button in the top navigation bar (or look for the share icon in the toolbar).The playground will generate a unique URL containing your template, model, and data.
Shared links encode all your template data in the URL, so no server-side storage is required. Keep in mind that very large templates may generate long URLs.
Download as PDF
Export your rendered template for distribution.Next steps
Now that you’ve created your first template, explore more advanced features:Employment Offer Letter
Load this sample to see how to work with monetary amounts and complex nested data structures
Lists and joins
Learn how to iterate over arrays and format lists in your templates
Concerto documentation
Deep dive into the Concerto modeling language
Template Engine
Explore the underlying template engine on GitHub
Troubleshooting
Errors in the problem panel
If you see errors at the bottom of the screen:- Model errors: Check that your Concerto syntax is correct and all types are properly defined
- Template errors: Ensure all
{{variables}}match properties in your model - Data errors: Verify that your JSON
$classmatches your namespace and concept, and all required fields are present
Preview not updating
If the preview doesn’t update after making changes:- Check the problem panel for errors that might be blocking rendering
- Try clicking in the editor to ensure the change was saved
- Refresh the page if issues persist
Need help?
Join Discord
Ask questions and get help from the Accord Project community