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
- Add celestite to your application’s
shard.ymland runshards install. - Include the helper
Celestite::Adapter::Amberin yourapplication_controller.crto add thecelestite_rendermacro. - Add
celestite_amber_init.crto/config/initializers. - Include an
_error.sveltefile in your views directory. - Add a static route for your
build_dirto Amber’s static pipeline. - 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.