Slide2Doc is a Blazor Server application that compiles a DOCX document from a PPTX outline and one or more DOCX source documents. It extracts topics from slides, indexes headings from sources, matches topics to sections, and produces a compiled DOCX without writing intermediate files to disk.
/src
/Slide2Doc.Domain // Domain entities and enums
/Slide2Doc.Application // Use cases and ports
/Slide2Doc.Infrastructure// OpenXML implementations
/Slide2Doc.Web // Blazor Server UI
/tests
/Slide2Doc.Application.Tests
/Slide2Doc.Infrastructure.Tests
.github/workflows/ci.yml
- Upload: The PPTX (outline) and one or more DOCX sources are uploaded. Inputs are validated (extension, content type, size, max file count) and kept in memory.
- Extract:
OpenXmlPptxTopicExtractorreads slide titles (title placeholder fallback to first text run). - Index:
OpenXmlDocxSectionIndexerwalks DOCX body paragraphs, capturing Heading1/2/3 sections with their element ranges and source file name. - Match:
TopicMatchernormalizes text and performs exact/contains matching to pair topics with document sections. - Compose:
OpenXmlDocxComposerbuilds a new DOCX, adds each topic as Heading1, and copies matched section content (paragraphs/tables). Content stays in streams—no disk writes. - Download: The composed DOCX is streamed to the browser via a Blazor page and JavaScript download helper.
- Install .NET 8 SDK.
- Restore and build:
dotnet restore Slide2Doc.sln dotnet build Slide2Doc.sln
- Run the Blazor Server app:
dotnet run --project src/Slide2Doc.Web/Slide2Doc.Web.csproj
- Open
https://localhost:5001(or shown URL). Navigate through Upload → Mapping → Generate.
Run unit and integration tests:
dotnet test Slide2Doc.slnGitHub Actions workflow (.github/workflows/ci.yml) restores, builds, and tests the solution.
- Domain: Topic, DocumentSection, TopicMatch, CompileOptions plus enums for heading and match status.
- Application: Interfaces for PPTX extraction, DOCX indexing, matching, composing, and a
CompileDocumentServiceorchestrating prepare/compose steps. - Infrastructure: OpenXML-based implementations for PPTX topic extraction, DOCX heading indexing, and DOCX composing (paragraph/table level only).
- Web: Blazor Server UI with in-memory state per session, FluentValidation for uploads, logging, and centralized error messaging.
- Images and advanced styling are not copied into the output (paragraphs and tables only).
- Fuzzy matching beyond exact/contains is not implemented in the MVP.
- Table of contents rendering is a placeholder.
- Upload size limits are enforced but can be tuned in
UploadRequestValidator.
- Preserve styles and media during composition.
- Add fuzzy matching and manual drag/drop mapping UX.
- Persist sessions or allow download of mapping configuration.
- Add timeout/streaming safeguards for very large files.