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
| Kya | Next.js | htmx | Note |
|---|---|---|---|
| JS (gzip) | 244 KB | 16 KB | React+Next runtime vs ek script tag — 15× kam |
| JS chunks | 12 | 1 | |
| "+10" click payload | poora route re-render* | 637 B | htmx sirf ek <tr> bhejta hai |
| Poora page (HTML) | —* | 5.0 KB | production page |
🖥 Server pe kya kharcha
| Kya | Next.js | htmx | Note |
|---|---|---|---|
| RAM (running) | 54.3 MiB | 12.7 MiB | 4.3× kam |
| Docker image | 211 MB | 163 MB | dono node:22-alpine pe; Go me ~10 MB hota |
| Source on disk | 648 KB | 116 KB | |
| npm dependencies | ~300 MB node_modules | 0 | htmx vendored, Node ka http module |
| Build step | npm run build | koi nahi | container me npm ci bhi nahi chalta |
| Render p50 | 10 ms | 2 ms | apples-to-apples nahi — niche note dekho |
⚖ Kahaan kaun jeetta hai
| Cheez | Jeeta | Kyun |
|---|---|---|
| Tables, forms, CRUD, dashboard | htmx | 15× kam JS, zero deps, zero build, 4× kam RAM |
| BOM tree expand / select | Next.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 + RLS | Next.js | @supabase/ssr ready-made; htmx me cookie/JWT glue khud likhna — asli cost yahi hai |
| Security churn | htmx | Next 16.3.4 me critical RCE mila tha (patch kiya). htmx pe npm audit hi nahi |
| Server language choice | htmx | Go / PHP / Python kuch bhi. Next = sirf Node |
| Request throughput | barabar | 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.
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
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.