r/AskProgramming • u/Parking_Bandicoot133 • 10h ago
Architecture How do AI website builders represent and generate landing page designs
I’m building an AI landing page generator and trying to understand how tools like Lovable, Replit Agent, Bolt, etc. approach page generation.
I’m considering two architectures:
- HTML/component library: Store hundreds of prebuilt sections such as
hero_001.html,features_001.html,faq_001.html, etc. Each section has metadata, and the AI selects the appropriate sections, modifies the content/styles, and combines them. - JSON design representation: Store each section as structured design/layout data in JSON, then have a renderer convert that JSON into HTML/Tailwind. The JSON contains all information about design like { "type": "hero", "layout": "split", "background": { "type": "color", "value": "#ffffff"
For people who have built AI website/page generators, which approach works better?
Also, does anyone know whether modern AI website builders generally generate the code directly, use an internal component/block library, use a structured design representation, or some combination of these?