Measured right now in your browser via PerformanceResourceTiming — not a marketing claim.
This page transferred
—
Framework JS (React/Vue/Next)
0 KB
npm packages on this page
0
Server RAM for this site
0 MB (Caddy file_server)
Static files served straight off disk by Caddy. No Node process, no container, no app server — so this page costs zero dedicated server RAM.
An honest field guide · 2025–2026
Why builders are ripping frameworks out of their web apps — and what they do instead
Across indie hackers, solo founders, and small engineering teams, a quiet reverse-migration is underway: away from Next.js, React, Node, and Python framework stacks — and toward Rust + Vanilla Web (or pure static HTML/CSS/JS). This guide explains why, with real numbers from a production server, real CVEs, and — just as importantly — where the hype stops and the trade-offs begin.
The short version: modern frameworks solved real problems in 2016. But browsers grew up, and in 2025–2026 the frameworks' costs — megabytes of hydration JavaScript, gigabytes of server RAM, thousand-package dependency trees, quarterly API churn, and a steady drumbeat of critical CVEs — now outweigh the benefits for a huge class of apps: content sites, CRUD tools, dashboards, and SaaS products that are not Figma. Meanwhile, AI coding agents have changed the math on "hand-written" code: an agent paired with the Rust compiler's deterministic diagnostics writes and verifies vanilla code faster than it can navigate forty layers of framework abstraction.
This site itself is the demo: it is a hand-built static page, served by Caddy's file_server, using 0 MB of dedicated server RAM. Click the pill in the header to measure its real footprint in your browser, right now.
1.78 MiBCombined RAM of 3 dynamic Rust apps (crema + pantry + wesplit) running in one binary on the live apps-1 VPS
0 MBDedicated app RAM for every static site on the server — including this one — served directly by Caddy file_server
8×–12×Higher sustained RPS (and 15×–45× less RAM) for Axum + Vanilla vs Next.js/Node under load — with zero GC tail-latency spikes
Who this is for: technical founders deciding what to build on next, and engineers (like Matt) who keep hearing "just rewrite it in Rust" and want the actual evidence — including the honest cons — before committing.
Chapter 2
The Stack Comparator
Four dimensions, side by side: the framework stack most apps start with versus the bare-metal stack they increasingly end with. Every figure below comes from published benchmarks, real incident reports, or the production server measured in the next chapter.
Next.js / React + Node
~3.4k–15k RPS per instance under sustained load (TechEmpower-style benchmarks, SSR workloads).
~245–315 ms+ p99 latency once V8 garbage collection and SSR serialization kick in under load.
~600 MB – 1.4 GB RAM per container under real traffic; a typical next start idles at 150–300 MB before serving a single request.
150–500 KB+ client JS shipped for hydration — before your own code — even for pages that are 95% static text.
GC pauses produce tail-latency spikes exactly when traffic peaks.
Rust (Axum/Askama) + Vanilla Web
~120k–150k+ RPS on a single small VPS for SSR/JSON workloads (Axum consistently tops TechEmpower plaintext/JSON rounds).
~28 ms p99 under the same sustained load — no GC, no pause-the-world events.
~2–45 MB RAM per service; the live apps-1 box runs 3 full apps in 1.78 MiB (see next chapter).
<50 KB client JS — route-scoped ES modules loaded with <script type="module">; many pages ship zero JS.
HTML arrives fully rendered from compile-time Askama templates — no hydration step exists.
Sustained requests/sec per instance (higher is better)
Axum + Askama
~150k
Next.js / Node SSR
~15k
Idle + load RAM per app (lower is better)
Rust binary (3 apps)
1.78 MiB
Next.js container
600 MB–1.4 GB
Client JS shipped to the browser (lower is better)
Vanilla ES modules
<50 KB
React hydration bundle
150–500 KB+
Takeaway: the performance gap is not 20–30% — it is an order of magnitude in throughput and up to 45× in memory. On a $5–15 VPS, that difference decides how many products you can run at all.
Next.js / React + Node
node_modules with 500–1,500+ transitive packages for a starter app — each one an audit, license, and supply-chain liability.
Config sprawl: Webpack/Turbopack, Babel, PostCSS, ESLint, next.config.js, tsconfig path magic — before any product code.
Runtime tax: hydration mismatch bugs, 'use client' / 'use server' boundary gymnastics, RSC caching semantics that change between minor versions.
ORM layer (Prisma/Drizzle) between you and your own SQL, plus codegen steps and drift tooling.
Docker images of 300 MB – 1 GB+ carrying a full Node runtime and dependency tree to run "a blog with a contact form".
Rust (Axum/Askama) + Vanilla Web
One stripped static binary, ~10–25 MB, scratch/distroless image. Deploy = copy one file.
A Cargo.toml you can read in one screen; Cargo.lock pins everything deterministically.
The platform is the framework: native fetch, <dialog>, CSS Grid & Container Queries, ES Modules, View Transitions — all shipped by browsers, maintained by browser vendors, free forever.
SQL lives in sqlx queries you can read; templates are compile-time Askama — no virtual DOM, no diffing, no hydration contract to violate.
Static-only projects need no app server at all — Caddy serves files from disk.
Transitive dependencies in a typical starter (lower is better)
Rust (axum+askama+sqlx)
~140 crates
Next.js starter
~1,300 pkgs
Production Docker image size (lower is better)
Static Rust binary
~15 MB
Next.js standalone
300 MB–1 GB+
Takeaway: most of what a framework ships is scaffolding to manage complexity the framework itself created. Remove the framework and most of the bloat — config files, hydration, boundary annotations, ORM codegen — simply has nothing left to do.
Why agents struggle with frameworks
Stale training data: agents constantly hallucinate Next.js Pages-Router APIs inside App-Router projects, deprecated RSC patterns, and Tailwind v3 config in v4 projects. The framework churns every quarter; the model's knowledge froze months ago.
Silent runtime failure: a wrong hook, a missing 'use client', a broken context — TypeScript compiles, the page 500s or silently mis-renders, and the agent ships it.
Abstraction archaeology: to change one button, the agent must load layouts, providers, server/client boundaries, middleware, and ORM schemas into context — thousands of tokens of indirection per edit.
Why agents thrive on Rust + Vanilla
The compiler is an infallible guardrail:rustc, the borrow checker, and type-state patterns give the agent exact, deterministic diagnostics. It pastes the error back into context and converges autonomously — instead of shipping silent runtime bugs.
Zero churn: HTML, CSS, and ES2024+ are stable for years; core Rust crates (axum, tokio, sqlx) evolve conservatively. The API the model learned is the API that exists.
Tiny cognitive footprint: a whole route — handler, template, styles, ES module — fits in a few hundred lines the agent can hold entirely in context. No 40-layer stack to spelunk.
Feedback quality per agent iteration (illustrative)
rustc diagnostics
exact line + fix hint
Framework runtime error
stack-trace archaeology
Honest caveats: Rust's compile times slow the agent's tight edit-check loop unless you set up cargo check, lld/mold, and sccache. Left unguided, agents also spam .clone(), wrap everything in Arc<Mutex<…>>, and over-engineer generics — which is exactly why the Agent Kit below ships strict contracts and rules files.
Takeaway: AI flipped the economics. "Hand-written vanilla code" used to mean slow and error-prone; with an agent + a strict compiler, it now means fast, verified, and permanently maintainable — while framework knowledge rots in the model's training data every quarter.
Next.js / React + Node: 2025–2026 reality
CVE-2025-29927 (CVSS 9.1, March 2025): Next.js middleware authorization bypass via a forged x-middleware-subrequest header — one header defeated auth on countless apps.
CVE-2025-55182 "React2Shell" (CVSS 10.0, December 2025): unauthenticated remote code execution in React 19 Server Components' Flight protocol — the framework's own data format was the vulnerability.
npm supply-chain worms (e.g., the Shai-Hulud campaign): self-propagating malware riding maintainer-account compromises through deep transitive trees — 1,000+ packages means 1,000+ doors.
Every one of these required emergency patching of the framework itself — code you didn't write and can't audit.
Rust + Vanilla Web: smaller blast radius
Compile-time memory safety eliminates roughly ~70% of the historical memory-corruption CVE class — the same class CISA and the EU Cyber Resilience Act now push industry to engineer away.
A tiny static binary is the whole attack surface: no Node runtime, no V8, no interpreter, no node_modules on the server.
Cargo.lock + cargo audit give a deterministic, reviewable dependency tree an order of magnitude smaller than npm's.
No framework middleware magic — auth is explicit Rust code in your handlers, compiled, with no special headers that bypass it.
Packages in the deployed dependency tree (lower is better)
Rust static binary
~140 crates
Node/Next.js deploy
~1,300 pkgs
Honest caveat — memory safety ≠ web security. Rust does not stop SQL injection, XSS, broken auth/RBAC, CSRF, SSRF, or a malicious crate. You still must enforce parameterized SQL (sqlx bind params), auto-escaped templates (askama, zero unsafe innerHTML), strict CSP, CSRF middleware, rate limits, and cargo audit in CI. What Rust removes is the framework-CVE treadmill and the memory-corruption class — not your job.
Takeaway: in 2025–2026, two of the most severe web CVEs ever shipped were framework features working as designed. A stack with no hydration protocol, no middleware subrequest header, and no server-side JS runtime simply does not have those doors.
Chapter 3 · Real proof
Live Case Study: the apps-1 VPS
These are not projections. They are observed container memory readings from Jimmy's single Hetzner apps-1 VPS (a 7.57 GiB box) that runs his entire product fleet: five static sites, three dynamic Rust apps, and a handful of not-yet-migrated framework apps kept here for honest comparison.
Static Caddy sites — jimsgarage.dev, chinahols, standash, preppr, and this site0 MB
Served by Caddy file_server straight from disk. No container, no process, no dedicated RAM.
apps-jimsgarage-apps-1 — 3 dynamic apps (crema + pantry + wesplit) in one Rust binary1.78 MiB
0.02% of the box's RAM, 0.00% CPU at idle. Three full products — auth, SQLite, SSR HTML, APIs — in less memory than a single Chrome tab's favicon cache.
apps-predictr-1 (not yet migrated)24.5 MiB
apps-bookadventure-1 + its Postgres48.8 + 28.5 MiB
apps-rocketsfc-153.6 MiB
apps-plannr-1 + its Postgres62.9 + 29.5 MiB
apps-browzr-web-1229.2 MiB
supabase-* stack (5 containers)~631 MiB
apps-browzr-backend-11.03 GiB
Read the chart honestly: the unmigrated apps are not reckless — 24–63 MiB services are fine. But notice the pattern. One browzr-backend container uses ~600× the RAM of all three Rust apps combined. The Supabase sidecar stack alone uses ~350×. On a 7.57 GiB box shared with an OS, a proxy, and Postgres instances, a few framework stacks decide whether you need a bigger, more expensive VPS — or a second one.
What consolidation buys: the three Rust apps that replaced framework stacks freed multiple gigabytes on this one cheap VPS. That headroom is the difference between "my side projects fit on a €5 box" and "I'm paying for a fleet." Every framework stack you retire hands the RAM back to the products that actually need it.
Chapter 4 · No sugarcoating
The Unvarnished Pros & Cons
De-frameworking is a genuinely good trade for many apps — and a genuinely bad one for others. Here is the full ledger, including the cons most "rewrite it in Rust" posts quietly skip.
Pro
Tiny RAM, tiny VPS bills
Three production apps in 1.78 MiB. Static sites at 0 MB. Whole product fleets fit on one small VPS instead of a fleet of containers — the apps-1 chart above is the receipt.
Pro
8–12× throughput, zero GC tail spikes
Axum serves ~120k–150k+ RPS with ~28 ms p99 where Node SSR degrades into GC-driven tail-latency spikes. Under load, the Rust p99 is the p50, plus a rounding error.
Pro
Zero hydration / bundle tax
HTML arrives finished. No 150–500 KB hydration bundle, no hydration-mismatch bug class, no 'use client' boundaries. Many pages ship literally zero JavaScript.
Pro
Massive attack-surface reduction
~70% of the historical memory-corruption CVE class engineered away at compile time, a ~15 MB static binary instead of a Node runtime, and a dependency tree an order of magnitude smaller than npm's.
Pro
AI agents + compiler = deterministic guardrail
rustc hands agents exact, machine-readable diagnostics they can converge on autonomously — and stable HTML/CSS/ES6+ means no stale-training-data hallucinations of last quarter's framework API.
Pro
Long-term stability
HTML, CSS, and conservative Rust crates don't churn quarterly. Code written today still builds cleanly years from now — no forced migration every time a framework maintainer rebrands a router.
Con
Rust compile times slow tight loops
Full builds take real seconds-to-minutes. You must adopt cargo check for iteration, lld/mold linkers, sccache, and disciplined crate boundaries — or the feedback loop will grind you down.
Con
No drop-in mega UI ecosystems
No shadcn/ui, no Radix, no mature data grids, no Figma-tier collaborative canvas widgets. Complex interactive UI in Vanilla JS means real manual DOM and accessibility work — AI shrinks the boilerplate cost, but it doesn't make the work disappear.
Con
Steeper learning curve, smaller hiring pool
You cannot hire five React devs tomorrow. Async lifetimes and ownership are genuinely hard — and if your AI agent gets stuck fighting the borrow checker on a gnarly async graph, a human who understands it has to step in.
Con
You own the "batteries"
Frameworks quietly bundled image resizing, CSRF protection, session cookies, focus traps, and ARIA keyboard navigation. Bare metal means you build and verify each of those deliberately — skip one and it's your outage.
Con
AI can over-engineer Rust
Unguided agents spam .clone(), wrap everything in Arc<Mutex<…>>, and invent baroque generic abstractions. Without tight contracts (see the Agent Kit), you'll review more generated complexity than you saved.
Con
Memory safety ≠ web security
Rust stops buffer overflows, not SQL injection, XSS, CSRF, SSRF, or broken RBAC. You still need sqlx bind parameters, Askama escaping, strict CSP, rate limits, and cargo audit — every single time.
Myth busted
"Vanilla JS means jQuery spaghetti"
Modern ES Modules, <dialog>, CSS Grid, native fetch, and optional 14 KB htmx produce code cleaner than most component-framework codebases. The spaghetti era ended with IE11.
Myth busted
"Migration means risky big-bang downtime"
The staging-first protocol below — isolated staging subdomain, 100% Playwright parity gate, and a <5s rollback path — makes cutover a non-event. Big-bang risk is a process failure, not a stack property.
Myth busted
"Tailwind requires Node at runtime"
The standalone @tailwindcss/cli compiles your stylesheet at build time. Ship the resulting static CSS with zero Node anywhere — the compiler is a build tool, not a runtime dependency.
Chapter 5 · Interactive
Should You De-Framework?
Five honest questions. Answer them and get a verdict that argues with you when the answer is "don't do it" — because sometimes it is.
Chapter 6
How the Migration Actually Works
De-frameworking is not a weekend rewrite — it's a five-stage protocol designed so production is never at risk until the new stack has proven itself. This is the same protocol packaged in the downloadable Agent Skill below.
Stage 0
Read-Only Audit
What you actually do: nothing to production — that's the point. The agent inventories every route, redirect, SEO tag, API (METHOD, PATH), DB table and raw SQL query, auth/session format, CSS/font/icon asset, and sibling client, citing exact file paths, into MIGRATION_AUDIT.md. You cannot preserve parity with what you haven't catalogued.
Stage 1
Locked Blueprint
What you actually do: turn the audit into a single source of truth — MIGRATION_BLUEPRINT.md — covering the Day-1 CSS parity pipeline, the Vanilla ES Modules DOM contract, security/CSRF/CSP design, staging isolation, and the ordered vertical build plan. Then a hard gate: the owner signs off before a single line of Rust is written.
Stage 2
Isolated Staging Subdomain
What you actually do: build the new app on staging.<domain> under strict STAGING_SAFE_MODE — a cloned database with zero production credentials, Mailpit trapping all outbound email, sandboxed webhooks/billing/crons, and robots.txt: Disallow: /. This is what prevents live disasters: even a catastrophic staging bug cannot email a customer, charge a card, or corrupt prod data. Vertical slices are then built to 100% completion, one at a time.
Stage 3
100% Playwright Parity Gate
What you actually do: prove — not eyeball — that staging matches production 1:1. Playwright compares every route at desktop (1440×900) and mobile (390×844): zero console/page errors, zero broken assets, zero horizontal overflow, computed-style diffs on key landmarks, side-by-side screenshots, full E2E journeys, and negative security tests. Computed-style comparison is what kills CSS regressions: "looks fine to me" is replaced by getComputedStyle equality on fonts, colors, padding, and layout boxes. A second hard gate: the owner reviews PARITY_REPORT.md before any cutover.
Stage 4
<5s-Rollback Cutover & Owner-Gated Decommission
What you actually do: in a quiet window, quiesce writers, take a final atomic DB sync, verify row counts and foreign keys (abort on any mismatch), flip the reverse proxy, and smoke-test live. The legacy stack stays stopped but intact on disk through the soak period, so rollback is a proxy flip taking under 5 seconds. Only after a clean soak — and explicit owner approval — are legacy containers, volumes, DNS records, and framework directories decommissioned.
Model Routing: which AI model for which stage
Match model tier to stage risk — don't burn top-tier quota on mechanical scans, and don't trust mechanical-tier models with the production cutover.
Stage / Task
Claude
Google Gemini
Why
Stage 0 — Audit & Inventory
Opus(fallback Sonnet)
Pro (High)
Catches hidden middleware, auth quirks, raw SQL, and redirects across large repos.
Stage 1 — Blueprint & Security Design
Opus
Pro (High)
Highest-leverage decisions: auth compatibility, CSRF/CSP, DB schema, staging isolation. Errors here compound.
Cheap and fast; keeps the main context window clean.
Chapter 7 · Take it with you
Grab the Agent Skill, Connect via MCP & Set Your Default Rules
Everything on this page is packaged as an installable Agent Skill — rust-deframework-migration — that drives Claude Code, Gemini CLI, or Antigravity through the full Stage 0–4 protocol. Download it, fetch it over MCP, or copy the rules below.
The complete skill, one zip
Contains SKILL.md (the full protocol) plus three reference files: the prompt pack, the CSS/Playwright parity pipeline, and the cutover/decommission runbooks.
If your agent has any HTTP/fetch MCP server attached (for example the official @modelcontextprotocol/server-fetch), it can absorb this skill directly from this site — no zip, no shell. The flow:
Fetch https://baremetal.jimsgarage.dev/llms.txt and then the manifest at
https://baremetal.jimsgarage.dev/skill/index.json using your fetch/MCP tools.
From the manifest, download every listed file (SKILL.md plus all 3 reference
files), verify each file's byte size and SHA-256 checksum against the manifest,
and write them into my local skills directory, preserving this structure:
~/.claude/skills/rust-deframework-migration/ (Claude Code, global)
or ~/.gemini/config/skills/rust-deframework-migration/ (Gemini CLI, global)
with references/ as a subdirectory. Report any checksum mismatch and stop.
Once installed, load SKILL.md and immediately run Stage 0 (Read-Only Audit)
against the repository in my current working directory. Do not modify any
application code.
Paste this block into your project's AGENTS.md, CLAUDE.md, or GEMINI.md to make frameworkless Rust + Vanilla Web the agent's default for all future work:
AGENTS.md / CLAUDE.md / GEMINI.md — default rules
# Default Stack Rules — Frameworkless Rust + Vanilla Web
## 1. Default stack
All new web work defaults to: Rust (axum + askama compile-time SSR +
sqlx/rusqlite) + Vanilla HTML/CSS/ES Modules. No Next.js, React, Vue,
Svelte, Express, FastAPI, Prisma, or Tailwind-at-runtime. Pure static
HTML/CSS/JS served by the reverse proxy is preferred whenever no server
secrets or persistence are needed.
## 2. CSS is compiled at build time, never runtime
If Tailwind-style utility CSS is wanted, use the standalone
@tailwindcss/cli at build time only. Zero Node in production.
## 3. Safe DOM only
Route-scoped <script type="module"> files. Build DOM with
textContent/createElement. Never interpolate user data into innerHTML.
## 4. Security batteries are explicit, not assumed
sqlx bind parameters for every query; askama auto-escaping everywhere;
CSRF middleware on every mutating route; strict CSP; HttpOnly/Secure/
SameSite cookies; rate limits; cargo audit in CI.
## 5. 100% Playwright parity before any cutover
"It compiles" and "curl returns 200" are never sufficient. Every route
is verified at 1440x900 and 390x844: 0 pageerrors, 0 console.errors,
0 failed assets, 0 broken images, 0 horizontal overflow, computed-style
parity, plus E2E flows for every user journey.
## 6. Staging-first cutover, always
New stacks deploy to staging.<domain> under STAGING_SAFE_MODE
(cloned DB, no prod credentials, Mailpit email trap, sandboxed
webhooks/crons, robots disallow). Production is touched only after the
parity report is green and the owner signs off. Legacy stack stays
stopped-but-intact for <5s rollback during the soak period.
Decommissioning requires explicit owner approval.
Rule 1 stops the agent from reflexively scaffolding a framework when you ask for "a quick web app".
Rule 2 keeps your deployment surface Node-free even if you like utility CSS.
Rule 4 encodes the "memory safety ≠ web security" caveat as enforceable behavior.
Rules 5–6 are the parity gate and cutover protocol from this guide, made permanent.
The full Stage 0–6 prompt pack — the same prompts shipped in references/prompts.md. Pick a stage, copy the prompt, replace the <PLACEHOLDERS>, and run it with the recommended model.