thonaj/Umbraco.AI.TextArea

C#

0

0 commits

updated Jun 16, 2026

See the code

README

Umbraco.AI.TextArea

AI-powered text area property editor for Umbraco 17 with 22 LLM provider support.

Structure

Umbraco.AI.TextArea/
├── src/
│   ├── Umbraco.AI.TextArea/        # .NET 10 package project (Class Library)
│   │   ├── Umbraco.AI.TextArea.csproj
│   │   ├── umbraco-package.json
│   │   └── wwwroot/App_Plugins/Umbraco.AI.TextArea/   # client build output
│   └── client/                     # Lit + TypeScript front-end (Vite)
│       ├── package.json
│       ├── tsconfig.json
│       ├── vite.config.ts
│       └── src/
│           ├── dashboards/ai-providers/ai-providers.element.ts
│           └── property-editors/ai-textarea/ai-textarea.element.ts
└── tests/
    └── Umbraco.AI.TextArea.Tests/  # xUnit tests

Prerequisites

  • .NET 10 SDK
  • Node.js 22+ (only required for client-side development; dotnet build will run npm install and npm run build automatically on first build)

Building

The .NET csproj wires the client build into MSBuild, so a single dotnet build is usually enough:

dotnet build

This will, in order:

  1. npm install in src/client/ (skipped on subsequent builds if node_modules/ exists)
  2. npm run build in src/client/ — outputs bundles to src/Umbraco.AI.TextArea/wwwroot/App_Plugins/Umbraco.AI.TextArea/
  3. Compile the .NET assembly and register the static web assets

To run only the client build (for fast iteration):

cd src/client
npm install        # first time only
npm run build

Watch mode:

cd src/client
npm run build:watch

Type-check only (no emit):

cd src/client
npm run type-check

Testing Locally

This package is consumed by the root DevHost Umbraco site via a project reference. See the root README for the full local-testing workflow.

Quick version:

# from the repo root
dotnet build
dotnet run --project src/DevHost

Backoffice at https://localhost:44332 (or http://localhost:5183). The "AI Text Area" property editor and "AI Providers" section will appear after install.

Tests

dotnet test tests/Umbraco.AI.TextArea.Tests/

Packaging

dotnet pack -c Release

Produces Umbraco.AI.TextArea.1.0.0.nupkg. The BeforePack target re-runs the client build so the published NuGet contains the latest bundles and source maps under wwwroot/App_Plugins/Umbraco.AI.TextArea/.

Notes & Gotchas

  • emptyOutDir: false in vite.config.ts — deleted/renamed source files leave old chunks behind. If the backoffice behaves oddly after a refactor, delete src/Umbraco.AI.TextArea/wwwroot/App_Plugins/Umbraco.AI.TextArea/chunks/ and rebuild.
  • Clean target only removes *.js and *.map files under wwwroot/App_Plugins/Umbraco.AI.TextArea/. It does not remove umbraco-package.json or any other manifest files.

thonaj/Umbraco.AI.TextArea

C#

0

0 commits

updated Jun 16, 2026

See the code

README

Umbraco.AI.TextArea

AI-powered text area property editor for Umbraco 17 with 22 LLM provider support.

Structure

Umbraco.AI.TextArea/
├── src/
│   ├── Umbraco.AI.TextArea/        # .NET 10 package project (Class Library)
│   │   ├── Umbraco.AI.TextArea.csproj
│   │   ├── umbraco-package.json
│   │   └── wwwroot/App_Plugins/Umbraco.AI.TextArea/   # client build output
│   └── client/                     # Lit + TypeScript front-end (Vite)
│       ├── package.json
│       ├── tsconfig.json
│       ├── vite.config.ts
│       └── src/
│           ├── dashboards/ai-providers/ai-providers.element.ts
│           └── property-editors/ai-textarea/ai-textarea.element.ts
└── tests/
    └── Umbraco.AI.TextArea.Tests/  # xUnit tests

Prerequisites

  • .NET 10 SDK
  • Node.js 22+ (only required for client-side development; dotnet build will run npm install and npm run build automatically on first build)

Building

The .NET csproj wires the client build into MSBuild, so a single dotnet build is usually enough:

dotnet build

This will, in order:

  1. npm install in src/client/ (skipped on subsequent builds if node_modules/ exists)
  2. npm run build in src/client/ — outputs bundles to src/Umbraco.AI.TextArea/wwwroot/App_Plugins/Umbraco.AI.TextArea/
  3. Compile the .NET assembly and register the static web assets

To run only the client build (for fast iteration):

cd src/client
npm install        # first time only
npm run build

Watch mode:

cd src/client
npm run build:watch

Type-check only (no emit):

cd src/client
npm run type-check

Testing Locally

This package is consumed by the root DevHost Umbraco site via a project reference. See the root README for the full local-testing workflow.

Quick version:

# from the repo root
dotnet build
dotnet run --project src/DevHost

Backoffice at https://localhost:44332 (or http://localhost:5183). The "AI Text Area" property editor and "AI Providers" section will appear after install.

Tests

dotnet test tests/Umbraco.AI.TextArea.Tests/

Packaging

dotnet pack -c Release

Produces Umbraco.AI.TextArea.1.0.0.nupkg. The BeforePack target re-runs the client build so the published NuGet contains the latest bundles and source maps under wwwroot/App_Plugins/Umbraco.AI.TextArea/.

Notes & Gotchas

  • emptyOutDir: false in vite.config.ts — deleted/renamed source files leave old chunks behind. If the backoffice behaves oddly after a refactor, delete src/Umbraco.AI.TextArea/wwwroot/App_Plugins/Umbraco.AI.TextArea/chunks/ and rebuild.
  • Clean target only removes *.js and *.map files under wwwroot/App_Plugins/Umbraco.AI.TextArea/. It does not remove umbraco-package.json or any other manifest files.

Languages

C#

77.8%

TypeScript

22.2%