GenUI State Management: Astro vs Next.js RSC — Frontend (P2)

In the previous part, we agreed on discarding Chatbots to move towards Generative UI. But for AI to “spawn” UI Components right on the user’s screen, the Frontend and Backend cannot just communicate via standard stateless APIs. They need to share a common State. The problem is: The AI’s brain and the User’s browser speak two entirely different languages. 2.1. Clear Demarcation: AIState vs UIState When building an Agentic system with an Interface, the first vital rule is to strictly separate AIState and UIState. ...

May 16, 2026 · 4 min · Lê Tuấn Anh

Component Registry & MCP to Frontend — GenUI Architecture (P3)

In the previous part, we understood that a Framework-Agnostic Frontend (like Astro) doesn’t receive HTML code from AI, but JSON data. But how does the Frontend know it needs to render that JSON block into a <Card>, a <Chart>, or a <Form>? The answer lies in the Component Registry — the interface resolution brain of the Generative UI architecture. 3.1. The Convergence of MCP (Model Context Protocol) and Frontend To understand the Component Registry, we need to go upstream to the Backend. On the Backend, modern Agentic systems are standardizing communication with peripheral systems (like Databases, APIs) via the MCP (Model Context Protocol) standard (See details in Series: MCP Engineering In Production). ...

May 16, 2026 · 3 min · Lê Tuấn Anh

GenUI Boilerplate & Strangler Fig Migration — Frontend (P7)

This is the conclusion of the series. The best architectural theories remain merely on paper if we lack a clear execution path. In this part, we will define a Reference Repository structure and a Migration Strategy to bring Generative UI into actively running systems. 7.1. Boilerplate Directory Structure (Astro + Svelte) To maximize the power of the Framework-Agnostic architecture, we choose Astro as the Orchestrator. Svelte is chosen as the UI framework because it compiles to extremely lightweight Vanilla JS, without the Virtual DOM overhead like React—perfect for highly dynamic UI Components. ...

May 16, 2026 · 6 min · Lê Tuấn Anh

AI-Native Frontend in 2028: 10 Architecture Predictions

Answer-first: By 2028, AI-native frontends will shift from static components to dynamic, real-time interfaces generated via Model Context Protocol (MCP) contracts. Standardized component registries and streaming state synchronization will replace manual UI development, making schema validation at the edge a critical security requirement. What You’ll Learn That AI Won’t Tell You How to design a secure component runtime that prevents malicious prop injection when LLMs stream TSX directly to V8 isolates. Practical strategies to manage client-side state synchronization latency over unstable WebSockets during heavy reasoning agent runs. I’ve been designing AI-Native Frontend systems for the past year — specifically around Generative UI, the Model Context Protocol, and Astro’s Island Architecture. That’s a short window, but long enough to observe structural shifts that are not yet visible in mainstream discourse. ...

May 16, 2026 · 13 min · Lê Tuấn Anh

Astro on Cloudflare: Full-Stack Edge Architecture

Answer-first: Deploying Astro on Cloudflare Pages utilizes V8 isolates for near-zero cold starts and global edge execution. The architecture relies on D1 edge database bindings, Durable Objects for real-time state, and Cloudflare CDN caching policies to deliver high-performance, cost-effective web applications. What You’ll Learn That AI Won’t Tell You The exact D1 edge database connection pooling limitations and how to circumvent cold start issues when routing through Neon serverless proxies. How to configure Durable Objects for real-time state synchronization without hitting Cloudflare’s sub-request quota limits. Running a content site on a traditional VPS or a managed Node.js host is fine until it isn’t. You pay for compute that sits idle 95% of the time, you manage SSL renewals, you worry about cold starts, and you watch your Lighthouse score suffer because your origin is in Singapore while your readers are in Frankfurt. ...

April 24, 2026 · 15 min · Lê Tuấn Anh