Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

NE.Standard

A server-driven UI framework for .NET.

You write a view — a component tree, in C# fluent builders — and a controller — an observable object graph. The framework compiles that pair once into an immutable, indexed description, renders it to a platform, and then keeps the rendered surface in sync with the controller in both directions. The client never holds application state and never decides what to draw.

Web is the primary platform: ASP.NET Core for the shell and the transport, SignalR for the live channel, and a TypeScript client that ships embedded in the assembly — there is no separate front-end deploy step. On Windows, NE.Standard.UI.Desktop hosts that exact Web stack inside a native WebView2 desktop window over an in-process HTTP/2 loopback server (127.0.0.1:0) or a remote host.

Documentation: akievansdev.github.io/NE.Standard.

Install

Every package — the framework's, the icon set and each component package — is released at one version number, all of them together, and installed at it: a component package 2.0.0 goes with the framework's 2.0.0, and accepts a later framework of the same first digit.

An application is a class library over the platform-independent packages — its views, controllers, routes and services — and a web project that hosts it, so a second platform is a second host over the same library:

dotnet add App package NE.Standard.UI
dotnet add App.Web package NE.Standard.UI.Web
dotnet add App.Web package NE.Standard.UI.Web.Renderers

The engine brings the core and the built-in components to the library — the generators that write a controller's observable members included — and the web two bring the rest to the host. NE.Standard.UI.Extensions, the presets, goes in the library and NE.Standard.UI.Testing in its test project: separate installs for an application that wants them. An add-on comes in the same two halves, the component in the library and its rendering in the host. Each package brings the namespaces an application writes against as global usings, so the code below needs no using line.

Package
NE.Standard.UI.Primitives the bottom layer: enums, attributes and constants — UIAlignment, UIOrientation, the styling and binding vocabulary. No dependencies.
NE.Standard.UI.Abstractions the binding and addressing model, RecursiveObservable, the styling value types (UIThickness, UIResponsive<T>), the items and interaction contracts, the ClientEffect vocabulary.
NE.Standard.UI.Authoring what an author writes against: the component, view and controller base contracts.
NE.Standard.UI.Compiled the compiler's output: CompiledView, its indexes and the resolution over them.
NE.Standard.UI.Shell hosting and runtime contracts: IUIHost, IUIRuntime, IUIUpdateSink, sessions, services.
NE.Standard.UI the engine: view compilation, the two-way runtime, hosting, routing, scheduling.
NE.Standard.UI.Components.Foundation the component bases and the template bindings a package's own component builds on — none of the built-ins.
NE.Standard.UI.Components the built-in components and their default templates, over the foundation.
NE.Standard.UI.Client the platform-neutral C# client runtime (UIClientPage, IUIClientTransport, InProcessUIClientTransport, RemoteUIClientSession, RemoteUIClientTransport, UIClientStore) shared by NE.Standard.UI.Testing and native C# clients.
NE.Standard.UI.Generators the two Roslyn source generators the stack is built on, usable by anything defining its own components or observable models.
NE.Standard.UI.Server the API-only ASP.NET Core host (UIServerStartupBase<TStartup>, UIServerStartupBuilder, MapStandardUIServerAsync) for remote C# clients without HTML shell rendering or Web assets.
NE.Standard.UI.Web the ASP.NET Core host: shell, SignalR channel, file transfer, and the embedded TypeScript client.
NE.Standard.UI.Web.Abstractions the render contracts an add-on implements to render a component of its own.
NE.Standard.UI.Web.Renderers.Foundation the renderer base and the shared style, text and input helpers an add-on's own renderer builds on.
NE.Standard.UI.Web.Renderers the HTML renderers for the built-in components, over the foundation.
NE.Standard.UI.Desktop the Windows WebView2 desktop host: runs the full NE.Standard.UI.Web stack inside a native window over an in-process HTTP/2 loopback server or a remote host, with zero-copy local file transfers, native Windows Toast notifications, Win32 DWM theme sync, and localized leave-guard close confirmation.
NE.Standard.UI.Extensions presets over the components: a text in a role, a page's header band and sections, an inline message and a banner, a stack and a row, a button per type, a field with its hint, a read-only key-value list, and one interaction from another component's value. Server-only, nothing new to render.
NE.Standard.UI.Testing an application's tests without a browser: its own startup booted with no platform under it, a page opened through the host's real path, its components found, written to and pressed, and what the page received read back. No test framework or assertion library.

