https://github.com/redwoodjs/sdk
A simple framework for humans: Server-first React with zero magic. Built to stay understandable.
https://github.com/redwoodjs/sdk
cloudflare react react-server-components realtime typescript
Last synced: 5 days ago
JSON representation
A simple framework for humans: Server-first React with zero magic. Built to stay understandable.
- Host: GitHub
- URL: https://github.com/redwoodjs/sdk
- Owner: redwoodjs
- License: mit
- Created: 2024-11-18T09:34:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-20T19:41:20.000Z (5 days ago)
- Last Synced: 2026-01-20T19:41:51.114Z (5 days ago)
- Topics: cloudflare, react, react-server-components, realtime, typescript
- Language: TypeScript
- Homepage: https://rwsdk.com
- Size: 90.8 MB
- Stars: 1,373
- Watchers: 12
- Forks: 74
- Open Issues: 48
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
- awesome - redwoodjs/sdk - A simple framework for humans: Server-first React with zero magic. Built to stay understandable. (TypeScript)
README
---
## What is this?
RedwoodSDK is a server-first React framework.
It starts as a Vite plugin that enables React Server Components and Server Functions, then layers on a type-safe, standards-compliant router that takes you from request to response—end to end.
(For Cloudflare (workerd) only)
It includes:
- Vite-first setup (no ceremony)
- React Server Components + Server Functions
- Type-safe server router (web standards, not framework magic)
- Middleware & per router middleware for request/response control
- Realtime-ready primitives for modern apps
---
## 📦 Quickstart
Start a new project:
```bash
npx create-rwsdk my-project-name
```
Install dependencies:
```bash
cd my-project-name
pnpm install
```
Run the dev server:
```bash
pnpm dev
```
```bash
VITE v6.2.0 ready in 500 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
```
That's it, your RedwoodSDK is up and running!
### Add more routes?
As long as you return a valid Response, RedwoodSDK is happy!
```js
// worker.tsx
import { defineApp } from "rwsdk/worker";
import { route, render } from "rwsdk/router";
import MyReactPage from "@app/pages/MyReactPage";
export default defineApp([
render(Document, [
route("/", () => new Response("Hello, World!")),
route("/ping", function () {
return
Pong!
;
}),
route("/react", MyReactPage)
route("/docs", async () => {
return new Response(null, {
status: 301,
headers: {
"Location": "https://docs.rwsdk.com",
},
});
}),
route("/sitemap.xml", async () => {
return new Response(sitemap, {
status: 200,
headers: {
"Content-Type": "application/xml",
},
});
}),
route("/robots.txt", async () => {
const robotsTxt = `User-agent: *
Allow: /
Disallow: /search
Sitemap: https://rwsdk.com/sitemap.xml`;
return new Response(robotsTxt, {
status: 200,
headers: {
"Content-Type": "text/plain",
},
});
}),
]),
]);
```
Start building immediately → [Quick start guide](https://docs.rwsdk.com/getting-started/quick-start/)
---
## 🚀 React Server Components
RedwoodSDK is true Javascript full-stack:
```js
// users.ts (server function)
"use server";
import { db } from "@/db";
export async function getUsers() {
const users = await db.users.findAll();
return users;
}
// UserList.tsx (React server component)
import { getUsers } from "./users";
export default async function UsersPage() {
const users = await getUsers();
return (
{users.map((user) => (
- {user.name}
))}
);
}
```
Setup a database now → [React Server Components](https://docs.rwsdk.com/core/react-server-components/)
---
## ⭐️ Like it? Star it!
If this project saves you time or sparks ideas, please [⭐ star the repo](https://github.com/redwoodjs/sdk) — it really helps us grow the community.
---
## 🛠 Contributing
This is a monorepo. To contribute or explore packages:
- Join our community on [Discord](https://discord.gg/redwoodjs)
- Check out the [Contributing Guide](./CONTRIBUTING.md) for how to get started.
**Policy docs:**
- [Contributing](./CONTRIBUTING.md)
- [Support & Versioning](./SUPPORT.md)
- [Security Policy](./SECURITY.md)