How razercode-dev/docucount works
DocuCount is a browser-based PDF/DOCX analyzer. The user selects or drops a document; the app validates it, extracts text and page information, computes text statistics, and presents the results. The main logic is concentrated in one JavaScript file, so several domain responsibilities share that path. The README documents the major capabilities; the sampled source confirms portions of upload handling, analysis, and extraction, but omitted sections limit certainty about some wiring.
Main entry points: script.js Upload handling · index.html Analyzer interface
Components 12
User interface
- Analyzer interface
index.html - Analysis results
index.html
Document processing
- Upload handling
js/script.js - File validation
js/script.js - PDF extraction
js/script.js - DOCX extraction
js/script.js - PDF.js
- Mammoth.js
- JSZip
Text analysis
- Text statistics
js/script.js - Page counting
js/script.js
Other components
- Document user
Connections 12
- Document user → Analyzer interface: opens and submits
README.md - Analyzer interface → Upload handling: provides controls
README.md - Upload handling → File validation: checks file
js/script.js - File validation → PDF extraction: dispatches PDF
js/script.js - File validation → DOCX extraction: dispatches DOCX
js/script.js - PDF extraction → PDF.js: extracts text
js/script.js - DOCX extraction → Mammoth.js: extracts text
js/script.js - DOCX extraction → JSZip: reads page breaks
js/script.js - Upload handling → Text statistics: analyzes extracted text
js/script.js - Upload handling → Page counting: sets page count
js/script.js - Text statistics → Analysis results: updates counts
js/script.js - Page counting → Analysis results: updates pages
js/script.js