# wakujs/waku

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/wakujs-waku).**

6,330 stars · 205 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/wakujs/waku
- Homepage: https://waku.gg
- awesome-repositories: https://awesome-repositories.com/repository/wakujs-waku.md

## Description

Waku is a minimal React framework built around React Server Components. It renders components exclusively on the server for data fetching and server-side logic, then hydrates client components in the browser for interactivity. The framework supports hybrid rendering, mixing static prerendering at build time with dynamic per-request rendering within a single application, and allows independently loading slice components that can be static or dynamic.

The framework distinguishes itself through its file-based routing system that defines pages, layouts, and API endpoints by placing files in a directory structure, with support for dynamic segments, catch-all patterns, and route groups. Waku enables server actions that execute async functions marked with a directive directly from client components and forms, with automatic FormData handling. It also provides composable interceptors that wrap every render and API handler with custom logic for cross-cutting concerns like context setup and logging, and supports composing pages from independently rendered reusable slice components that load statically or dynamically.

Waku includes capabilities for defining server-side HTTP endpoints that return JSON responses, managing document metadata by hoisting title, meta, and link tags from any component into the document head, and customizing the root HTML element. The framework supports environment variable access with private variables in server components and public variables in client components, integrates with state management libraries, and allows global stylesheet imports. It provides error boundary handling that catches errors from server or client components and replays server errors in the browser, and supports Content Security Policy configuration with nonce generation.

The project offers project scaffolding from a template with file-system routing and server/client component support already configured, and provides deployment options including platform-specific adapters for Vercel, Netlify, Cloudflare Workers, Deno Deploy, AWS Lambda, and Node.js, as well as static export and Docker packaging.

## Tags

### Web Development

