Problem statement
Design the object model and public APIs for a text template renderer that turns a template string plus a data context into rendered output, resolving variable placeholders, conditionals, and loops.
Operating context. One in-process library. A template supports variable interpolation (double-brace user.name), conditional blocks, iteration over a collection, partial/nested-template includes, and pluggable formatting filters such as uppercase or date. A template is parsed once into a reusable compiled form (an AST) and then rendered many times against different data contexts. Rendering is single-pass and may run concurrently from many threads.
Out of scope. HTML auto-escaping policy and XSS hardening specifics, loading template text from disk, a full expression language with arithmetic, streaming/chunked output to a socket, and hot-reload watching of template files.
What to produce. The class hierarchy (parser, node/AST types, the compiled template, render context, filters), the public APIs, and how parse and render are separated. Be explicit about: how new node kinds and filters plug in, how the render context resolves nested and loop-local scoped variables, and how a compiled template is reused safely across concurrent renders.
Requirements
This assessment is a Premium feature.
The statement above is free to read. The functional and non-functional requirements, and the graded canvas that scores your design against them, come with Premium.
Topics
- System Design LLD
- Oop Solid
- Patterns Composite
- Patterns Interpreter
- Patterns Visitor