This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
GroupDocs.Viewer.UI is a modular .NET library that provides a document viewer UI (embedded Angular SPA) with pluggable API backends, storage providers, and cache providers. Targets .NET 6.0 and .NET 8.0.
dotnet build ./GroupDocs.Viewer.UI.sln # Build entire solution
dotnet test ./tests/GroupDocs.Viewer.UI.Api.Tests # Run all tests
dotnet test ./tests/GroupDocs.Viewer.UI.Api.Tests --filter "FullyQualifiedName~ClassName.MethodName" # Run single testProduction packaging is done via build.ps1 (PowerShell), which packs all 12 NuGet packages into ./build_out/. CI runs on Windows with .NET 6.0 and 8.0.
The solution is layered into three tiers connected via dependency injection:
Core layer (GroupDocs.Viewer.UI.Core, netstandard2.0): Defines interfaces (IFileStorage, IFileCache) and configuration types (Config, RenderingMode, ZoomLevel). No ASP.NET dependency.
API layer (GroupDocs.Viewer.UI.Api, net6.0/net8.0): Convention-based controllers, URL building, error handling. Endpoints: /get-page, /get-thumb, /get-pdf, /get-resource.
UI layer (GroupDocs.Viewer.UI): Serves the Angular SPA from embedded resources at a configurable path (default /viewer).
SelfHost.Api— Windows rendering via GroupDocs.Viewer + System.Drawing.CommonSelfHost.Api.CrossPlatform— Linux-compatible rendering without System.DrawingCloud.Api— Delegates to GroupDocs Cloud API
SelfHost.Api and SelfHost.Api.CrossPlatform share code via SelfHost.Api.Shared (MSBuild shared project).
Api.Local.Storage | Api.Cloud.Storage | Api.AzureBlob.Storage | Api.AwsS3.Storage
Api.Local.Cache | Api.InMemory.Cache
RenderingMode.Html(default) — documents as HTML with resourcesRenderingMode.Image— documents as PNG/JPG images
- Extension methods for DI registration live in namespace
Microsoft.Extensions.DependencyInjectionandMicrosoft.AspNetCore.Builder - Options pattern via
IOptions<T>for configuration - Fluent builder for setup:
AddGroupDocsViewerUI(config => { ... }) - All packages share synchronized version numbers (currently 26.3.0), defined in
build/dependencies.props - Package versions for dependencies are centralized in
build/dependencies.props global.jsonpins SDK to 6.0.400 withrollForward: latestMajor
xUnit with Moq. Tests are in tests/GroupDocs.Viewer.UI.Api.Tests/ and cover URL building logic (ApiUrlBuilder). CI collects XPlat Code Coverage via Coverlet.