Skip to content
المشاريع

حول

إطار عمل بسيط للبشر لتطبيقات React التي تضع الخادم أولًا، ويعمل على منصة Cloudflare. سهل البناء وسهل الصيانة.

تطوير الويب والتطبيقات

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
+٢
خلال شهر
+٦

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل
RedwoodSDK logo

A simple framework for humans

Server-first React with zero magic. Built to stay understandable.

Redwood Inc. logo Documentation Join the community on Discord License


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:

npx create-rwsdk my-project-name

Install dependencies:

cd my-project-name
pnpm install

Run the dev server:

pnpm dev
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!

// 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 <h1>Pong!</h1>;
    }),
    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


🚀 React Server Components

RedwoodSDK is true Javascript full-stack:

// 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 (
    <div>
      <ul>
        {users.map((user) => (
          <li key={user.id}>{user.name}</li>
        ))}
      </ul>
    </div>
  );
}

Setup a database now → React Server Components


⭐️ Like it? Star it!

If this project saves you time or sparks ideas, please ⭐ star the repo — it really helps us grow the community.


🛠 Contributing

This is a monorepo. To contribute or explore packages:

Policy docs:

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…