Examples

These examples live in the Gyral repository as its acceptance suite: each one has tests, and the excerpts below are copied from the real files. To run them all, clone the repository, then pnpm install and pnpm examples.

Basics

Effects, time and HTTP

Components and shared state

Routing, forms and the platform

A whole application

gyral-shop is a department store built with Gyral, Hono and SQLite: catalog and search, accounts, cart, checkout with mock payments, order history, reviews, wish lists and an admin area. Pages are rendered on the server and work without JavaScript; page structure is light DOM and widgets are islands.

Its four themes change only CSS, from a dense marketplace to an airy boutique. See them side by side on the home page.

Try it at demo-shop.gyral.dev, where the store resets every night and payments are mocked, or read how it keeps pages fast.

gyral-shop home page in the Marketplace theme
gyral-shop in Marketplace, its default theme