- [Minimal Frameworks](https://awesome-repositories.com/f/web-development/server-side-rendering/react-server-side-renderers/minimal-frameworks.md) — A minimal React framework that builds applications with server components, client components, and server actions.
- [API Routing](https://awesome-repositories.com/f/web-development/api-routing.md) — Creates server-side endpoints that handle HTTP requests and return JSON responses for client-side consumption. ([source](https://waku.gg/blog/api-routes%60))
- [Island-Like Slice Compositions](https://awesome-repositories.com/f/web-development/component-composition/island-like-slice-compositions.md) — Assembles pages from independently rendered reusable slice components that load statically or dynamically. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Parameterized Route Definitions](https://awesome-repositories.com/f/web-development/dynamic-routing/parameterized-route-definitions.md) — Defines routes with dynamic segments, catch-all patterns, and nested segments that receive parsed parameters as props. ([source](https://waku.gg/))
- [Server Action Form Wrappers](https://awesome-repositories.com/f/web-development/form-handling/form-action-handlers/server-action-form-wrappers.md) — Executes async functions marked with a directive server-side directly from client components and forms with automatic FormData handling.
- [Parameterized Route Definitions](https://awesome-repositories.com/f/web-development/nested-routing/parameterized-route-definitions.md) — Defines pages with multiple variable path segments, each captured as a separate prop. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Per-Page Rendering Modes](https://awesome-repositories.com/f/web-development/rendering-mode-configurators/per-page-rendering-modes.md) — Prerenders each route at build time or renders it on each request, controlled by a render mode flag.
- [Hybrid Rendering Strategies](https://awesome-repositories.com/f/web-development/rendering-mode-configurators/per-page-rendering-modes/hybrid-rendering-strategies.md) — Mixes static prerendering and dynamic per-request rendering within a single application with independently loading slice components.
- [Server Components](https://awesome-repositories.com/f/web-development/rendering-templating/server-side-rendering-utilities/server-components.md) — Renders React components exclusively on the server for secure data fetching and reduced client bundles. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Client Hydration Integrations](https://awesome-repositories.com/f/web-development/rendering-templating/server-side-rendering-utilities/server-components/client-hydration-integrations.md) — Renders React components exclusively on the server for data fetching, while client components hydrate in the browser for interactivity.
- [Server-Client Composition Patterns](https://awesome-repositories.com/f/web-development/rendering-templating/server-side-rendering-utilities/server-components/server-client-composition-patterns.md) — Weaves server and client components together by importing client components into server components and passing server-rendered content as props. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Server Component Prop Passing](https://awesome-repositories.com/f/web-development/rendering-templating/server-side-rendering-utilities/server-components/server-component-prop-passing.md) — Passes server components as props to client components, enabling patterns like global context providers. ([source](https://waku.gg/))
- [Dynamic Segment Extraction](https://awesome-repositories.com/f/web-development/routing-systems/routing/parameter-handling-utilities/path-parameter-converters/dynamic-segment-extraction.md) — Captures named wildcards within URL paths to pass as variables to handlers. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [File-Based Layout Wrappings](https://awesome-repositories.com/f/web-development/routing-systems/routing/route-definition-strategies/page-layout-mapping/file-based-layout-wrappings.md) — Wraps routes and their descendants with a shared layout component defined by placing a layout file in the pages directory.
- [Server-Side Endpoints](https://awesome-repositories.com/f/web-development/server-side-endpoints.md) — Defines server-side endpoints that handle HTTP requests and return JSON or other responses without a client-side component. ([source](https://waku.gg/blog/api-routes%60))
- [Server Functions](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/server-functions.md) — Defines and invokes server-side functions directly from client components to perform mutations without manually setting up API endpoints. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [File-Based Endpoint Definitions](https://awesome-repositories.com/f/web-development/api-endpoint-definitions/file-based-endpoint-definitions.md) — Creates HTTP endpoints by exporting named functions for each method in a file within the API directory, returning standard Response objects. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Programmatic Route Registrations](https://awesome-repositories.com/f/web-development/api-routing/custom-route-definitions/programmatic-route-registrations.md) — Registers pages, layouts, roots, slices, and API endpoints in code using a declarative API, replacing file-system routing. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Slice-Based Page Assembly](https://awesome-repositories.com/f/web-development/component-composition/slice-based-page-assembly.md) — Assembles pages by composing reusable slice components that load either statically or on demand. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Document Head Management](https://awesome-repositories.com/f/web-development/document-head-management.md) — Hoists title, meta, and link tags from any component into the document head automatically. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Nested Layouts](https://awesome-repositories.com/f/web-development/file-system-routing/nested-layouts.md) — Wraps routes and their descendants with a shared component by placing a layout file in the pages directory. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Server Action Hooks](https://awesome-repositories.com/f/web-development/frontend-development-tools/frontend-frameworks/component-authoring/react-ecosystem/react-hooks/server-action-hooks.md) — Integrates server actions with useTransition, useActionState, and useOptimistic for pending states and optimistic updates. ([source](https://waku.gg/))
- [HTTP Endpoint Mapping](https://awesome-repositories.com/f/web-development/http-endpoint-mapping.md) — Registers HTTP handlers at arbitrary paths with support for static prerendering or dynamic method dispatch. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [File-Based Method Endpoints](https://awesome-repositories.com/f/web-development/http-methods/file-based-method-endpoints.md) — Creates HTTP endpoints by exporting named functions for each method in a file under the api directory. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [File-Based Method Handlers](https://awesome-repositories.com/f/web-development/http-methods/file-based-method-handlers.md) — Exports functions named after HTTP methods in a special directory to handle requests with standard Request and Response objects. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Global Middleware Registration](https://awesome-repositories.com/f/web-development/middleware/global-middleware-registration.md) — Registers middleware functions that run on every request for cross-cutting concerns like logging. ([source](https://waku.gg/))
- [Programmatic Navigation](https://awesome-repositories.com/f/web-development/programmatic-navigation.md) — Inspects the current route and performs push, replace, reload, back, and forward navigation via a router hook. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Hook-Based Route Inspections](https://awesome-repositories.com/f/web-development/programmatic-navigation/hook-based-route-inspections.md) — Reads the current path and query string from a hook to drive component behavior. ([source](https://waku.gg/))
- [Request Metadata](https://awesome-repositories.com/f/web-development/request-metadata.md) — Reads incoming request metadata and passes it to server components and server functions. ([source](https://waku.gg/guides))
- [Link Prefetchers](https://awesome-repositories.com/f/web-development/resource-preloading/link-prefetchers.md) — Prefetches internal link destinations ahead of navigation to improve page transition speed.
- [Programmatic Route Registrations](https://awesome-repositories.com/f/web-development/route-registration/programmatic-route-registrations.md) — Registers pages, layouts, and API routes through a JavaScript API, specifying render mode and path. ([source](https://waku.gg/))
- [Programmatic Router Definitions](https://awesome-repositories.com/f/web-development/routing-systems/routing/route-definition-strategies/convention-over-configuration-routers/programmatic-router-definitions.md) — Registers pages, layouts, and API endpoints in code using a declarative API, decoupling routing from the file system. ([source](https://waku.gg/guides))
- [Route Grouping](https://awesome-repositories.com/f/web-development/routing-systems/routing/route-definition-strategies/route-grouping.md) — Groups related routes under a shared layout without affecting the URL structure. ([source](https://waku.gg/))
- [Infographic Server-Side Renderers](https://awesome-repositories.com/f/web-development/server-side-rendering/infographic-server-side-renderers.md) — Renders a route from a static HTML shell instead of performing full server-side rendering for that page. ([source](https://waku.gg/guides))
- [Shared Layouts](https://awesome-repositories.com/f/web-development/shared-layouts.md) — Wraps a route and its descendants with a reusable layout component that can be statically or dynamically rendered. ([source](https://waku.gg/))
- [Per-Route SSR Disablings](https://awesome-repositories.com/f/web-development/ssr-compatible-component-libraries/ssr-compatible-routing/per-route-ssr-disablings.md) — Skips document SSR for a specific page, serving a fallback HTML shell while keeping the RSC payload available. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Type-Safe Routing](https://awesome-repositories.com/f/web-development/type-safe-routing.md) — Provides a typed interface for path parameters, query strings, and hash values on each page component. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))

### Content Management & Publishing

- [File-Based Routing](https://awesome-repositories.com/f/content-management-publishing/file-based-routing.md) — Defines routes, layouts, and API endpoints by placing files in a directory, supporting dynamic segments, catch-all patterns, and route groups.
- [Dynamic Page Renderings](https://awesome-repositories.com/f/content-management-publishing/static-page-rendering/dynamic-page-renderings.md) — Generates HTML for pages and layouts at request time to serve personalized or frequently changing content. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Automatic Page Metadata Extraction](https://awesome-repositories.com/f/content-management-publishing/automatic-page-metadata-extraction.md) — Sets title, meta, and link tags directly in components, which are automatically hoisted to the document head. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Document Metadata Components](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-management-platforms/enterprise-specialized-systems/document-management-systems/document-metadata-components.md) — Adds title, meta, and link tags to the document head by placing them directly in any layout or page component. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Documentation Metadata Configurations](https://awesome-repositories.com/f/content-management-publishing/documentation-metadata-configurations.md) — Places title, meta, and link tags anywhere in a component tree, automatically hoisting them to the document head. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Static Page Rendering](https://awesome-repositories.com/f/content-management-publishing/static-page-rendering.md) — Generates static HTML at build time for pages and layouts to eliminate per-request processing. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Static Site Generation](https://awesome-repositories.com/f/content-management-publishing/static-site-document-generators/static-site-generators/static-site-generation.md) — Generates static HTML at build time for pages and layouts, reducing runtime computation.

### DevOps & Infrastructure

- [Platform-Specific Adapters](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/execution-platforms-and-targets/deployment-infrastructure/deployment-adapters/platform-specific-adapters.md) — Wraps server entries, request processing, and build steps with platform-specific adapters for deployment to various environments.
- [Fixed Path Pages](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/static-site-deployments/static-route-prerendering/fixed-path-pages.md) — Defines pages with fixed paths that render a single component at a specific URL. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Static Exports](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/static-site-deployments/static-exports.md) — Converts dynamic application routes into a set of static files for simple hosting. ([source](https://waku.gg/guides))
- [Static Build Deployments](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-deployments/static-build-deployments.md) — Generates a fully static build that can be published to any static host without a server runtime. ([source](https://waku.gg/guides))
- [Static Site Deployment](https://awesome-repositories.com/f/devops-infrastructure/static-site-deployment.md) — Builds a fully static output that can be served without a Node.js runtime. ([source](https://waku.gg/guides))

### Graphics & Multimedia

- [Client Component Hydrations](https://awesome-repositories.com/f/graphics-multimedia/graphics-engines-rendering/rendering/systems/dom-web-rendering-strategies/ui-component-rendering/client-component-hydrations.md) — Hydrates components marked with a client directive in the browser to enable state, effects, and event handlers. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Server-Side Render Interceptions](https://awesome-repositories.com/f/graphics-multimedia/real-time-neural-renderers/real-time-3d-rendering-engines/render-loop-interception/server-side-render-interceptions.md) — Registers functions that run before and after each render or API handler for context setup or logging. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))

### Software Engineering & Architecture

- [Server Actions](https://awesome-repositories.com/f/software-engineering-architecture/server-side-logic-frameworks/server-actions.md) — Marks async functions with a 'use server' directive to execute server-side logic directly from client components. ([source](https://waku.gg/))
- [Server Error Replays](https://awesome-repositories.com/f/software-engineering-architecture/error-boundaries/server-error-replays.md) — Catches errors from server components and replays them in the browser for client-side error boundaries to handle. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Request Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/request-interceptors.md) — Registers middleware that runs before and after every render or API call, useful for context stores or security nonces. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Composable Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/request-interceptors/composable-interceptors.md) — Runs custom logic before and after each render or API handler via composable interceptors for context setup and logging.
- [Request Middleware](https://awesome-repositories.com/f/software-engineering-architecture/request-middleware.md) — Provides composable interceptors that wrap every render and API handler with custom logic. ([source](https://waku.gg/))
- [Dual-Context Components](https://awesome-repositories.com/f/software-engineering-architecture/shared-state-management/component-context-sharing/dual-context-components.md) — Uses components that satisfy both server and client rules, allowing them to be imported into either context without creating a boundary. ([source](https://waku.gg/))
- [Render Wrapping Functions](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/state-management-architectures/scope-and-hierarchy-management/hierarchical-scopes/scope-selector-configurations/configuration-scope-hierarchies/request-scoped-configurations/render-wrapping-functions.md) — Wraps each render and API handler with custom logic that runs before and after the request, such as setting up async local storage. ([source](https://waku.gg/))

### User Interface & Experience

- [Server-Side Data Fetching](https://awesome-repositories.com/f/user-interface-experience/content-rendering-components/server-side-data-fetching.md) — Fetches data on the server within async components, keeping sensitive logic off the client. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Static or Dynamic Endpoint Registrations](https://awesome-repositories.com/f/user-interface-experience/admin-interface-customizations/custom-page-views/plugin-registered-pages/plugin-http-endpoint-registrations/static-or-dynamic-endpoint-registrations.md) — Registers HTTP handlers at custom paths with support for static generation or dynamic execution. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Page Metadata Overrides](https://awesome-repositories.com/f/user-interface-experience/collection-metadata-overrides/page-metadata-overrides.md) — Adds title, meta, and link tags to any layout or page component, which are automatically hoisted to the document head. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Header-Based Context Maps](https://awesome-repositories.com/f/user-interface-experience/component-architectures/component-communication-patterns/component-data-passing/request-scoped-context-maps/header-based-context-maps.md) — Reads request headers and passes request-scoped data to server components and server functions. ([source](https://waku.gg/guides))
- [URL Parameter](https://awesome-repositories.com/f/user-interface-experience/component-architectures/component-communication-patterns/component-data-passing/url-parameter.md) — Extracts dynamic segments from a URL path and passes them as properties to a component handling many concrete identifiers. ([source](https://waku.gg/))
- [Dynamic Segment Parameterized Components](https://awesome-repositories.com/f/user-interface-experience/custom-ui-components/parameterized-component-customizations/dynamic-segment-parameterized-components.md) — Builds components that extract dynamic URL segments and pass them as properties to handle multiple concrete identifiers. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Navigation Links](https://awesome-repositories.com/f/user-interface-experience/navigation-links.md) — Navigates between internal routes with automatic prefetching using a dedicated Link component. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Client-Side Page Navigations](https://awesome-repositories.com/f/user-interface-experience/navigation-routing/client-side-page-navigations.md) — Moves between internal routes using a link component or programmatic navigation methods like push, replace, and back. ([source](https://waku.gg/))
- [Prefetching Navigations](https://awesome-repositories.com/f/user-interface-experience/navigation-routing/client-side-page-navigations/prefetching-navigations.md) — Navigates between pages using client-side navigation, caching static payloads and preloading likely next routes. ([source](https://waku.gg/guides))
- [Independently Renderable Slices](https://awesome-repositories.com/f/user-interface-experience/page-layout-templates/reusable-components/independently-renderable-slices.md) — Defines reusable components that render in their own mode (static or dynamic) and are composed into pages or layouts. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
- [Static or Dynamic Loading Slices](https://awesome-repositories.com/f/user-interface-experience/page-layout-templates/reusable-components/static-or-dynamic-loading-slices.md) — Creates independently renderable components that compose into pages, each loading in static or dynamic mode. ([source](https://waku.gg/))

### Part of an Awesome List

- [Typed Route Navigators](https://awesome-repositories.com/f/awesome-lists/devtools/routing-and-navigation/typed-route-navigators.md) — Provides typed router methods for navigating to dynamic routes with compile-time validation. ([source](https://waku.gg/guides))

### Networking & Communication

- [Catch-All Route Definitions](https://awesome-repositories.com/f/networking-communication/local-server-tunnels/custom-domain-mapping/default-domain-configurations/catch-all-alias-generators/catch-all-route-definitions.md) — Matches indefinite URL segments and passes them as an ordered array to the page component. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))

### Programming Languages & Runtimes

- [Component Lazy Loadings](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/lazy-loading/component-lazy-loadings.md) — Loads components independently from their parent page with a fallback while loading. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Slice Lazy Loadings](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/lazy-loading/slice-lazy-loadings.md) — Loads dynamic slice components independently from the rest of a static page with a fallback. ([source](https://cdn.jsdelivr.net/gh/wakujs/waku@main/README.md))
- [Dynamic Slice Parameterizations](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-strings/string-slices/indexing-and-slicing/dynamic-slice-parameterizations.md) — Extracts dynamic path segments and passes them as properties to a single component handling many IDs. ([source](https://github.com/wakujs/waku/blob/main/docs/create-pages.mdx))
