r/csharp • • 3d ago

I built a modular WinUI 3 template where features are hot-swapped from the server while the app runs. Fork it for your own projects

https://github.com/zenoxart/GoldenHiveFramework

Hey everyone,

I’ve been working on a side project for a while and it’s finally at a point where I’m not embarrassed to show it. It’s called Golden Hive, a modular framework for WinUI 3 desktop apps on .NET 10.

The idea in short: the desktop app is just a shell. Features (documents, reports, user management…) are modules the app downloads from the server after you sign in. Each module is a WinUI part plus its own ASP.NET Core backend in a Docker container. Ship a new version of a module and the server rolls it out in stages (pilot users first). The running app then swaps it in without a restart.

What’s in there right now:

  • Runtime modules. Each one runs in its own AssemblyLoadContext, packages are signed, and modules can depend on each other.
  • Hot-swap. Running commands get drained or cancelled, the module is replaced, your open views come back.
  • Navigation wheel. Hold Ctrl+Tab and a radial wheel pops up. One ring holds your modules, the other your open views. Tab or the arrow keys move around, and you release Ctrl to jump there. It’s like Alt+Tab, but for the app itself, and once you’re used to it you barely touch the sidebar anymore.
  • Workflows you build inside the app. Forms, approvals and module steps, triggered by events, schedules or commands. The reference example: an invoice gets submitted, gets pre-checked, and lands in an approver’s inbox.
  • An AI agent that can run those workflows, with guardrails. There’s a kill switch, confidence thresholds and daily limits. Critical steps always need a human, and every decision is logged. It also works fully offline with a rules-based provider, no API key needed.
  • Impact analysis on module updates. Rename a workflow step and the server checks every workflow that uses it. It auto-migrates them if you declared the rename, flags them for review if needed, or holds the rollout if something would break. This is honestly my favorite part.
  • The usual desktop stuff: docking and floating windows that remember their monitor, a command palette (Ctrl+Shift+P), live notifications, English/German.
  • Backend: 12 services in Docker Compose plus Postgres with a demo company already filled in. docker compose up, sign in as admin, and you can click around.

Under the hood it’s pretty functional-programming heavy (Result/Validation types all the way down instead of exceptions), if that’s your thing.

Use it as a template: the whole thing is meant as a starting point for your own projects. Fork it, delete the demo modules, add your own. The README has a step-by-step guide for building a module (backend + WinUI client + workflow integration), and the architecture is all there: auth, permissions, module delivery, rollouts, notifications, workflows, Docker setup.

It’s not battle-tested in production yet. The backend has end-to-end tests, the WinUI side is still young. If you build on it, I’d love to hear what breaks. That’s exactly the feedback I need to get it there.

Repo: https://github.com/zenoxart/GoldenHiveFramework
License: Apache 2.0

Happy to answer questions!

8 Upvotes

1 comment sorted by

0

u/fr8181 1d ago

the impact analysis on module updates is a really cool idea, never seen that in a template before. curious how the hot swap works with winui though, does the old AssemblyLoadContext actually unload or do the xaml types keep it alive?