README.md

May 6, 2026 · View on GitHub

Pareto

Lightweight, streaming-first React SSR framework built on Vite.
A fast, minimal alternative to Next.js, Remix, and TanStack Start.

Documentation · Changelog · Issues

npm version npm downloads license

Getting Started

Visit https://paretojs.tech/guides/introduction to get started with Pareto.

What is Pareto?

Pareto is a lightweight React SSR framework that prioritizes streaming. Built on Vite for instant dev starts, it provides file-based routing, NDJSON streaming for client navigation, per-route head management via React components, and Immer-powered state with automatic SSR hydration.

npx create-pareto my-app
cd my-app && npm install && npm run dev

Performance

Pareto is built for throughput. In CI benchmarks against Next.js, React Router, and TanStack Start on identical hardware (Node 22, Ubuntu, 4 CPUs):

ScenarioParetoNext.jsReact RouterTanStack Start
Data Loading2,733/s293/s955/s1,386/s
Streaming SSR247/s236/s247/s247/s
API / JSON3,675/s2,212/s1,950/s
Static SSR2,224/s3,328/s997/s2,009/s

Under ramp-up load (1→1000 concurrent connections), Pareto sustains the highest QPS before hitting the p99 < 500ms threshold:

ScenarioParetoNext.jsReact RouterTanStack Start
Data Loading2,735/s331/s1,044/s1,458/s
Streaming SSR2,022/s310/s807/s960/s
API / JSON3,556/s1,419/s1,912/s

Client JS sent to the browser: 62 KB gzipped (vs Next.js 233 KB, React Router 100 KB, TanStack Start 101 KB).

In practice: a data-loading page serving 2,000 req/s at peak needs 1 Pareto server vs 6 Next.js instances. For streaming SSR, it's 1 vs 7.

Benchmark details: PR #12

Features

  • Streaming SSRrenderToPipeableStream with defer() for progressive data delivery through Suspense
  • Vite-powered — Instant dev starts, React Fast Refresh, native ESM in development
  • File-based routingpage.tsx · layout.tsx · loader.ts · head.tsx · document.tsx · not-found.tsx
  • Client navigation — SPA-feel <Link> with prefetching, backed by NDJSON streaming
  • Head management — Per-route head.tsx React components with nested merge and deduplication
  • State management — Immer-powered defineStore() and defineContextStore() with automatic SSR hydration
  • TypeScript-first — Full type safety across loaders, pages, and configuration
  • Security headers — Built-in OWASP baseline middleware

Documentation

Visit paretojs.tech to view the full documentation.

Packages

Community

Contributing

Contributions are welcome. Please open an issue first to discuss what you would like to change.

License

MIT