A React Framework for Cloudflare.
It begins as a Vite plugin that unlocks SSR, React Server Components, Server Functions, and realtime features.
RedwoodSDK is the missing React framework for Cloudflare — bringing SSR, React Server Components, Server Functions, and Realtime APIs to the edge with the power of Vite.
It features:
- ⚡️ Zero-config Vite integration
- 🔁 Realtime server functions
- 🧠 Smart, composable router with middleware and interruptors
- 🔥 Blazing-fast SSR and RSC support
Start a new project:
npx create-rwsdk my-project-nameInstall dependencies:
cd my-project-name
pnpm installRun the dev server:
pnpm devVITE v6.2.0 ready in 500 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show helpThat's it, your RedwoodSDK is up and running!
As long as you return a valid Response, RedwoodSDK is happy!
// worker.tsximport{defineApp}from"rwsdk/worker";import{route,render}from"rwsdk/router";importMyReactPagefrom"@app/pages/MyReactPage";exportdefaultdefineApp([render(Document,[route("/",()=>newResponse("Hello, World!")),route("/ping",function(){return<h1>Pong!</h1>;}),route("/react",MyReactPage)route("/docs",async()=>{returnnewResponse(null,{status: 301,headers: {"Location": "https://docs.rwsdk.com",},});}),route("/sitemap.xml",async()=>{returnnewResponse(sitemap,{status: 200,headers: {"Content-Type": "application/xml",},});}),route("/robots.txt",async()=>{constrobotsTxt=`User-agent: * Allow: / Disallow: /search Sitemap: https://rwsdk.com/sitemap.xml`;returnnewResponse(robotsTxt,{status: 200,headers: {"Content-Type": "text/plain",},});}),]),]);Start building immediately → Quick start guide
RedwoodSDK is true Javascript full-stack:
// users.ts (server function)"use server";import{db}from"@/db";exportasyncfunctiongetUsers(){constusers=awaitdb.users.findAll();returnusers;}// UserList.tsx (React server component)import{getUsers}from"./users";exportdefaultasyncfunctionUsersPage(){constusers=awaitgetUsers();return(<div><ul>{users.map((user)=>(<likey={user.id}>{user.name}</li>))}</ul></div>);}Setup a database now → React Server Components
If this project saves you time or sparks ideas, please ⭐ star the repo — it really helps us grow the community.
This is a monorepo. To contribute or explore packages:
- Fix bugs or propose features
- Join our community on Discord