If you ask an LLM to help you architect a modern full-stack app with an AI agent layer, you'll almost certainly get some version of: "put your Next.js app on Vercel, your background workers on Cloud Run or Lambda, and call it a day." That advice was fine in 2024. It's increasingly wrong in 2026, and most models don't know it yet, because the economics and the tooling underneath it have moved.
We rebuilt BrewHub PHL — a coffee shop, parcel-hub, and coworking-space platform with a closed-loop wallet, agentic AI ordering, and a real-time ops engine — around a deliberately three-way split instead. Not because "one big platform" doesn't work, but because we kept running into the same wall: every fully-managed platform is optimized for one shape of workload, and we had three different shapes. Here's the architecture, why each piece lives where it does, and what actually changed in the last year that makes this the boring, obvious choice now instead of a weird one.
The three states
1. Next.js 16 (App Router) — customer-facing web + mobile, served entirely from Cloudflare.
The frontend, Server Actions, edge caching ('use cache'), and the Vercel AI SDK-powered chat UI all run through OpenNext on a Cloudflare Worker. Not Vercel, not a CDN in front of a Vercel origin — the actual Next.js server runtime executes on Cloudflare's edge. OpenNext matured enough over the last year that this stopped being a science project.






