« All posts

Building an AI Website Generator for Nigerian SMBs: Architecture & Lessons

How WebDigitize generates multi-page sites for Nigerian SMBs using Next.js, FastAPI, and Claude — plus key lessons on Puck JSON schema design.

WebDigitize lets Nigerian business owners fill out a short form and receive a full multi-page website with a live subdomain within minutes. The stack pairs Next.js and FastAPI with Anthropic's Claude, which generates structured JSON content for Puck, an open-source drag-and-drop page builder. Generation runs as an async background task so the request returns instantly while the site is assembled.

The hardest engineering problem turned out to be schema design, not prompting: if the LLM hallucinates a prop key that doesn't exist in a component, the block silently fails to render. To improve output quality, the pipeline runs a two-pass generation — an initial draft followed by a critic prompt that rewrites generic headlines, fixes mismatched services, and localizes content that carries Western cultural assumptions.

Notably, the e-commerce shop page is deliberately excluded from AI generation entirely. Because it needs deterministic filtering, pagination, and real-time inventory, it's rendered from a fixed component backed by database queries — a clear example of where LLM-generated UI should stop and conventional logic should take over.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work