跳到正文
DEV Community· huali·· 3 小時前AI 評分33

為甚麼我喜歡構建完全在用戶端運行的網頁工具,以及我如何實踐

Why I love building 100% client-side web tools (and how I do it)

AI 導讀

一名獨立開發者分享構建完全在用戶端運行的網頁工具的原因與做法:用戶輸入不會離開裝置,靜態檔案載入快,託管成本幾乎為零。他以 HTML、CSS 和原生 JavaScript 開發,並用 git push 部署到 Cloudflare Pages。這套做法支援 Lihayo Tools 的 20 多款免費工具,包括 BMI 和 TDEE 計算器,無須註冊或追蹤用戶。

正文

huali

I'm a solo indie developer based in China. Over the past year I've built more than 20 small web tools, and almost all of them share one design decision: no backend at all.

Here's why I keep coming back to it.

No server means no data risk. When a tool runs entirely in the browser, the user's input never leaves their device. There's no database to leak, no logs to inspect, no "we may share data with partners" paragraph to write. Privacy stops being a policy and becomes an architecture. For things like a BMI calculator or a password generator, that's the right default.

Instant load. A single HTML file with inline CSS and JS is a few kilobytes. It renders before a typical React app has finished downloading its framework. Fast tools feel trustworthy.

Near-zero cost. Static files on Cloudflare Pages cost me basically nothing. No servers to patch, no uptime alerts at 3 a.m., no scaling bill when a post goes viral.

How I actually build them: plain HTML, CSS, and vanilla JavaScript. No build step, no framework. I deploy to Cloudflare Pages with a git push. I use AI as a pair programmer — mostly for scaffolding layouts and catching edge cases — but I keep the logic simple enough to read in one sitting.

That stack is what powers Lihayo Tools, a growing set of 20+ free utilities including BMI and TDEE calculators. Everything runs locally, no signup, no tracking.

If you've been thinking about shipping small tools, start with a single HTML file. It's still the most underrated stack on the web.

來源:DEV Community · dev.to