How ksakay2010/readlyt works
This is a browser-based, local-only document viewer. The main workflow is to choose or reopen a file, validate its type and size, read it in the browser, render it read-only, then record it in local recents; cached files can be reopened without reselecting. The viewer covers PDF, Word, spreadsheets/CSV, and text, with format-specific controls. The graph follows calls visible in the excerpts; index.html and its script wiring were not sampled, so initial page wiring is not represented.
Main entry points: app.js App routing and workflow · viewers.js Viewer dispatch and shell · cache.js Recents and cache management · util.js DOM helpers and file reading
Components 14
App workflow
- App routing and workflow
js/app.js - DOM helpers and file reading
js/util.js
File viewing
- Viewer dispatch and shell
js/viewers.js - PDF rendering
js/viewers.js - Word rendering
js/viewers.js - Spreadsheet and CSV rendering
js/viewers.js - Text rendering and preferences
js/viewers.js
Local persistence
- Recents and cache management
js/cache.js
Other components
- User
- PDF.js library
- Mammoth library
- XLSX library
- Browser IndexedDB
- Browser local storage
Connections 15
- User → App routing and workflow: selects files
- App routing and workflow → DOM helpers and file reading: reads file
js/app.js - App routing and workflow → Viewer dispatch and shell: renders file
js/app.js - App routing and workflow → Recents and cache management: loads recents
js/app.js - App routing and workflow → Recents and cache management: opens cached file
js/app.js - App routing and workflow → Recents and cache management: saves opened file
js/app.js - Viewer dispatch and shell → PDF rendering: dispatches PDF
js/viewers.js - Viewer dispatch and shell → Word rendering: dispatches Word
js/viewers.js - Viewer dispatch and shell → Spreadsheet and CSV rendering: dispatches sheets
js/viewers.js - Viewer dispatch and shell → Text rendering and preferences: dispatches text
js/viewers.js - PDF rendering → PDF.js library: uses
js/viewers.js - Word rendering → Mammoth library: converts document
js/viewers.js - Spreadsheet and CSV rendering → XLSX library: parses workbook
js/viewers.js - Text rendering and preferences → Browser local storage: stores preferences
js/viewers.js - Recents and cache management → Browser IndexedDB: reads and writes
js/cache.js