SSRHMRTypeScriptReact 19BunNode.jsrspack
hadars

Server-side React, without the ceremony.

A minimal SSR framework built on rspack. Export a component, export getInitProps, run one command.

npx hadars new my-app
โšก

React Fast Refresh

Full HMR via rspack-dev-server โ€” module-level patches, no full-page reloads.

๐Ÿ–ฅ๏ธ

True SSR

Components render on the server with your data, then hydrate on the client.

โœ‚๏ธ

Code splitting

loadModule('./Comp') splits on the browser and bundles statically on the server.

๐Ÿฆด

Head management

HadarsHead controls title, meta, link, and script tags on both server and client.

๐ŸŒ

Cross-runtime

Bun, Node.js, and Deno โ€” uses the standard Fetch API throughout.

โš™๏ธ

Multi-core

Set workers: os.cpus().length to fork a process per CPU core in production.

Minimal example

// hadars.config.ts
import type { HadarsOptions } from 'hadars';
const config: HadarsOptions = { entry: 'src/App.tsx', port: 3000 };
export default config;
// src/App.tsx
import React from 'react';
import { HadarsHead, type HadarsApp, type HadarsRequest } from 'hadars';

interface Props { user: { name: string } }

const App: HadarsApp<Props> = ({ user }) => (
    <>
        <HadarsHead status={200}>
            <title>Hello {user.name}</title>
        </HadarsHead>
        <h1>Hello, {user.name}!</h1>
    </>
);

export const getInitProps = async (req: HadarsRequest): Promise<Props> => ({
    user: await db.getUser(req.cookies.session),
});

export default App;
Full getting started guide โ†’

Live demo

This page is a hadars app. The values below were produced on the server.

Server timeApr 10, 2026, 10:20:30 PM
RuntimeNode.js v20.20.0
useServerDatapid 2 ยท 83 MB RSS
useSuspenseQuery6.1 ยฐC
loadModule โ€” lazy chunkโœ“ This component was code-split into its own JS chunk on the client and bundled statically on the server.
useId() SSR
_R_b7e_
Client counter0

Counter starts at zero on every load (SSR renders 0, client hydrates 0). Clicking proves the React tree is live. Open the console โ€” no hydration warnings.