Dinou — React 19 Framework

DinouBuild with React 19Deploy Everywhere

The ejectable React 19 framework built on web standards. Build full-stack apps and deploy anywhere with zero vendor lock-in.

100% React 19 Native Architecture

React Server Components. Zero Black-Box Magic.

Dinou was engineered from the ground up for React 19 primitives: native Server Components, direct Server Functions, and streaming Web standards.

0kb Client Bundle

0kb JavaScript Shipped for Server Code

Render markdown parsers, database queries, and heavy backend dependencies exclusively on the server. Dinou streams progressive React Flight chunks over standard W3C Web Streams directly into the DOM.

Architectural Guarantees
Heavy dependencies (parsers, ORMs, DB clients) stay 100% on the server
Progressive streaming over standard W3C ReadableStream
Direct database and file-system queries with zero API latency
Seamless composition with Client Components at interactive leaves
// Pure Server Component: 0kb sent to browser
import { db } from "@/lib/db";
import { MarkdownParser } from "@/lib/heavy-parser";
import { InteractiveChart } from "./client-chart"; // "use client"

export default async function DashboardPage() {
  // Direct database query on server
  const reports = await db.reports.findLatest();
  const summaryHtml = MarkdownParser.render(reports.raw);

  return (
    <main className="space-y-6">
      <h1>Production Analytics</h1>
      <div dangerouslySetInnerHTML={{ __html: summaryHtml }} />

      {/* Only this interactive leaf downloads client JS */}
      <InteractiveChart data={reports.metrics} />
    </main>
  );
}
Pure Server Component (0kb JS)React Flight Stream
100% compliant with React 19 specification • Zero vendor-specific patches
Universal Runtime Architecture

Deploy Everywhere. Zero Platform Lock-in.

Build your application once with React 19 Server Components. Dinou compiles it ahead-of-time to any production infrastructure in the world.

Cloudflare Workers

Global Edge Runtime

Sub-millisecond global cold starts across 300+ cities with native Cloudflare KV integration.

Key Advantages
  • ✓Pure W3C Web Streams (ReadableStream / TransformStream)
  • ✓Native workerd runtime with zero Node.js server dependencies
  • ✓Static assets served directly via Cloudflare global CDN (env.ASSETS)
  • ✓Automatic ISR route caching & revalidation backed by Cloudflare KV
One-Command Build
npm run build:cloudflare
Read Deployment Guide
$npm run build:cloudflare
⚡ Bundling Pass A (RSC workerd) & Pass B (SSR workerd)...
⚡ Bundling Pass C: Worker Orchestrator (.dinou/cloudflare/worker.js)...
✔ Cloudflare Workers build complete (.dinou/cloudflare/worker.js)
$npx wrangler deploy
🚀 Published to https://my-app.workers.dev (300+ edge locations)
File-System Architecture

Intuitive File-Based Routing. Zero Boilerplate.

Every folder with a page.tsx in src/ maps directly to a public route. Nested layouts, dynamic params, route groups, and parallel slots work right out of the box.

Persistent Layout State

Nested Layouts with Zero Remounting

Every folder with a page.tsx in src/ maps directly to a public route. Nested layout.tsx files wrap child pages without remounting during navigation, preserving client state, audio playback, and scroll positions.

Routing ConventionDinou Standard
100%Layout State Preserved
Zero Remount Overhead: Parent layouts persist on client transitions; only changing page segments re-render.
Automatic Root Scaffolding: The root src/layout.tsx wraps every route with shared HTML and body shells.
Layout & Route Escape Hatches: Opt out of parent layouts with reset_layout / no_layout, or park folders completely with _folder.
src/dashboard/layout.tsx
import { Link, type LayoutProps } from "./dinou";

// Nested layout wraps all /dashboard/* child pages
export default function DashboardLayout({ children }: LayoutProps) {
  return (
    <div className="flex min-h-screen">
      {/* Persistent sidebar: never remounts across child route changes */}
      <aside className="w-64 border-r border-slate-800 p-4">
        <nav className="space-y-2">
          <Link to=".">Overview</Link>
          <Link to="analytics">Analytics</Link>
          <Link to="settings">Settings</Link>
        </nav>
      </aside>

      {/* Dynamic page content transitions smoothly */}
      <main className="flex-1 p-6">{children}</main>
    </div>
  );
}
Dinou File-System RouterZero Runtime Overhead
Dinou Developer Experience

