An open, education-focused viewer for the P46 papyrus that pairs IIIF manuscript images displayed in a ProjectMirador viewer with multiple published transcriptions. Built with React + TypeScript + Vite.
npm install
npm start # dev server with HMR (http://localhost:3000)
# or
npm run start:dev # dev server + TypeScript watchnpm run build– production build todist/npm test– run Vitest suitenpm run lint– prettier, eslint, stylelint checks (usenpm run lint-fixto auto-fix)
- Workspace UI shell: Workspace
- Source panels + source switcher: SourcePanel
- Mirador viewer wrapper: Mirador
- PDF viewer: PDFViewer
- Error boundary (wraps viewers): ErrorBoundary
- IIIF manifests: Chester Beatty Library and University of Michigan (URLs stored per folio in
manifests.ts). - PDFs: Peterson transcription, Kenyon plates (split at page 83), Kenyon critical text with page ranges.
- Lazy-loaded routes: Pages are code-split in
Routes.tsxfor smaller initial bundle. - Error boundaries: Viewers wrapped in
ErrorBoundaryto catch IIIF/PDF failures without crashing the app. - Source switching:
SourcePanelrenders Mirador or PDFViewer based onSourcesenum; all page mappings flow from the manifests file. - Portal-based modals: Accessibility-first modals with keyboard escape support.
- SCSS modules: Component-scoped styles with theme variables in
theme.scss.
- Component and page tests are written with Vitest + React Testing Library. See examples in Workspace and Modal.
- Run the suite with
npm test
- Pre-commit hooks: Husky + lint-staged automatically run ESLint, Prettier, and Stylelint on staged files before each commit.
- Comprehensive linting: ESLint (TypeScript, React, a11y, deprecation checks), Prettier (formatting), Stylelint (SCSS).
This project is licensed under the GNU General Public License v3.0 or later. See LICENSE.md for full terms.
Issues and PRs are welcome!
Before opening a PR, ensure npm test and npm run lint pass (pre-commit hooks will auto-fix most issues).