Skip to content

childrentime/pareto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

136 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pareto

Lightweight, streaming-first React SSR framework built on Vite.

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):

Scenario Pareto Next.js React Router TanStack Start
Data Loading 2,733/s 293/s 955/s 1,386/s
Streaming SSR 247/s 236/s 247/s 247/s
API / JSON 3,675/s 2,212/s 1,950/s
Static SSR 2,224/s 3,328/s 997/s 2,009/s

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

Scenario Pareto Next.js React Router TanStack Start
Data Loading 2,735/s 331/s 1,044/s 1,458/s
Streaming SSR 2,022/s 310/s 807/s 960/s
API / JSON 3,556/s 1,419/s 1,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

About

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors