Introduction
What is NukeJS?
Most React frameworks ship a full JavaScript bundle to the browser for every page — even completely static ones. NukeJS flips this model. Every page is rendered to HTML on the server. JavaScript only reaches the browser for components you explicitly mark "use client". Everything else ships zero JS.
The result is faster first loads, excellent SEO out of the box, and a full server-side runtime you can use to talk directly to databases, read secrets, and run async code — no separate backend needed.
Drop a file in app/pages/ and it becomes a route. Dynamic segments, catch-alls, and nested layouts included.
Only "use client" components download JS. Server-only components ship zero JavaScript to the browser.
Export GET, POST, etc. from server/ files and they become typed API endpoints instantly.
One middleware.ts intercepts every request. Perfect for auth, logging, CORS, and header injection.
One build command. Deploy to Node.js or Vercel — public files land on the CDN automatically.
useHtml() controls titles, meta tags, Open Graph, and JSON-LD from any component.
The core idea
A server component is just a React component that runs on the server. It can be async, talk to a database, and read environment variables. Its output is HTML — no JS bundle. A client component adds "use client" at the top and gets bundled for the browser.
Mix them freely — server components can render client components as children and pass them data as props.
Quick start
Create a project and start the dev server:
npm create nuke@latest
cd my-app
npm run devYour app is running at http://localhost:3000. Open app/pages/index.tsx and start editing — changes appear instantly.