Thank you for your interest in contributing to FryPDF!
- .NET 10 SDK (or later)
- IDE: JetBrains Rider, Visual Studio Code (with C# Dev Kit), or Visual Studio 2026
src/PdfEditorApp.Core/: Pure headless core engine (PDF deconstruction, layout analysis, data models, microkernel plugin context).src/PdfEditorApp/: Main Avalonia desktop application (Material Design 3 Expressive UI, dynamic registries, modular bundles).tests/PdfEditorApp.Tests/: Unit and integration tests (xUnit + Skia verification).docs/: Technical manuals and architecture specifications.packaging/: Platform-specific installers (macOS .app/.dmg, Windows Inno Setup & MSIX).
dotnet builddotnet testdotnet run --project src/PdfEditorApp/PdfEditorApp.csproj- Use C# 13+ / .NET 10 features (nullable reference types, pattern matching, file-scoped namespaces).
- Follow MVVM design patterns with
CommunityToolkit.Mvvmsource generators ([ObservableProperty],[RelayCommand]). - Ensure no warnings or build errors are introduced (
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>). - Add comprehensive unit tests in
tests/PdfEditorApp.Tests/for all new features, tools, and converters.
- Never write monolithic
switch-caseladders, god view models, or hardcoded UI instantiations. - Implement new capabilities (tools, canvas elements, ribbon actions, sidebars, inspector sections, workspace pages, AI providers, and converters) as modular plugins (
IFryPluginorToolPluginBase) mounted into anIFryPluginBundle. - Register components through the 12 dynamic capability registries (
IPdfToolRegistry,IRibbonRegistry,ISidebarRegistry,IInspectorRegistry, etc.). - Track all side effects via
ctx.RegisterEffectto guarantee leak-free reversible unmounting. - For complete specifications, see Plugin-Based Architecture Manual and the step-by-step External Plugin Development Guide.
-
Zero UI Thread Blocking: PDF parsing, Skia rasterization, QuestPDF export, OCR, and AI inference must run asynchronously on background threads via
Task.Run. Never call.Resultor.Wait()on the UI thread. -
Instant Navigation & View Caching: In navigation controllers, cache contributed dynamic views (
_dynamicViewCachepattern) to ensure 0ms instantaneous page transitions. -
Virtualization Only: Always use
ItemsRepeaterorVirtualizingStackPanelwithScrollUnit="Pixel"for variable-length collections (thumbnails, tool cards, audit logs, data rows). - Smooth Continuous Inputs: Multiplicatively clamp pinch-to-zoom math, debounce search query text changes (150–250ms), and throttle slider repaints during drag.
-
Memory & LOH Hygiene: Never allocate byte arrays
$\ge 85\text{ KB}$ in loops. Immediately dispose unmanaged Skia graphics objects (SKBitmap,SKImage,SKSurface). UseWeakReferenceMessengerto prevent retain cycles.
- All UI elements must strictly adhere to Google Material Design 3 Expressive guidelines.
- Use centralized shape tokens (
M3ShapeCornerFullfor pills/buttons/search,M3ShapeCornerExtraLargefor dialogs,M3ShapeCornerLargefor cards/inputs). - Never hardcode hex colors; reference dynamic M3 theme brushes (
M3PrimaryBrush,M3SurfaceBrush, etc.). - See Material Design 3 Expressive Guidelines.
- Never commit credentials, API keys, passwords, or Personally Identifiable Information (PII) — including real government IDs, personal names, phone numbers, or addresses. Always use synthetic dummy data.
When adding support for new PDF document types (invoices, ID cards, tax forms, multi-column articles, complex scripts):
- Review the detailed architecture and continuous improvement guide: PDF Deconstruction & Editing Guide.
- Run the visual side-by-side verification test (
GenerateVisualComparison_SideBySide_SavesArtifacts) to compare ground-truth PDF rendering vs deconstructed canvas elements. - Validate that all 770+ unit tests pass without regressions (
dotnet test).
When releasing a new version of FryPDF or the FryPdf.PluginSdk NuGet package:
- Always follow the exact step-by-step checklist documented in Versioning & Release Guide.
- CRITICAL: Never bump
AssemblyVersioninPdfEditorApp.Core.csprojunless introducing an intentional, breaking plugin contract ABI change. - Verify tests with
dotnet test -c releaseand CLI version output withdotnet run --project src/PdfEditorApp -- --version. - Tag releases as
vMAJOR.MINOR.PATCHand push to trigger automated CI/CD builds for Windows and macOS.