Zero-Boilerplate Type-Safe Routing

Eliminate dead links, catch route typos at compile time, and get instant IDE autocompletion for routes, parameters, parallel slots, and relative navigation.

Level 1: Outward Navigation

Instant IDE Autocomplete & Dead-Link Prevention

Dinou generates TypeScript route definitions in real time. Your IDE autocompletes static routes, dynamic [param] patterns with validated params, and strict relative targets inside <Link> and useRouter().

0
Broken Links in Production
Compile-Time
IntelliSense Autocomplete: Type <Link href=" or to=" to autocomplete static routes, [param] patterns, and relative targets.
Dead-Link & Escaped-Route Detection: Renaming, deleting, or parking a folder with _folder flags broken links immediately.
Validated Dynamic `params` & URL Encoding: Passing to="/blog/[slug]" enforces a typed params object and URL-encodes segments safely.
src/components/navigation.tsx
import { Link, useRouter } from "dinou";

export default function Navigation() {
  const router = useRouter();

  return (
    <nav className="flex gap-4">
      {/* ✅ Instant autocompletion of static & dynamic routes */}
      <Link href="/docs/routing">Routing Guide</Link>
      <Link to="/blog/[slug]" params={{ slug: post.slug }}>View Post</Link>

      {/* ✅ Strict relative paths with from, queries & hashes */}
      <Link href="/demo?tab=settings#profile">Settings</Link>
      <Link from="/docs/routing" to="../navigation">Navigation</Link>

      {/* ❌ TypeScript error in IDE on invalid/dead links */}
      {/* <Link href="/unknown-route">Broken Link</Link> */}

      <button onClick={() => router.push("/docs/api-reference")}>
        API Reference
      </button>
    </nav>
  );
}
Dinou Route Scanner (<2ms)TypeScript 5+ Ready
Static by Default Architecture

Static by Default. Incremental at Scale.

Every route compiles to pre-rendered HTML and Flight payloads by default. Seamlessly scale with build-time SSG, time-based ISR, on-demand ISG, and tag-based cache purges.

Build-Time Pre-rendering

Maximum Velocity with Zero Component Re-Execution

Dinou is Static by Default: static routes compile into HTML and React Flight wire payloads at build time automatically, while getStaticPaths pre-renders specific pages on dynamic routes for instant delivery.

Cache MetricVerified Standard
1.45msTTFB p50 (1,432 req/s @ 200 conns)
Instant Static Delivery: Dinou serves pre-rendered HTML and RSC payloads directly from disk, memory, or KV without re-running React.
Pre-Built HTML & RSC Payloads: Generates both full HTML for initial page loads and Flight payloads for instant client-side navigation.
Rendered Once at Build Time: Components and database queries run only during the build, never on incoming user requests.
src/blog/[slug]/page_functions.ts
import type { RouteParams } from "./dinou";

// 1. Pre-render known slugs at build time (Static by default)
export async function getStaticPaths() {
  const posts = await db.posts.findMany({ select: { slug: true } });
  return posts.map((post) => post.slug);
}

// 2. Fetch post data at build time and pass as props to page.tsx
export async function getProps(params: RouteParams) {
  const post = await db.posts.findUnique({ where: { slug: params.slug } });
  return { post };
}
Dinou Static & ISR Engine1.18ms–1.45ms p50 TTFB
Dinou Breakthrough

Three-Dimensional Layered Segmentation

Eliminate all-or-nothing caching. Dinou breaks rendering and caching into independent horizontal, vertical, and temporal (PPR) dimensions for ultra-fast, granular web applications.

Decoupled layout_functions

Decoupled Layout ISR with Persistent Navigation State

Layouts can declare their own data fetching and revalidation rules via layout_functions.ts. Changing routes never re-renders cached parent layouts, keeping media playback and search inputs alive.

