Celestite screenshot

Celestite

Author Avatar Theme by Noahlh
Updated: 11 Dec 2025
235 Stars

Beautifully reactive, server-side rendered Svelte apps w/ a Crystal backend

Categories

Overview

Celestite is a tool that allows users to leverage the full power of Svelte reactive components in their Crystal web applications. By serving as a drop-in replacement for the view layer, celestite eliminates the need for intermediate .ecr templates. Developers can now write their backend server code in Crystal and their frontend client code in JavaScript & HTML, ensuring seamless integration and fast performance.

Features

  • Full power of Svelte: Utilize the capabilities of Svelte reactive components in Crystal web apps.
  • Drop-in replacement: Replace the view layer with celestite, eliminating the need for intermediary .ecr templates.
  • Crystal backend, JavaScript & HTML frontend: Write backend server code in Crystal and frontend client code in JavaScript & HTML for seamless operation.
  • Compatibility: Works with the Amber web framework and standalone applications, with potential compatibility with other frameworks like Lucky, Kemal, and Athena.

Installation

  1. Add celestite to your application’s shard.yml and run shards install.
  2. Include the helper Celestite::Adapter::Amber in your application_controller.cr to add the celestite_render macro.
  3. Add celestite_amber_init.cr to /config/initializers.
  4. Include an _error.svelte file in your views directory.
  5. Add a static route for your build_dir to Amber’s static pipeline.
  6. Add your .svelte files and start building, ensuring that file naming follows Sapper’s rules.

Summary

Celestite is a groundbreaking tool that allows developers to seamlessly integrate the power of Svelte reactive components into their Crystal web applications. By serving as a drop-in replacement for the view layer, celestite simplifies the development process, enabling users to write backend server code in Crystal and frontend client code in JavaScript & HTML. Despite being in the early alpha stage, celestite demonstrates promising functionalities for enhancing web development with Crystal.