Project

salvia

0.0
The project is in a healthy, maintained state
A standalone SSR engine for Ruby that brings Islands Architecture to any Rack application. Write JSX/TSX components and render them server-side without Node.js, JSON APIs, or complex build steps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 5.0
~> 13.0

Runtime

~> 0.1
~> 3.0
~> 1.3
~> 2.6
 Project Readme

Sage Framework ⚠️discontinued 🌿

Sage は、RubyとDeno (Falcon) 上に構築された、軽量で高性能なフルスタックフレームワークです。

Ruby (Backend) の優雅さと、Deno (Frontend/SSR) のモダンなエコシステムを融合させ、Railsのような開発体験とネイティブなReact/Preactサポートを提供します。

特徴

  • Sage Native Architecture: Rubyは「土管 (Dumb Pipe)」として振る舞い、レンダリングとアセット配信をDenoサイドカープロセスに委譲します。
  • Zero API: ActiveRecordオブジェクトを直接 ctx.render に渡すだけ。シリアライザやAPIエンドポイントは不要です。
  • Deno SSR: 設定不要でPreactコンポーネントをサーバーサイドレンダリングします。
  • Islands Architecture: "use hydration"; を付けるだけで、特定の部分だけをクライアントサイドでインタラクティブにできます。
  • オンデマンドコンパイル: 組み込みの esbuild.tsx ファイルをオンザフライでコンパイルします。WebpackやViteは不要です。
  • npmサポート: deno.json を通じて、あらゆるnpmパッケージをフロントエンドで使用できます。

ドキュメント

詳細なドキュメントは DOCUMENTATION.md を参照してください。

クイックスタート

インストール

gem install sage

プロジェクトの作成

sage new my_app
cd my_app
bundle install

開発サーバーの起動

bundle exec sage dev

http://localhost:3000 にアクセスすると、Sageアプリケーションが動作していることを確認できます。

ディレクトリ構造

packages/
└── sage/    # Sageフレームワーク本体
demo_app/    # デモアプリケーション