Skip to content

AGIBuild/Agibuild.Fulora

Repository files navigation

Fulora

One runtime core for C# + Web. Build fast, stay native, scale confidently.


Product direction
Build a category-defining C# + Web application framework with a clear promise:
from first WebView embed to full product platform, without rewriting your foundation.

Current package ID: Agibuild.Fulora (branding is now Fulora).

Vision

Turn C# + Web into a first-class product-building stack for teams that need both speed and control.

  • Build rich experiences in TypeScript and C# as one coherent system
  • Keep platform control, security boundaries, and diagnostics first-class from day one
  • Scale from "embed one WebView" to "deliver a full product platform" without rewriting foundations

Why This Exists

Most teams building cross-platform products with C# + web want two outcomes at the same time:

  1. Web iteration speed (React/Vue/Svelte, HMR, fast release loops)
  2. Native-grade control (security boundaries, lifecycle governance, deterministic runtime behavior)

Traditional WebView wrappers often solve rendering, but still leave you to hand-build:

  • string-based host/web IPC
  • policy governance for host capabilities
  • diagnosable runtime behavior for CI and automation
  • scalable app-shell patterns across platforms

Fulora is designed to close that gap by default.

What This Is (Framework + Control)

0) Two adoption paths, one runtime core

  • Control path: integrate WebView into your architecture with minimal coupling
  • Framework path: adopt full capabilities (bridge/policy/shell/tooling) for faster product delivery

1) Typed bridge at the center

  • [JsExport] / [JsImport] contracts
  • source-generated C# and JS-facing proxies
  • AOT-safe, reflection-free path
  • V2: binary payload (byte[]Uint8Array), CancellationTokenAbortSignal, IAsyncEnumerable streaming, method overloads

2) Typed capability gateway for host/system operations

  • desktop/system capabilities converge into one typed entry model
  • avoid scattered host API calls in app-layer code

3) Policy-first runtime semantics

  • policy is evaluated before capability/provider execution
  • deterministic outcomes: allow / deny / failure

4) Agent-friendly diagnostics

  • machine-checkable diagnostics for critical runtime flows
  • usable by CI, test automation, and AI agents

5) Web-first template flow

  • starter path optimized for web-first hybrid desktop/mobile delivery
  • minimal host glue, typed contracts preserved end-to-end

6) Shell activation & deep-link

  • single-instance activation orchestration (primary/secondary)
  • deep-link native registration with policy-governed admission
  • SPA asset hot update with signature verification and rollback

Roadmap Alignment

Phase Theme Status
Phase 0 Foundation ✅ Done
Phase 1 Type-Safe Bridge ✅ Done
Phase 2 SPA Hosting ✅ Core Done
Phase 3 Polish & GA ✅ Done
Phase 4 Application Shell ✅ Done
Phase 5 Framework Positioning Foundation ✅ Completed
Phase 6 Governance Productization ✅ Completed
Phase 7 Release Orchestration ✅ Completed
Phase 8 Bridge V2 & Platform Parity 🚧 Active

Read more:

Platform Coverage

Platform Engine Status
Windows WebView2 Preview
macOS WKWebView Preview
Linux WebKitGTK Preview
iOS WKWebView Preview
Android Android WebView Preview

Avalonia provides an official commercial WebView option.
This project focuses on an open, cross-platform, contract-driven hybrid app platform.


60-Second Start

Install package:

dotnet add package Agibuild.Fulora

Enable in Program.cs:

AppBuilder.Configure<App>()
    .UsePlatformDetect()
    .UseAgibuildWebView()
    .StartWithClassicDesktopLifetime(args);

Add control in XAML:

<Window xmlns:wv="using:Agibuild.Fulora">
    <wv:WebView x:Name="WebView" Source="https://example.com" />
</Window>

For full guides:


Typed Bridge in Practice

Expose C# service to JavaScript:

[JsExport]
public interface IGreeterService
{
    Task<string> Greet(string name);
}

public sealed class GreeterService : IGreeterService
{
    public Task<string> Greet(string name) => Task.FromResult($"Hello, {name}!");
}

webView.Bridge.Expose<IGreeterService>(new GreeterService());

Call from JavaScript:

const msg = await window.agWebView.rpc.invoke("GreeterService.greet", { name: "World" });

Call JavaScript from C#:

[JsImport]
public interface INotificationService
{
    Task ShowNotification(string message);
}

var notifications = webView.Bridge.GetProxy<INotificationService>();
await notifications.ShowNotification("File saved!");

Web-First SPA Hosting

Production (embedded assets):

webView.EnableSpaHosting(new SpaHostingOptions
{
    EmbeddedResourcePrefix = "wwwroot",
    ResourceAssembly = typeof(MainWindow).Assembly,
});

await webView.NavigateAsync(new Uri("app://localhost/index.html"));

Development (HMR proxy):

webView.EnableSpaHosting(new SpaHostingOptions
{
    DevServerUrl = "http://localhost:5173",  // Vite, webpack, etc.
});

Demo: Avalonia + React

Sample project: samples/avalonia-react/

Dashboard

Chat

Settings

Deep dive:

Demo: AI Chat (Streaming)

Sample project: samples/avalonia-ai-chat/

Demonstrates IAsyncEnumerable<T> streaming via the bridge with Microsoft.Extensions.AI. Features real-time token rendering, cancellation via AbortController, and echo-mode fallback.

Deep dive: AI Integration Guide


Capability Snapshot

  • OAuth / Web authentication (IWebAuthBroker)
  • Web dialog flows (IWebDialog)
  • Screenshot and PDF export
  • Cookie and command manager support
  • Environment options (DevTools, User-Agent, session modes)
  • Dependency injection integration

For detailed API usage, see:


Architecture at a Glance

┌──────────────────────────────────────────────────────────┐
│                   Your Avalonia App                     │
│                                                          │
│  ┌───────────┐   ┌─────────────┐   ┌─────────────────┐  │
│  │ WebView   │   │ Typed Bridge│   │ Capability Gate │  │
│  │ Control   │   │ C# <-> JS   │   │ Host/System API │  │
│  └─────┬─────┘   └──────┬──────┘   └────────┬────────┘  │
│        │                │                    │           │
│  ┌─────┴────────────────┴────────────────────┴────────┐  │
│  │         Runtime Core (policy-first execution)      │  │
│  │  Navigation · RPC · Shell · Diagnostics · Policy   │  │
│  └──────────────────────────┬──────────────────────────┘  │
│                             │ IWebViewAdapter             │
│  ┌──────────────────────────┴──────────────────────────┐  │
│  │      WKWebView · WebView2 · WebKitGTK · Android    │  │
│  └─────────────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────────────┘

Template Workflow

dotnet new install Agibuild.Fulora.Templates
dotnet new agibuild-hybrid -n MyApp
cd MyApp
dotnet run --project MyApp.Desktop

Quality Signals

Metric Value
Unit tests 1459
Integration tests 209
Line coverage 95.87%
Branch coverage 84.8%
Method coverage 98.2%
nuke Test            # Unit + Integration (1668 tests)
nuke Coverage        # Coverage report + threshold enforcement
nuke NugetPackageTest  # Pack → install → run smoke test
nuke TemplateE2E     # Template end-to-end test

License

MIT

About

Fulora — a production-grade C# + Web application framework. Type-safe bridge, policy-first runtime, cross-platform (Windows/macOS/Linux/Android/iOS). From first WebView embed to full product platform.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors