Examples

Each example is a folder, run with just sluurp serve --public. The schema is applied on startup.

--public DIR serves a folder as the app at / (pages, routes, islands, schema, hooks, agents). NAME=DIR mounts another app at /NAME/, so one server can run several.

This site

website/ is this site. The landing page is a server-rendered .tsx route; the docs are Markdown, with the sidebar generated from frontmatter by a folder layout. Code is highlighted server-side, and JavaScript only loads for interactive islands: the chart playground, the UI kit, the editable page. It can be published with sluurp static.

Todos Collab

examples/todos/app is a multiplayer to-do list with live cursors, in two files. The route declares the data model with export const schema and renders one island, islands/todos.tsx, which keeps the list with Sync and shows the cursors with sluurp/cursors.

This is the actual island, not a screenshot. Open the page in a second window to see edits and cursors sync.

Sheet

examples/sheet/app is a multiplayer spreadsheet in one file, built on the kit’s Spreadsheet. Each cell is a row in a collection, synced to every open browser with Sync. Changing a cell or a formula recalculates only its dependents. You see other people’s pointers and selections, and the cell they’re editing, in their colour.

Open this page in two windows and edit a cell:

Running it locally, add ?name=Ada to each window’s URL to tell the pointers apart.

Server components

examples/server-components/app is a server-rendered .tsx page using the kit: an async component, a "use server" function called directly, and two islands. One calls the function from the browser; the other hydrates when scrolled into view.

A wiki

examples/wiki/app is a full wiki built on Pages in one file: nested pages, history, link graph, books and PDF export. It only adds sign-in, translations and a header.

Components

examples/components is the UI kit’s test bench: galleries of every component, the JSX runtime, TypeScript served as written, and renderer benchmarks. The kit’s browser tests run against it.