How willsephton/masters-dissertation-prototype works
The product is a web prototype for exploring PDF and PowerPoint documents in traditional and structured views. Its main workflow converts presentations for PDF viewing, extracts document structure and images, adds OCR and GPT-4o descriptions and summaries, then presents generated JSON alongside the original document with navigation and page synchronization. The README describes these capabilities; the graph uses the sampled server, pipeline, parser, and viewer sources, so some frontend wiring and generated-output details remain uncertain.
Main entry points: pipeline_recursive.py Document pipeline · enhancedviewer.js Structured viewer · gpt4o_functions.py AI descriptions · filelist.js PDF selection
Components 18
Web experience
- PDF selection
public/scripts/filelist.js - File selection handler
public/scripts/fileListHandler.js - Traditional viewer
public/scripts/pdfviewer.js - Structured viewer
public/scripts/enhancedviewer.js
Server orchestration
- Express server
app.mjs - PPTX conversion
public/scripts/convertPptxToPdf.js - Pipeline launcher
public/scripts/mlPipeline.js
Document extraction
- Document pipeline
public/scripts/python-pipeline-scripts/pipeline_recursive.py - PDF parser
public/scripts/python-pipeline-scripts/pdf_parser.py - PowerPoint parser
public/scripts/python-pipeline-scripts/pptx_parser.py - EasyOCR
AI enrichment
- AI descriptions
public/scripts/python-pipeline-scripts/gpt4o_functions.py - Generated JSON and images
- Summary index
public/scripts/python-pipeline-scripts/gpt4o_functions.py
Other components
- Document reader
- OpenAI GPT-4o
- PDF and PPTX files
public/docs - Converted PDFs
public/pptx-pdfs
Connections 28
- Document reader → PDF selection: selects documents
- PDF selection → Express server: requests PDF list
- Express server → PDF selection: returns PDF list
- PDF selection → Traditional viewer: loads PDF
- PDF selection → Structured viewer: loads JSON view
- Document reader → File selection handler: selects file
- File selection handler → Traditional viewer: loads PDF
- File selection handler → Structured viewer: loads JSON view
- Document reader → Structured viewer: navigates pages
- Structured viewer → Traditional viewer: syncs page
- Express server → PPTX conversion: calls conversion
- PPTX conversion → PDF and PPTX files: reads presentations
- PPTX conversion → Converted PDFs: writes PDFs
- Express server → Pipeline launcher: starts pipeline
- Pipeline launcher → Document pipeline: spawns script
- Document pipeline → PDF and PPTX files: reads documents
- Document pipeline → PDF parser: parses PDFs
- Document pipeline → PowerPoint parser: parses presentations
- PDF parser → EasyOCR: recognizes image text
- PowerPoint parser → EasyOCR: recognizes image text
- Document pipeline → AI descriptions: adds descriptions
- AI descriptions → OpenAI GPT-4o: requests descriptions
- AI descriptions → OpenAI GPT-4o: requests summaries
- Document pipeline → Generated JSON and images: writes extracted data
- AI descriptions → Generated JSON and images: reads document JSON
- AI descriptions → Summary index: writes summaries
- Structured viewer → Generated JSON and images: fetches JSON and images
- Structured viewer → Summary index: fetches summaries