Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,23 @@
"Bash(dotnet tool run dotnet-ef:*)",
"Bash(dotnet tool:*)",
"Bash(dotnet --list-sdks:*)",
"Bash(dotnet nuget:*)"
"Bash(dotnet nuget:*)",
"Bash(Get-ChildItem -Path \"c:\\\\Development\\\\Playroom\\\\OptiGraphExtensions\" -Recurse -Directory)",
"Bash(Select-Object -ExpandProperty FullName)",
"Bash(Sort-Object)",
"WebFetch(domain:world.optimizely.com)",
"WebFetch(domain:support.optimizely.com)",
"Bash(curl -s \"https://api.nuget.optimizely.com/v3-flatcontainer/episerver.cms.ui.core/index.json\")",
"Bash(curl -s \"https://api.nuget.optimizely.com/v3-flatcontainer/episerver.cms/index.json\")",
"Bash(curl -s \"https://api.nuget.optimizely.com/v3-flatcontainer/optimizely.contentgraph.cms/index.json\")",
"Bash(curl -v \"https://api.nuget.optimizely.com/v3-flatcontainer/episerver.cms.ui.core/index.json\")",
"Bash(curl -sL \"https://nuget.optimizely.com/v3-flatcontainer/episerver.cms.ui.core/index.json\")",
"Bash(curl -sLv \"https://nuget.optimizely.com/v3-flatcontainer/episerver.cms.ui.core/index.json\")",
"Bash(dotnet package *)",
"Bash(curl -sL \"https://api.nuget.optimizely.com/v3/registration5-semver1/episerver.cms/index.json\")",
"Bash(find ~/.nuget/packages/episerver.framework -name \"ScheduledJobAttribute.cs\" 2>/dev/null | head -3)",
"Read(//c/Users/GrahamCarr/.nuget/packages/episerver.framework/**)",
"Bash(powershell -NoProfile -Command '& { Add-Type -Path '\\\\''EPiServer.Framework.dll'\\\\'' -ErrorAction SilentlyContinue; [System.Reflection.Assembly]::LoadFrom\\('\\\\''__TRACKED_VAR__/EPiServer.Framework.dll'\\\\''\\).GetTypes\\(\\) | Where-Object { $_.FullName -like '\\\\''*ScheduledJob*'\\\\'' -or $_.FullName -like '\\\\''*ScheduledPlugIn*'\\\\'' } | Select-Object FullName }')"
],
"deny": [],
"ask": []
Expand Down
10 changes: 5 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview
This is an Optimizely CMS 12 AddOn package called OptiGraphExtensions that provides management of synonyms, pinned results, webhooks, query library, request logs, and custom data sources within Optimizely Graph. The project consists of the main library and a sample CMS implementation.
This is an Optimizely CMS 13 AddOn package called OptiGraphExtensions that provides management of synonyms, pinned results, webhooks, query library, request logs, and custom data sources within Optimizely Graph. The project consists of the main library and a sample CMS implementation. Targets .NET 10.

## Development Commands

