
remorses/spiceflow
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
最小限のAPIとReactフレームワーク、完全な型安全、OpenAPI、RSC、MCP、型安全なクライアント、SSEでのストリーミング
概要
Node、Bun、Cloudflare向けのspiceflow型安全なAPIおよびReact Server Componentsフレームワーク Spiceflowは型安全なAPIフレームワークであり、完全なシンプルさを重視したフルスタックのReact RSCフレームワークです。Node.js、Bun、Cloudflare WorkersのすべてのJavaScriptランタイムで動作します。GitHubでソースコードを読んでください。 - Reactサーバーコンポーネント(RSC)、サーバーアクション、レイアウト、自動クライアントコード分割を備えたフルスタックReactフレームワーク - 同じコードでNode.js、Bun、Cloudflare Workersなどどこでも動作 - Zodによるタイプセーフスキーマベースの検証 - パスパラメータ、クエリ、ボディ、レスポンスに関する完全な推論を持つタイプセーフフェッチクライアント - ウェブ標準のRequest and Responseを用いたシンプルで直感的なAPI- ルートに基づいてOpenAPI仕様を簡単に生成可能 - LLMでアプリを簡単に配線できるModel Context Protocolのサポート - サーバー送信イベントによるストリーミング用の非同期ジェネレーターサポート - モジュラー設計。
概要(AI 翻訳)
スパイスフロー Node、Bun、Cloudflare向けのタイプセーフAPIおよびReact Server Components framework
Spiceflowは型安全なAPIフレームワークであり、完全なシンプルさを重視したフルスタックのReact RSCフレームワークです。Node.js、Bun、Cloudflare WorkersなどすべてのJavaScriptランタイムで動作します。GitHubのソースコードを読んでください。完全なドキュメントは getspiceflow.com にあります。
特徴
- Reactサーバーコンポーネント(RSC)、サーバーアクション、レイアウト、自動クライアントコード分割を備えたフルスタックReactフレームワーク
- どこでも動作:Node.js、Bun、Cloudflare Workersで同じコードを使う
- Zodによる型安全スキーマベースの検証
- パスパラメータ、クエリ、本文、応答に関する完全な推論を持つタイプセーフフェッチクライアント
- ウェブ標準のRequest and Responseを用いたシンプルで直感的なAPI
- ルートに基づいて簡単にOpenAPI仕様を作成できること
- LLMで簡単にアプリを配線できるModel Context Protocolのサポート
- サーバー送信イベントによるストリーミング用の非同期ジェネレーターをサポートしています
- サブアプリのマウント用
.use()を用いたモジュール設計 - 無効化時のオーバーヘッドゼロの組み込みOpenTelemetryトレーシング
設置
[!重要] Spiceflowはまだプレリリース中です。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Spiceflow is a type-safe API framework and full-stack React RSC framework focused on absolute simplicity. It works across all JavaScript runtimes: Node.js, Bun, and Cloudflare Workers. Read the source code on GitHub. Full documentation lives at getspiceflow.com.
Features
- Full-stack React framework with React Server Components (RSC), server actions, layouts, and automatic client code splitting
- Works everywhere: Node.js, Bun, and Cloudflare Workers with the same code
- Type safe schema based validation via Zod
- Type safe fetch client with full inference on path params, query, body, and response
- Simple and intuitive API using web standard Request and Response
- Can easily generate OpenAPI spec based on your routes
- Support for Model Context Protocol to easily wire your app with LLMs
- Supports async generators for streaming via server sent events
- Modular design with
.use()for mounting sub-apps - Built-in OpenTelemetry tracing with zero overhead when disabled
Installation
npm install spiceflow@rsc
[!IMPORTANT] Spiceflow is still in pre-release. Install with
spiceflow@rsc, notspiceflow@latest.
AI Agents
To let your AI coding agent know how to use spiceflow, run:
npx -y skills add remorses/spiceflow -g -y
Every documentation page is also available as raw markdown: append .md to any getspiceflow.com URL, for example https://getspiceflow.com/react-data.md.
Basic Usage
API routes return JSON automatically. React pages use .page() and .layout() for server-rendered UI with client interactivity:
import { Spiceflow } from 'spiceflow'
import { Counter } from './counter'
export const app = new Spiceflow()
.get('/api/hello', () => {
return { message: 'Hello, World!' }
})
.layout('/*', async ({ children }) => {
return (
{children}
)
})
.page('/', async () => {
return (
)
})
.page('/about', async () => {
return About
})
app.listen(3000)
Two Ways to Use Spiceflow
Spiceflow works as a standalone API framework or as a full-stack React framework — same router, same type safety, same code.
インストール
npx -y skills add remorses/spiceflow -g -y