Real-World BenchmarkVerified Standard
1.20msTTFB p50 (1,180 req/s · 0 Layout Re-fetches)
Persistent Layout Shell: Sidebar navigation, breadcrumbs, and user profiles stay mounted during navigation.
Independent Revalidation: Layout revalidates on its own 3600s timer without re-triggering page-level APIs.
Decoupled Layout ISR: Invalidate layout data without forcing re-renders across dozens of child pages.
Total State Persistence: Sidebar inputs, active filters, and audio/video players persist smoothly during softnav.
Surgical Layout Revalidation: Update layouts in O(1) via revalidateLayout() with lazy HTML re-composition and zero hydration mismatch.
// Independent layout caching: Shell cached for 1 hour
export const revalidate = 3600;
export const getCacheTags = ["dashboard-shell", "nav-links"];

export async function getProps() {
  const navStats = await fetchGlobalStats();
  return { navStats };
}
Native React 19 RSC PipelineTypeScript 5+ Ready
Universal Lifecycle & Middleware

Universal Middleware & Webhooks. Zero SSR Overhead.

Configure global runtime behavior, intercept webhooks, inject request contexts, and enforce security policies with standard Web APIs in dinou.config.ts.

0ms React Overhead

Short-Circuit Webhooks with Zero SSR Overhead

Handle high-frequency webhooks (Stripe, Clerk, GitHub) directly at the HTTP layer. Returning a standard Web Response short-circuits the request pipeline and completely bypasses React component rendering.

Performance GuaranteeVerified Standard
< 2msWebhook Processing Time
Bypass React Rendering: Return a standard Web Response instance to abort SSR execution immediately.
Raw Body Verification: Read pristine unparsed request streams for HMAC and cryptographic webhook checks.
Universal Runtime: AOT-bundled with identical behavior across Cloudflare, Netlify, Node.js, Bun, and Deno.
dinou.config.ts
import { defineConfig } from "dinou";

export default defineConfig({
  plugins: [
    {
      name: "stripe-webhooks",
      async onRequest(request, context) {
        // Fast-path webhooks: short-circuit before React renders
        if (context.req.path === "/api/webhooks/stripe") {
          const signature = request.headers.get("stripe-signature");
          const payload = await request.text();
          await stripe.events.verify(payload, signature);

          // Returns pure Web Standard Response in < 2ms
          return Response.json({ received: true }, { status: 200 });
        }
      },
    },
  ],
});
Dinou Plugin PipelineStandard Request / Response
Developer Velocity

Lightning-Fast Developer Experience. Instant Iteration.

Built from scratch for ~260ms E2E Hot Module Replacement (HMR), 2.09s dev cold starts, 6.5s production builds, and instant terminal feedback.

Instant State Preservation

Instant HMR That Never Drops Component State

Dinou's custom WebSocket HMR server and React Refresh integration patch updates from file save to live browser DOM seamlessly. Active form fields, counters, and scroll positions stay perfectly intact.

Developer BenchmarkVerified Standard
260msMedian E2E Edit → Browser DOM
WebSocket Hot Patching: WebSocket-driven module replacement pushes changes without full page reloads.
Zero State Loss: React Refresh boundaries preserve component state, timers, and client inputs.
Surgical Cache Invalidation: Dependency manifests track exact module trees to avoid redundant work.
src/components/counter.tsx
"use client";

import { useState } from "react";

export function Counter() {
  // ✅ State is 100% preserved during live component editing!
  const [count, setCount] = useState(42);

  return (
    <div className="flex items-center gap-4 p-6 rounded-2xl bg-slate-900 border border-slate-800">
      <span className="text-3xl font-bold font-mono text-amber-400">{count}</span>
      <button
        onClick={() => setCount((c) => c + 1)}
        className="px-4 py-2 bg-amber-500 hover:bg-amber-400 text-slate-950 font-semibold rounded-xl transition-colors"
      >
        Increment
      </button>
    </div>
  );
}
Dinou In-Process Dev ServerWebSocket HMR Active
Multi-Bundler Freedom

Choose Your Bundler. Swap Whenever You Want.

Never be locked into a single proprietary compiler. Dinou supports pre-configured, zero-config pipelines for the three premier JavaScript bundlers.

Default & Lightning FastGo Binary

esbuild

Instant Local Development

2.09s dev cold starts, ~260ms E2E HMR feedback loops, and 6.5s full production builds.

