Skip to content

Multi-Format Export (PDF, DOCX, PPTX, CSV, JSON) #40

@mathaix

Description

@mathaix

User Story

As a manager
I want to export synthesis reports and data in multiple formats
So that I can share findings with stakeholders in their preferred format

Acceptance Criteria

Export Formats

PDF Export

  • Professional formatting with cover page
  • Table of contents with links
  • Embedded charts and visualizations
  • Proper page breaks and headers/footers
  • Hyperlinked evidence citations
  • Library: ReportLab or WeasyPrint

DOCX Export

  • Microsoft Word compatible
  • Editable sections for manager customization
  • Embedded images and charts
  • Proper heading styles
  • Comment annotations for evidence
  • Library: python-docx

PPTX Export

  • PowerPoint presentation
  • Executive summary slide deck
  • Key findings as bullet slides
  • Visualizations as image slides
  • Speaker notes with evidence details
  • Library: python-pptx

CSV Export

  • Entity lists as tabular data
  • One CSV per entity type
  • Includes all attributes + confidence + source
  • Relationship export as edge list
  • Library: pandas

JSON Export

  • Complete structured data export
  • Includes: entities, relationships, evidence, insights
  • API-consumable format
  • JSON schema provided

Export Options

  • Select which sections to include
  • Select entity types to include
  • Confidence threshold filter
  • Include/exclude evidence details
  • Include/exclude full transcripts

Export UI

  • "Export" button from synthesis results page
  • Format selection dropdown
  • Options panel for customization
  • Progress indicator during generation
  • Download link when complete
  • Email option for large files

Export Templates

  • Templates defined in blueprint ReportTemplate
  • Manager can customize template per export
  • Organization-level templates
  • Preview before final export

Performance

  • PDF generation < 30 seconds for 100-page report
  • DOCX generation < 20 seconds
  • PPTX generation < 15 seconds
  • CSV/JSON generation < 5 seconds
  • Background job for large exports

Storage

  • Exports saved to S3 with expiry (30 days)
  • Download history visible in project
  • Regenerate previous export option

Technical Notes

class ExportService:
    async def export_synthesis(
        self,
        synthesis_id: str,
        format: ExportFormat,
        options: ExportOptions
    ) -> ExportResult:
        # Generate export based on format
        # Store in S3
        # Return download URL
        
# Export formats
class ExportFormat(str, Enum):
    PDF = "pdf"
    DOCX = "docx"
    PPTX = "pptx"
    CSV = "csv"
    JSON = "json"

Consider using background tasks (Celery, Dramatiq) for large exports.

Definition of Done

  • All 5 export formats working
  • Template customization working
  • Export options functional
  • Performance requirements met
  • S3 storage working
  • Code reviewed and merged

Requirement ID

RS-07


🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions