ui-microservice-architecture-ai-kit

Blueprint .NET BFF microservices with workflow-driven writes and Refit reads.

Updated May 11, 2026
One-click install
npx skills add https://github.com/ducthang-hub/nw-ai-kit --skill ui-microservice-architecture-ai-kit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ui-microservice-architecture-ai-kit
Source: https://github.com/ducthang-hub/nw-ai-kit/tree/main/.agents/skills/ui-microservice-architecture-ai-kit
Command: npx skills add https://github.com/ducthang-hub/nw-ai-kit --skill ui-microservice-architecture-ai-kit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you avoid inconsistent, hard-to-maintain BFF patterns by providing a clear architecture for UI-facing .NET microservices that orchestrate workflows, enforce auth, and decide when to use workflow-driven writes versus direct read APIs.

Core Features & Use Cases

  • Single-purpose controller actions: One API action per controller file to keep endpoints composable and reviewable (versioned under V1).
  • Workflow-first for write operations: Use Netwealth.Workflow via IWorkflowClient for create/edit/delete so approvals, audit trails, and permission-based action filtering are enforced.
  • Direct API calls for reads: Use Refit client(s) to fetch data quickly for Get/Query/Search without workflow overhead.
  • Consistent integration patterns: Dedicated Refit API client files per backend microservice, DI extension methods with services.Add{ServiceName}(), and common NwController conventions.
  • Security & caching structure: JWT auth with Kong integration, AuthenticatedUserService via middleware context, and FusionCache with Redis for distributed caching (plus optional Kafka background consumers).

Quick Start

Create a new .NET 10 UI BFF project following the repo’s structure (V1 controllers, per-microservice Refit clients, validators, workflow module, and security middleware) and then implement write endpoints as workflow-triggering controller files while implementing read endpoints as direct API client calls.

Frequently Asked Questions about ui-microservice-architecture-ai-kit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a .NET BFF microservice to handle both read and write operations?

Structure a .NET BFF microservice by using workflow-driven orchestration via IWorkflowClient for create/edit/delete writes, and direct Refit client calls for read-only queries. This separates permission-aware approvals from fast data fetching.

What is the best way to route write operations through a workflow in a .NET BFF?

Route write operations through Netwealth.Workflow using an IWorkflowClient to ensure approvals, audit trails, and permission-based action filtering are enforced before committing changes via create/edit/delete endpoints.

How do I organize controllers in a UI-facing microservice for maintainability?

Organize UI-facing microservices with single-purpose controller actions, placing one API action per controller file under versioned V1 routes. This keeps endpoints composable, reviewable, and consistently structured.

Can I use Kafka for background processing in a .NET BFF architecture?

Yes, you can use Kafka for background processing in a .NET BFF architecture. The architecture supports optional event-driven Kafka background consumers alongside its standard Refit API calls and workflow orchestration.

How do I integrate JWT authentication and distributed caching in a .NET BFF?

Integrate JWT authentication and distributed caching in a .NET BFF by using Kong for secure gateway integration, AuthenticatedUserService via middleware context, and FusionCache with Redis for distributed cache management.

Do I need Refit to call backend microservices from a .NET BFF?

You need Refit to call backend microservices from a .NET BFF for read-only query endpoints. Dedicated Refit API client files per backend service enable fast data retrieval without workflow overhead.