Examples
To try interactive views directly in your browser, open the browser examples: the playground, Motion demos and a server-rendered hydration snapshot.
Ranvier.Examples holds complete applications that use Ranvier for real workflows: remote data, file processing, data repair and Elmish-style review. Each workflow runs as a console scenario that checks its own outcome, and all four open together as tabs of one Avalonia desktop workbench.
Workflows
| Workflow | Core | Console | Desktop |
|---|---|---|---|
| Support workbench | F# | run-fsharp-console | Avalonia tab |
| File processing | C# | run-csharp-console | Avalonia tab |
| Data quality | F# | run-data-console | Avalonia tab |
| Elmish expense review | F# with Ranvier.Elmish | run-elmish-console | Avalonia tab |
Support workbench searches a local HTTP ticket service, edits drafts, reconciles server versions, recovers from disconnection, and keeps saves running after the editor closes. Its core is SupportDesk.fs; the support walkthrough covers requests, drafts, conflicts and mutation ownership. Related guides: Async memos, Drafts and Queries and mutations.
File processing streams real files through SHA-256 with bounded concurrency, reactive keyed lists, cancellation, retry and throttled progress. Its core is FileJobMonitor.cs; the jobs walkthrough covers worker admission, graph dispatch and terminal events. Related guides: C#, Threading and dispatch and Debounce and throttle.
Data quality imports a CSV, repairs malformed measurements, inspects calibration certificates, converts units together, keeps drafts across reloads, and exports valid rows. Its core is DataQuality.fs; the data walkthrough covers incremental projections, raw drafts and asynchronous selection. Related guides: Collections, Projections and Forms.
Elmish expense review reviews claims with an immutable model, messages, file commands and selectors, including validation, undo/redo and revision-aware saves. Its core is ExpenseReview.fs; the Elmish walkthrough covers immutable updates, commands, undo/redo and selectors. Related guide: Migrating from Elmish.
The feature map lists which reactive features each workflow uses and which object owns each node.
Desktop workbench
The F# and C# desktop launchers open the same four-tab workbench. The shared host is a C# Avalonia Desktop application; each tab binds to the workflow core listed above. The desktop apps require a graphical session and Avalonia's platform prerequisites.
Introductory order examples
Matching F# and C# order-pricing examples cover signals, conditional dependencies, batching and accepted submission snapshots, each as a console and an Avalonia desktop app. Read the introductory walkthrough, then run them with the intro argument:
dotnet run --project src/Ranvier.Examples.FSharp.Console -- intro
dotnet run --project src/Ranvier.Examples.CSharp.Console -- intro
dotnet run --project src/Ranvier.Examples.FSharp.Desktop -- --intro
dotnet run --project src/Ranvier.Examples.CSharp.Desktop -- --intro
Clone and build
The examples reference the Ranvier source projects through a git submodule at external/Ranvier, pinned to a Ranvier commit, so they build against current APIs without a package release. Clone with the submodule, then build and test with the .NET 10 SDK:
git clone --recurse-submodules https://github.com/shayanhabibi/Ranvier.Examples.git
cd Ranvier.Examples
dotnet fsi build.fsx -- build
dotnet fsi build.fsx -- test
For a clone made without --recurse-submodules, fetch the submodule from the repository directory:
git submodule update --init --recursive
Run
# Desktop workbench with all four workflows
dotnet fsi build.fsx -- run-fsharp-desktop
dotnet fsi build.fsx -- run-csharp-desktop
# Console scenarios
dotnet fsi build.fsx -- run-fsharp-console
dotnet fsi build.fsx -- run-csharp-console
dotnet fsi build.fsx -- run-data-console
dotnet fsi build.fsx -- run-elmish-console
Console scenarios fail on unexpected behaviour. The repository README lists where each scenario writes its files and how to move the submodule to a newer Ranvier revision.