Next.js vs htmx
HTMX BUILD
Dono app same data, same cost formula, same CSS, same VPS, same Traefik. Fark sirf approach ka. Sab numbers 2026-10-04 ko naape gaye.

📦 Browser ko kitna bhejna padta hai

KyaNext.jshtmxNote
JS (gzip)244 KB16 KB React+Next runtime vs ek script tag — 15× kam
JS chunks121
"+10" click payloadpoora route re-render*637 B htmx sirf ek <tr> bhejta hai
Poora page (HTML)—*5.0 KB production page

🖥 Server pe kya kharcha

KyaNext.jshtmxNote
RAM (running)54.3 MiB12.7 MiB 4.3× kam
Docker image211 MB163 MB dono node:22-alpine pe; Go me ~10 MB hota
Source on disk648 KB116 KB
npm dependencies~300 MB node_modules0 htmx vendored, Node ka http module
Build stepnpm run buildkoi nahi container me npm ci bhi nahi chalta
Render p5010 ms2 ms apples-to-apples nahi — niche note dekho

⚖ Kahaan kaun jeetta hai

CheezJeetaKyun
Tables, forms, CRUD, dashboardhtmx 15× kam JS, zero deps, zero build, 4× kam RAM
BOM tree expand / selectNext.js React me useState = 0 bytes. htmx me har click server round-trip, aur server ko poori UI state ?open=…&sel=… batani padti
Live recalculate (qty/margin)Next.js client pe instant; htmx me request
Supabase auth + RLSNext.js @supabase/ssr ready-made; htmx me cookie/JWT glue khud likhna — asli cost yahi hai
Security churnhtmx Next 16.3.4 me critical RCE mila tha (patch kiya). htmx pe npm audit hi nahi
Server language choicehtmx Go / PHP / Python kuch bhi. Next = sirf Node
Request throughputbarabar bottleneck DB round-trip hai (p50 23 ms), frontend nahi

📌 Nateeja

SNT ERP ke 14 module me se ~11 plain tables aur forms hain — wahaan htmx saaf behtar hai.
BOM tree aur live costing React me aasan hai; htmx me ya server round-trip, ya Alpine.js add karo.
Pakka faisla: frontend badalne se capacity nahi badhti. 10 licence wale plant ke liye dono stack 50× growth jhel lenge.
* Next.js ka per-click payload aur page HTML naapne ke liye login chahiye — invite abhi pending hai.
Render p50 bilkul barabar comparison nahi: htmx ka /production cost engine chala kar 2 ms deta hai, Next ka /login almost kuch nahi karke 10 ms. Dono tez hain — ye number faisla nahi badalta.
wire monitor
last swap—
swaps0
total since load0 B