It's server-side. There's a record for each page/component in a database where the JSON is stored. It converts the "criteria" part into SQL, and the "options" part into HTML, and returns the resulting HTML for each component.
Might I suggest something like redis* for storing this data? Or is that what you mean by database?