Expand Down Expand Up @@ -46,7 +46,7 @@ The project is configured to automatically generate NuGet packages on build (`Ge
### Project Structure
- **src/OptiGraphExtensions/**: Main AddOn library
- **src/OptiGraphExtensions.Tests/**: NUnit test project
- **Sample/SampleCms/**: Example Optimizely CMS 12 implementation demonstrating the AddOn
- **Sample/SampleCms/**: Example Optimizely CMS 13 implementation demonstrating the AddOn

### Key Components

Expand Down Expand Up @@ -343,9 +343,9 @@ The project is configured to automatically generate NuGet packages on build (`Ge
- NdJSON format: action line + data line pairs

### Dependencies
- .NET 8.0 target framework
- Optimizely CMS 12 (EPiServer.CMS.UI.Core 12.23.0)
- Entity Framework Core 8.0.19 with SQL Server provider
- .NET 10.0 target framework
- Optimizely CMS 13 (EPiServer.Cms.UI.Core 13.0.2)
- Entity Framework Core 10.0.7 with SQL Server provider
- NUnit for testing with Moq framework for mocking
- System.ComponentModel.Annotations for validation attributes

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# OptiGraphExtensions

An Optimizely CMS 12 AddOn that provides comprehensive management of synonyms, pinned results, webhooks, saved queries, request logs, and custom data sources within Optimizely Graph. This package enables content editors and administrators to enhance search experiences through intelligent synonym mapping, result pinning capabilities, webhook event management, GraphQL query building, API monitoring, and external data integration.
An Optimizely CMS 13 AddOn that provides comprehensive management of synonyms, pinned results, webhooks, saved queries, request logs, and custom data sources within Optimizely Graph. This package enables content editors and administrators to enhance search experiences through intelligent synonym mapping, result pinning capabilities, webhook event management, GraphQL query building, API monitoring, and external data integration.

[![NuGet Version](https://img.shields.io/nuget/v/OptiGraphExtensions.svg)](https://www.nuget.org/packages/OptiGraphExtensions/)
[![.NET 8.0](https://img.shields.io/badge/.NET-8.0-purple.svg)](https://dotnet.microsoft.com/download/dotnet/8.0)
[![Optimizely CMS 12](https://img.shields.io/badge/Optimizely%20CMS-12-blue.svg)](https://docs.developers.optimizely.com/content-management-system/v12.0.0-cms/)
[![.NET 10.0](https://img.shields.io/badge/.NET-10.0-purple.svg)](https://dotnet.microsoft.com/download/dotnet/10.0)
[![Optimizely CMS 13](https://img.shields.io/badge/Optimizely%20CMS-13-blue.svg)](https://docs.developers.optimizely.com/content-management-system/v13.0.0-CMS/)

> **Note:** Version 7.x targets Optimizely CMS 13 / .NET 10. If you are still on CMS 12, use version 6.x of this package.

## Key Features

Expand Down Expand Up @@ -140,7 +142,7 @@ An Optimizely CMS 12 AddOn that provides comprehensive management of synonyms, p

### Installation

Install the NuGet package in your Optimizely CMS 12 project:
Install the NuGet package in your Optimizely CMS 13 project:

```bash
dotnet add package OptiGraphExtensions
Expand Down Expand Up @@ -176,7 +178,7 @@ app.UseEndpoints(endpoints =>
});
```

Add your Graph instance configuration to appsettings.json, this information can be found within PaaSPortal for a PaaS instance of Optimizely CMS12 and within the dashboard of a SaaS instance of Optimizely CMS 12
Add your Graph instance configuration to appsettings.json, this information can be found within PaaSPortal for a PaaS instance of Optimizely CMS 13 and within the dashboard of a SaaS instance of Optimizely CMS 13

```csharp
"Optimizely": {
Expand Down Expand Up @@ -277,9 +279,9 @@ src/
## Development

### Prerequisites
- .NET 8.0 SDK
- .NET 10.0 SDK
- SQL Server or SQL Server Express
- Optimizely CMS 12 development environment
- Optimizely CMS 13 development environment

### Building the Project

Expand Down Expand Up @@ -553,9 +555,9 @@ The project includes comprehensive NUnit tests covering:

## Dependencies

- .NET 8.0
- Optimizely CMS 12 (EPiServer.CMS.UI.Core 12.23.0)
- Entity Framework Core 8.0.19 with SQL Server provider
- .NET 10.0
- Optimizely CMS 13 (EPiServer.Cms.UI.Core 13.0.2)
- Entity Framework Core 10.0.7 with SQL Server provider
- Microsoft.Extensions.Caching.Memory for caching
- Microsoft.Extensions.Http for connection pooling
- NUnit 3.14.0 for testing
Expand Down
2 changes: 1 addition & 1 deletion Sample/SampleCms/Features/Home/HomePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ public class HomePage : SitePageData
GroupName = SystemTabNames.Settings,
Order = 1000)]
[AllowedTypes(typeof(SiteSettingsPage))]
public virtual PageReference? SiteSettings { get; set; }
public virtual ContentReference? SiteSettings { get; set; }
}
31 changes: 16 additions & 15 deletions Sample/SampleCms/SampleCms.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RequiresAspNetWebAssets>true</RequiresAspNetWebAssets>
<UserSecretsId>681c02de-100c-43e0-9d30-cd484506c868</UserSecretsId>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,30 +13,29 @@
<Using Include="EPiServer.DataAbstraction" />
<Using Include="EPiServer.DataAnnotations" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="EPiServer.CMS" Version="12.31.0" />
<PackageReference Include="EPiServer.CMS.AspNetCore.Routing" Version="12.22.1" />
<PackageReference Include="EPiServer.Framework" Version="12.22.1" />
<PackageReference Include="EPiServer.CMS.UI.Core" Version="12.32.0" />
<PackageReference Include="Geta.Optimizely.Sitemaps" Version="3.2.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<PackageReference Include="EPiServer.CMS" Version="13.0.2" />
<PackageReference Include="EPiServer.Cms.AspNetCore.Routing" Version="13.0.2" />
<PackageReference Include="EPiServer.Framework" Version="13.0.2" />
<PackageReference Include="EPiServer.Cms.UI.Core" Version="13.0.2" />
<PackageReference Include="EPiServer.Cms.UI.AspNetIdentity" Version="13.0.2" />
<PackageReference Include="EPiServer.Cms.UI.VisitorGroups" Version="13.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Optimizely.ContentGraph.Cms" Version="4.2.0" />
<PackageReference Include="Stott.Optimizely.RobotsHandler" Version="3.0.1" />
<PackageReference Include="Stott.Security.Optimizely" Version="2.7.0" />
<PackageReference Include="Optimizely.Graph.Cms" Version="13.0.2" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Resources\Translations\**\*" />
</ItemGroup>

<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\OptiGraphExtensions\OptiGraphExtensions.csproj" />
</ItemGroup>
Expand Down
33 changes: 9 additions & 24 deletions Sample/SampleCms/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
using EPiServer.Cms.Shell;
using EPiServer.Cms.Shell.UI;
using EPiServer.Cms.UI.AspNetIdentity;
using EPiServer.ContentApi.Core.DependencyInjection;
using EPiServer.Cms.UI.VisitorGroups;
using EPiServer.Data;
using EPiServer.DependencyInjection;
using EPiServer.Scheduler;
using EPiServer.ServiceLocation;
using EPiServer.Web.Routing;

using Geta.Optimizely.Sitemaps;
using Optimizely.Graph.DependencyInjection;

using OptiGraphExtensions.Common;
using OptiGraphExtensions.Features.Configuration;

using Stott.Optimizely.RobotsHandler.Configuration;
using Stott.Security.Optimizely.Features.Configuration;

namespace SampleCms;

public class Startup
Expand All @@ -35,33 +33,21 @@ public void ConfigureServices(IServiceCollection services)
services.Configure<SchedulerOptions>(options => options.Enabled = false);
}

services.Configure<DataAccessOptions>(options =>
{
options.UpdateDatabaseCompatibilityLevel = true;
});

services.AddCmsAspNetIdentity<ApplicationUser>()
.AddCms()
.AddVisitorGroupsUI()
.AddAdminUserRegistration(x => x.Behavior = RegisterAdminUserBehaviors.Enabled | RegisterAdminUserBehaviors.LocalRequestsOnly)
.AddEmbeddedLocalization<Startup>();

services.AddServerSideBlazor();

services.AddSitemaps(x =>
{
x.EnableRealtimeSitemap = false;
x.EnableRealtimeCaching = true;
x.RealtimeCacheExpirationInMinutes = 60;
});

services.ConfigureContentApiOptions(o =>
{
o.IncludeInternalContentRoots = true;
o.IncludeSiteHosts = true;
// o.EnablePreviewFeatures = true; // optional
});

services.AddContentDeliveryApi();

services.AddContentGraph();

services.AddStottSecurity();
services.AddRobotsHandler();
services.AddOptiGraphExtensions(optiGraphExtensionsSetupOptions =>
{
optiGraphExtensionsSetupOptions.ConnectionStringName = "EPiServerDB";
Expand All @@ -87,7 +73,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseAuthentication();
app.UseAuthorization();

app.UseStottSecurity();
app.UseOptiGraphExtensions();

app.UseEndpoints(endpoints =>
Expand Down
Binary file modified Sample/SampleCms/modules/_protected/CMS/CMS.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Sample/SampleCms/modules/_protected/Shell/Shell.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.417",
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,8 +11,8 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.7" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Text.Json;
using EPiServer.PlugIn;
using EPiServer.Scheduler;
using EPiServer.ServiceLocation;
using Microsoft.Extensions.Logging;
Expand All @@ -14,11 +13,10 @@ namespace OptiGraphExtensions.Features.CustomData.ScheduledJobs
/// Scheduled job that executes due import configurations.
/// Runs at configurable intervals and processes all imports that are scheduled to run.
/// </summary>
[ScheduledPlugIn(
[ScheduledJob(
DisplayName = "External Data Import",
Description = "Executes scheduled external data imports for custom data sources. Configure individual import schedules in the Custom Data Management UI.",
GUID = "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
SortIndex = 1000)]
GUID = "A1B2C3D4-E5F6-7890-ABCD-EF1234567890")]
public class ExternalDataImportScheduledJob : ScheduledJobBase
{
private bool _stopSignaled;
Expand Down
31 changes: 11 additions & 20 deletions src/OptiGraphExtensions/OptiGraphExtensions.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Title>Opti Graph Extensions</Title>
<Version>6.0.0</Version>
<PackageReleaseNotes></PackageReleaseNotes>
<Version>7.0.0</Version>
<PackageReleaseNotes>Upgraded to Optimizely CMS 13 / .NET 10. Dropped support for CMS 12.</PackageReleaseNotes>
<RepositoryType>git</RepositoryType>
<PackageTags>Optimizely;Graph</PackageTags>
<RepositoryUrl>https://github.com/adayinthelifeofapro/OptiGraphExtensions</RepositoryUrl>
<PackageProjectUrl>https://github.com/adayinthelifeofapro/OptiGraphExtensions</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Graham Carr 2026</Copyright>
<Description>An Optimizely CMS package that allows the management of synonyms, pinned results, webhooks, request logs, creation and export of queries and custom data sources all within Optimizely Graph</Description>
<AssemblyVersion>6.0.0</AssemblyVersion>
<FileVersion>6.0.0</FileVersion>
<AssemblyVersion>7.0.0</AssemblyVersion>
<FileVersion>7.0.0</FileVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
Expand Down Expand Up @@ -47,25 +47,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="EPiServer.CMS.UI.Core" Version="12.23.0" />
<PackageReference Include="EPiServer.Cms.UI.Core" Version="13.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.6" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.19" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.19">
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.19" />
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.7" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@using EPiServer.Framework.Web.Resources
@using EPiServer.Shell.Navigation
@addTagHelper *, EPiServer.Shell.UI
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -10,7 +10,7 @@

<!-- LightTheme -->
@ClientResources.RenderResources("ShellCoreLightTheme")

<style>
main {
display: flex;
Expand All @@ -31,9 +31,9 @@
<base href="~/" />
</head>
<body>
@Html.AntiForgeryToken() <!-- Thanks to: https://world.optimizely.com/blogs/matthew-slim/dates/2023/6/new-menu-system-released/ -->
@Html.CreatePlatformNavigationMenu()
<div @Html.ApplyPlatformNavigation() style="padding-left: 10px;background: white;padding: 1rem;">
@Html.AntiForgeryToken()
<platform-navigation />
<div style="padding: 56px 1rem 1rem 1rem; background: white;">

@RenderBody()

Expand Down
Loading