billflare.

Noah Zhang: TanStack Start on Cloudflare Free for a $0 full-stack deploy

@noah_z_zhang compares Next.js cloud bills with TanStack Start + Nitro’s cloudflare-pages preset, saying Cloudflare Free’s 100,000 requests/day can cover early projects at $0 without OpenNext adapters, and that explicit loaders/server functions help AI coding agents avoid App Router caching pitfalls.

Products
WorkersPages
Source
Author experienceX
Author
Noah Zixin Zhang

Key points

  • The author says changing server.preset to 'cloudflare-pages' in app.config.ts lets Nitro package static assets and server RPC for Cloudflare, and that the same stack can switch to node-server or vercel.
  • The post promotes the author’s Supastack dual-engine preview (Next.js and TanStack Start); treat that as product context, not a Cloudflare bill figure.

Original sources

  1. Published

    Original post

    Read on 𝕏

    @noah_z_zhang compares Next.js cloud bills with TanStack Start + Nitro’s cloudflare-pages preset, saying Cloudflare Free’s 100,000 requests/day can cover early projects at $0 without OpenNext adapters, and that explicit loaders/server functions help AI coding agents avoid App Router caching pitfalls.

    Noah Zixin Zhang

    @noah_z_zhang · Original 𝕏 post

    独立开发怎么把服务器成本压到 $0?扒完 TanStack Start + Cloudflare 这套方案,我明白为什么老外都在弃用 Next.js 了 老实讲,在这之前我一直是个纯正的 Next.js 肌肉记忆患者。每次开新项目,不管是做学习平台 LearnX 还是写小工具,第一反应永远是无脑 create-next-app。 但最近每天高强度用 Devin 和 Codex 自动写代码,外加跟身边做独立开发的朋友交流,我发现大家普遍卡在两个最痛的地方: 云账单刺客: 产品还没赚到第一分钱,Vercel + 各种 Serverless 账单先把人劝退;想把 Next.js 搬去白嫖 Cloudflare 的免费额度,又得跟 OpenNext 的各种适配坑死磕。 AI 幻觉折磨: 让 Devin 或 Codex 写 Next.js App Router 时,AI 经常在 'use client'、Server Actions 和隐式缓存(Caching)的边界上发疯,改对一个地方又崩另一个地方。 为了搞清楚为什么最近外网都在吹 TanStack Start,我专门去深扒了它的底层架构,甚至直接把它作为第二套 Web 引擎(apps/web-tanstack)完整接进了我们的全栈底座 Supastack 里。 研究完这套组合拳,核心就三个字:太香了。 1. 原生适配 Cloudflare,真正实现「$0 成本」上线全栈应用 以前大家不敢随便用边缘计算,是因为配置太碎。而 TanStack Start 底层直接基于 Vite + Nitro 构建,天生就是跨平台编译的。 如果你想白嫖 Cloudflare 极其慷慨的免费额度(每天 10 万次免费请求,前期跑十几个小项目完全 $0 成本),根本不需要折腾复杂的适配器。直接在 app.config.ts 里改一行 Preset: TypeScript import { defineConfig } from '@tanstack/react-start/config' export default defineConfig({ server: { preset: 'cloudflare-pages', // 也可以一键切回 'node-server' 或 'vercel' }, }) 跑一遍 pnpm build,Nitro 会自动把前端静态资源和服务端 RPC 函数打包成 Cloudflare 原生支持的格式。不会被任何单一云厂商绑架,随时可以在 Cloudflare、$5 的 VPS 和本地 Docker 之间无缝横跳。 2. 没有「黑盒魔法」,Devin / Codex 写代码的准确率直接拉满 为什么 AI 写 Next.js 容易翻车?因为框架藏了太多隐式规则。而 TanStack Start 的设计哲学是极致的显式(Explicit): 路由加载前要验权或拉数据?直接写在明面上的 beforeLoad 和 loader 里; 前端要调服务端读写数据库?直接用 createServerFn 定义(就像调普通 TypeScript 函数一样),配合 .validator() 校验输入输出。 因为代码里没有任何暗箱缓存和隐式指令,Devin 和 Codex 读上下文时一眼就能看清数据流向,生成代码的一次通过率高得离谱,省下了大量反复修 Bug 的额度。 3. 100% 端到端类型安全,AI 跨文件重构绝不留死角 让 Codex 一次性改十几个文件时,最怕它改了路由路径或 URL 参数(比如 ?page=2&filter=paid),却漏改了某个跳转链接。在传统框架里这不会报错,只有等用户点进去 404 才发现。 TanStack Router 把强类型塞进了每一个链接和查询参数里。只要 Devin 动了任何一个路由定义,不用打开浏览器测试,终端里的 tsc 一秒钟内就会把全站所有没对齐的参数全部标红,AI 顺着报错自己就能修完。 最爽的解法:不用二选一,直接全都要 研究完这套架构后,我在打磨 Supastack 时干脆做了一个很大胆的决定:把最耗时的商业底层抽离出来,同时提供 Next.js 和 TanStack Start 双引擎。 我们把独立开发最容易踩坑的 90% 脏活——包括 Drizzle 数据库 Schema、Better Auth 登录鉴权、Stripe/Polar/Creem/RevenueCat 等 8 家支付网关的幂等账本、AI 路由、邮件系统——全部封进底层的共享 packages/*,并用 5,800+ 个自动化测试护栏焊死。 在这个底座之上,我们同时配好了 apps/web(Next.js 16)和 apps/web-tanstack(TanStack Start),甚至还打通了 Expo 手机端和 Tauri 2.0 桌面端: 习惯 Next.js 生态的,克隆下来开箱即用; 想配合 Devin / Codex 体验 TanStack Start 强类型爽感、或者想走 Cloudflare 零成本部署路线的,不用自己花两周重配登录和支付,直接切到 web-tanstack 就能跑通完整商业闭环。 如果你也好奇同一套商业 SaaS 在 Next.js 和 TanStack Start 下分别长什么样,可以直接去我搭好的线上预览里切着玩玩(连代码结构文档都写好了): 👉 双引擎全栈底座与实时预览:https://t.co/JuRagCHkw3
Author experienceWorkers +4

Cloudflare costs $5 a month, but the bill is not capped

不追高 (@Ariella1213) writes an X article explaining that Workers Paid’s $5 is a minimum, that per-product limits and budget alerts do not cap the account bill, and how denial-of-wallet requests, write amplification, delayed stops and background retries add cost.

Workers AI

opsfork: a MeloTTS retry loop produced a $391.50 Workers AI charge; a waiver was requested.

Cloudflare Community user opsfork (newsfork.com) asks for a full waiver of a $391.50 Workers AI charge for the billing period October 21 – November 20, 2026. The author says normal Workers AI spend is about $1–2 per day, but an unexpected incident involving the @cf/myshell-ai/melotts model sharply increased billable usage, mainly on November 18–19. According to the author, MeloTTS was scheduled for deprecation on November 20, 2026, yet repeated model failures began around November 17, before that date; those failures triggered a queue retry mechanism, and a defect in the author’s retry implementation amplified the failures, producing about 3.3 million queued messages. The author says almost all affected inference requests were failed or redundant retries of the same few video rendering jobs and produced no usable output. The author acknowledges responsibility for the retry defect, says the loop has been stopped, and lists safeguards already added, including retry limits, exponential backoff, a circuit breaker, and removal of MeloTTS. Requested resolution includes investigating the pre-deprecation failures, excluding the abnormal usage, waiving the amount attributable to the incident or issuing an equivalent one-time account credit, and a revised invoice; the author is willing to pay legitimate normal-usage charges. A formal billing adjustment request was submitted as Billing Support Case #02445560. Community MVP sjr replied that the author needs to work through the billing ticket and that the Community cannot help with billing issues. There is no Cloudflare staff reply on the public thread.

Other

user44024: card charged 11.17 USD for vidrawi.com, but the domain was not registered; the hold had not returned by November 6.

Cloudflare Community user user44024 says that on November 4, 2026 the card was charged 11.17 USD to register vidrawi.com, that hours later the domain did not appear in the account, no invoice was shown, and a Verisign RDAP lookup showed it unregistered, and that a billing case could not be opened. Community replies suggest the bank message may be an authorization hold. On November 6 the author says a second purchase succeeded and vidrawi.com appears in the account, but the 11.17 USD charge from November 4 has still not returned to the card.