Complete Example
Model
The model defines the structure of an NDA:- Party Information: Both disclosing and receiving parties
- Purpose: Description of why the NDA is needed
- DateTime: Effective date of the agreement
- Duration: Term length specified in months
Template
The template creates a professional NDA:- Date Formatting:
{{effectiveDate as "DD MMMM YYYY"}}for professional date display - Bold Text: Uses
**text**markdown for emphasis on important terms - Structured Sections: Clear headings for different parts of the agreement
- Variable Substitution: Simple placeholders for party names and terms
Data
The data object provides the agreement details:- Fully-qualified class name includes version
@0.0.2 - DateTime in ISO 8601 format
- Integer value for duration
- String descriptions for parties and purpose
Generated Output
When rendered, this template produces:DATE: 01 February 2025 This Non-Disclosure Agreement (“Agreement”) is entered into between
Tech Innovators Inc. and John Doe.
Purpose
The purpose of this Agreement is evaluating a potential business collaboration.Term
This Agreement shall remain in effect for 24 months from the effective date. This Agreement is effective as of the date written above. Sincerely,Tech Innovators Inc.
Usage
Complete TypeScript Example
Complete TypeScript Example
Variations
Shorter Duration
Shorter Duration
Corporate Parties
Corporate Parties
Different Date Format
Different Date Format
You can modify the template to use different date formats:This would produce: “February 1, 2025” instead of “01 February 2025”.
Key Concepts Demonstrated
1. Date Formatting
DD- Day with leading zero (01, 02, …)MMMM- Full month name (January, February, …)YYYY- Four-digit year (2025)
"MM/DD/YYYY"- 02/01/2025"D MMM YYYY"- 1 Feb 2025"YYYY-MM-DD"- 2025-02-01
2. Simple Variable Substitution
3. Markdown Formatting
- Bold:
**text**for party names and important terms - Headings:
##for section titles - Line breaks: Two spaces or explicit line breaks
Extending the Sample
You can extend this NDA template by adding:1. Address Information
2. Signature Section
3. Permitted Disclosures
4. Jurisdiction
Real-World Usage Tips
- Legal Review: Always have legal counsel review contract templates
- Versioning: Use semantic versioning in namespaces (
@0.0.2) - Immutability: Once signed, store the template version used
- Validation: Validate data against the model before generation
- Audit Trail: Log when and how documents are generated
Common Customizations
Add Confidentiality Definition
Add Confidentiality Definition
Add Exclusions
Add Exclusions
Related Samples
Employment Offer
Another business document with more complex structures
Hello World
Start with the basics
Next Steps
- Learn about date formatting options
- Explore data models in detail
- Understand template validation
- Read about clauses for reusable sections