260msE2E HMR · 6.5s Prod Build
dinou dev
Best for: Ultra-fast local iteration
Optimized Tree-ShakingPure ESM Engine

Rollup

Pristine ES Module Output

Surgical code-splitting and dead-code elimination. The optimal choice for Cloudflare Workers and edge runtimes.

0% UnusedBundle Stripping
dinou build:node:rollup
Best for: Edge runtimes & serverless
Enterprise EcosystemEnterprise Battle-Tested

Webpack

Maximum Package Compatibility

Universal CommonJS/ESM npm package compatibility, dedicated vendor-react chunk splitting, and battle-tested enterprise tooling.

100%Ecosystem Coverage
dinou build:node:webpack
Best for: Enterprise & legacy CJS/ESM interop

Identical Dual-Bundle & React Compiler Parity Across All Three Engines

Swap bundlers anytime with full Tailwind v4, React Compiler, and Dual-Mode Vendoring (31 pre-bundled vendors or -u) parity.

Bundlers Guide
Framework Sovereignty

Eject Anytime. Own Your Entire Stack.

Zero vendor lock-in. A single command extracts Dinou's complete compiler, server runtime, and React 19 flight pipeline directly into your project.

./dinou/
Full Source Code
core/Universal RSC & HTTP Engine

Web Standards request pipeline, Flight serializer, PPR, ISR, and router.

adapters/Multi-Runtime Server Adapters

Native entrypoints for Cloudflare Workers, Netlify, Bun, Deno, and Node.js.

esbuild/ · rollup/ · webpack/Tri-Bundler Pipelines

Pre-configured Dual-Bundle client and server build pipelines.

node/ · bun/ · deno/ · cloudflare/Runtime Builders & HMR

Zero-fork dev server with WebSocket HMR and AOT target builders.

compiled/Dual-Mode ESM Vendors

31 pre-bundled toolchain packages for instant cold starts (or bypass via -u).

$npx dinou eject
Why Ejection Matters

Freedom to Evolve Your Architecture

Zero Lock-In & 1-Command Uneject

Ejecting is never a one-way door. Inspect or customize your stack freely, and run npm run uneject anytime to return cleanly to node_modules/dinou.

Custom Server & Middleware Control

Add custom HTTP headers, edge telemetry, WebSockets, or caching policies directly inside your server loop with standard Node or web APIs.

Built for Modern AI Workflows

AI coding assistants can inspect and modify your exact compiler and streaming code directly, eliminating black-box roadblocks.

Learn more about framework sovereignty.Eject Documentation
Engine Architecture

Engine Architecture. Engineered for Pure Performance.

Dinou is built from the ground up on Web Standards and React 19. A unified in-process engine with direct memory streaming, low and predictable memory usage, and zero subprocess overhead.

🏎️

Dinou CoreModern AOT

Streamlined & Universal
Modern Core

Built as a unified in-process engine using native W3C Web Streams and React 19 standards. Server Components (RSC) and SSR stream directly in memory with instant response times and zero subprocess overhead.

Direct in-memory streaming with zero subprocess overhead
100% W3C Web Standards: zero Express, zero runtime transforms
Deploy to Cloudflare, Netlify, Bun, Deno, Node.js, native binaries, and SSG
Dinou Engine SpecificationsVerified Standard
Architectural DimensionDinou Implementation
RSC & SSR ArchitectureNative in-process streaming via React 19 Web Streams
Runtime Standards100% W3C Web APIs (Request, Response, ReadableStream) — zero Express
Process & Memory ModelSingle-process unified engine with low memory usage (275 MB idle / 492 MB peak @ 200 conns)
Deployment FlexibilityUniversal: Cloudflare Workers, Netlify v2, Bun, Deno, Node.js, native binaries & Static Export (SSG)
Dev Server & DXIn-memory 0-fork compilation (~2.09s cold start, ~260ms E2E HMR, 6.5s prod build)
Rendering & Caching Model3D Layered Segmentation (PPR, layout_functions & <DinouCacheSlot>)
State Persistence on NavigationPersistent nested layouts across sibling transitions (zero layout remounting)
Start Building Today

Ready to build without boundaries?

Experience the power of React 19 Server Components, Streaming SSR, and Server Functions with total freedom of infrastructure.