Builds on the counter example by adding HTTP requests and
Server-Sent Events. The counter state lives on a shared server at
crux-counter.fly.dev, so updates from one client
are visible to all connected clients.
The shared directory adds two capabilities on top of the basic counter:
crux_httpfor GET/POST requests to the shared counter API- A custom SSE capability that streams updates from the server
- Optimistic updates — the UI updates immediately, then reconciles when the server responds
- SwiftUI (iOS/macOS) —
apple/ - Android/Kotlin —
android/ - Leptos —
web-leptos/ - NextJS —
web-nextjs/
- Choose a shell you're interested in, i.e.
appleorandroid. - In the shell's directory, run
just doctorto make sure you have the right tools installed - Run
just devto generate code and build that shell - For
appleandandroidshells, open the IDE. For others, runjust servein the shell directory.