Home

Awesome

Welcome to the collection of Fusion samples!

All project updates are published on its Discord Server; it's also the best place for Q/A.
Build Discord Server

Don't know what Fusion is? You should! Fusion is your #1 partner in crime if you're building a real-time app (an online app delivering some or all updates in real-time) or a high-load app. Moreover, it plays really well with Blazor and works on MAUI.

Curious to see Fusion in action? Explore Actual Chat – a very new chat app built by the minds behind Fusion.

Actual Chat fuses real-time audio, live transcription, and AI assistance to let you communicate with utmost efficiency. With clients for WebAssembly, iOS, Android, and Windows, it boasts nearly 100% code sharing across these platforms. Beyond real-time updates, several of its features, like offline mode, are powered by Fusion.

We're posting some code examples from Actual Chat codebase here, so join this chat to learn how we use it in a real app.

Fusion allows you to build real-time UIs like this one — and it's nearly as easy as if there were no logic related to real-time updates at all:

<img src="https://img.shields.io/badge/-Live!-red" valign="middle"> Play with live version of this sample right now!

Running Samples

Build & run locally with .NET 8.0 SDK:

# Run this command first
dotnet build
SampleCommand
HelloCartdotnet run -p src/HelloCart/HelloCart.csproj
HelloWorlddotnet run -p src/HelloWorld/HelloWorld.csproj
HelloBlazorServerdotnet run -p src/HelloBlazorServer/HelloBlazorServer.csproj + open http://localhost:5005/
HelloBlazorHybriddotnet run -p src/HelloBlazorHybrid/Server/Server.csproj + open http://localhost:5005/
Blazor Samplesdotnet run -p src/Blazor/Server/Server.csproj + open http://localhost:5005/
MiniRpcdotnet run -p src/MiniRpc/MiniRpc.csproj
MultiServerRpcdotnet run -p src/MultiServerRpc/MultiServerRpc.csproj
Benchmarkdotnet run -c:Release -p src/Benchmark/Benchmark.csproj
RpcBenchmarkdotnet run -c:Release -p src/RpcBenchmark/RpcBenchmark.csproj
TutorialInstall Try .NET + dotnet try --port 50005 docs/tutorial

Build & run with Docker + Docker Compose:

# Run this command first
docker-compose build
SampleCommand
HelloCartdocker-compose run sample_hello_cart dotnet Samples.HelloCart.dll
HelloWorlddocker-compose run sample_hello_world dotnet Samples.HelloWorld.dll
HelloBlazorServerdocker-compose run --service-ports sample_hello_blazor_server + open http://localhost:5005/
HelloBlazorHybriddocker-compose run --service-ports sample_hello_blazor_hybrid + open http://localhost:5005/
Blazor Samplesdocker-compose run --service-ports sample_blazor + open http://localhost:5005/
MiniRpcdocker-compose run sample_mini_rpc dotnet Samples.MiniRpc.dll
MultiServerRpcdocker-compose run sample_multi_server_rpc dotnet Samples.MultiServerRpc.dll
Benchmarkdocker-compose run sample_benchmark dotnet Samples.Benchmark.dll
RpcBenchmarkdocker-compose run sample_rpc_benchmark dotnet Samples.RpcBenchmark.dll
Tutorialdocker-compose run --service-ports tutorial + open https://localhost:50005/README.md

A detailed description of nearly every sample can be found here: https://servicetitan.github.io/Stl.Fusion.Samples/

Useful Links

P.S. If you've already spent some time learning about Fusion, please help us to make it better by completing Fusion Feedback Form (1…3 min).