Backend (C#)
The UpDoc server-side code handles PDF/Markdown extraction, workflow configuration, and the Management API endpoints.
All source files are in src/UpDoc/.
| File | Description |
|---|---|
| PdfExtractionService.cs | Orchestrates PDF extraction — loads media, delegates to page properties service |
| PdfPagePropertiesService.cs | Strategy-driven section extraction from PDF pages using PdfPig |
| MarkdownExtractionService.cs | Extracts sections from Markdown files using heading-based splitting |
| PdfExtractionController.cs | Management API controller — endpoints for extraction, config, and workflow management |
| UpDocComposer.cs | Umbraco composer that registers all UpDoc services with dependency injection |
| WorkflowModels.cs | C# models for workflow JSON files (source, destination, map configs) |
| WorkflowService.cs | Reads and manages workflow folders — scans updoc/workflows/, loads configs, lists active workflows |
Creating documents from a source
Section titled “Creating documents from a source”Until these existed, creating a document from a source was browser TypeScript only, so a browser was the only way to run an import. Together they are what the API and the MCP server call.
| File | Description |
|---|---|
| CreateFromSourceController.cs | The create-from-source endpoint |
| DocumentCreationService.cs | Resolve workflow, extract, scaffold, map, create — the whole import |
| MappingApplicationService.cs | Applies map.json to a document’s property values |
| SectionLookupBuilder.cs | Flattens transform sections into the sectionId.part keys mappings address |
| ValueCoercion.cs | Turns captured text into numbers and dates, refusing ambiguous input |
| MarkdownStripper.cs | Strips markdown for plain-text destinations |
| MarkdownConversionService.cs | Markdown to HTML for rich text destinations |
| MediaFilePathResolver.cs | Turns a media key into a file on disk |
| UpDocControllerBase.cs | Shared ProblemDetails error responses |