Icons ship separately, from NE.Standard.UI.Icons — Material Symbols, a name package and a web package, MIT, released together with the framework on the same version. They are developed alongside the framework, so the set and the renderer it plugs into are never out of step.

Components can ship separately too. A component package is a component like the built-in ones — the same generator, the same binding, its own renderer on NE.Standard.UI.Web.Renderers.Foundation (the data grid, which extends the table, on NE.Standard.UI.Web.Renderers) — under the framework's own licence, released with every framework version at its number, each in a repository of its own:

  • NE.Standard.UI.CodeInput — a code editor with syntax highlighting, inline completions, custom mark and span styles, line numbers, several carets and find and replace, plus a Markdown display.
  • NE.Standard.UI.DataGrid — a data grid over the table: typed columns, editing in place, filters, paging, totals, pinned columns, a detail row and CSV export.
  • NE.Standard.UI.Charts — line, area, bar, pie, share bar, scatter and radar charts, a sparkline and a gauge, as SVG the browser keeps.
  • NE.Standard.UI.Graph — a canvas of typed nodes, and the layered graph of an application's own nodes or of its resources and crafts; a calculator's node kinds come ready made in NE.Standard.UI.Graph.Calculator, picture kinds in NE.Standard.UI.Graph.Image.

The colour palette is NE.Colors, a repository of its own because more than this framework needs it. It is MIT, and it arrives as a dependency of NE.Standard.UI.Abstractions.

If you installed the package NE.Standard — the general-purpose helpers that used to ship from here — it is NE.Common now, MIT and in its own repository. It was never part of the framework, and nothing here depends on it.

Coding agents can learn the framework from the skills/ne-standard skill shipped in this repository — what the framework already has, modular references (skills/ne-standard/references/), the full component catalogue (components.md), and links to the live documentation at https://akievansdev.github.io/NE.Standard/. Copy or symlink skills/ne-standard into your workspace's agent skills directory (for example .agents/skills/ne-standard, .gemini/skills/ne-standard, or .claude/skills/ne-standard).

A first look

A view declares the tree and what each part binds to:

internal sealed class CounterView : UIViewBase, IUIViewDefinition
{
    public static string ViewKey => "counter";

    protected override IVisualComponent CreateContent()
        => new ContainerComponent()
            .SetPadding(UIThickness.Uniform(16))
            .AddChild(new TextComponent().BindTitle(nameof(CounterController.Count)))
            .AddChild(new ButtonComponent()
                .OnClick(nameof(CounterController.Increment))
                .SetTitle("Add one")
            );
}

A controller holds the state, and changing it is what updates the screen — [RecursiveMember] generates the notifying setter and the path segment the binding resolves against:

internal sealed partial class CounterController : UIControllerBase
{
    [RecursiveMember]
    public partial int Count { get; set; }

    [UICommand]
    public void Increment() => Count++;
}

Hosting is an ASP.NET Core application:

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

WebStartupBuilder.Configure<AppWebStartup, AppStartup>(builder.Services);

WebApplication app = builder.Build();
app.UseStaticFiles();
app.UseRouting();
await app.MapStandardUIWebAsync();
await app.RunAsync();

The demo

examples/DemoApp is the reference application, 92 routes in all: screens that compose many components into a piece of an application (a sign-up, a checkout, a chat, a file editor, the sign-in, account, admin and forbidden pages of the security mechanism), pages for what the framework does across components (words, commands, values and validation, large lists, colours), and one page per component — a preview beside every bindable property, each row stepping its value, then examples of it in use, each with its source.

dotnet run --project examples/DemoApp.Web        # http://localhost:5100
dotnet run --project examples/DemoApp.Desktop    # Windows WebView2 desktop window

Building

Requires the .NET 11 SDK (global.json), and Node 24 or later for the TypeScript client — which builds as part of dotnet build, so a TypeScript type error fails the .NET build.

dotnet build
dotnet build -p:SkipWebClientBuild=true      # skip npm/vite when node is unavailable

Contributing

This repository is a read-only mirror of a private one, so a merged pull request here would be erased by the next release — pull requests are switched off. Please open an issue instead: the change is made upstream and appears here with the next release.

License

The Prosperity Public License 3.0.0 — free for noncommercial use, with a thirty-day trial for commercial use. Personal projects, research, education, charities and public institutions are not commercial use. See LICENSE.md; it is one page.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages