DEV Community

Building a Content-First Web Runtime (UI as a Lens, Not a Template)

The author observes a common pattern of repetitive UI construction in modern web apps, involving page design, component creation, and routing. This prompts an exploration of an alternative approach focusing on content and intent rather than fixed UI screens. The core idea is to define pages as JSON nodes, representing structured content that the runtime interprets. Instead of building UIs like traditional components, the author proposes a runtime environment that mounts these JSON specifications. This shifts the focus from building screens to creating a flexible UI renderer and a reusable layout system, streamlining navigation and page organization. Navigation is handled as data, eliminating the need to rebuild UI elements like sidebars repeatedly. This content-first approach leads to the concept of a "browser for structured content" with a layout engine, theming, and interaction routing. The model is presented as ideal for AI-driven UI generation, allowing AI to output concise specs instead of complex code. The author's goal is to create a "site spec" that defines routes, mounts specifications, and reuses layouts dynamically. The fundamental principle is to build runtimes that interpret meaning, transforming UI into a lens for content. The project is being developed openly as part of neurons.me.
favicon
dev.to
dev.to
Image for the article: Building a Content-First Web Runtime (UI as a Lens, Not a Template)