Skip to content

JacobWPeterson/p46

Repository files navigation

P46 Papyrus Transcription Viewer

License: GPL v3 Node CI React Vite TypeScript

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.

Features

Quick start

npm install
npm start           # dev server with HMR (http://localhost:3000)
# or
npm run start:dev   # dev server + TypeScript watch

Useful scripts

  • npm run build – production build to dist/
  • npm test – run Vitest suite
  • npm run lint – prettier, eslint, stylelint checks (use npm run lint-fix to auto-fix)

Key files

Data sources

  • 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.

Architecture notes

  • Lazy-loaded routes: Pages are code-split in Routes.tsx for smaller initial bundle.
  • Error boundaries: Viewers wrapped in ErrorBoundary to catch IIIF/PDF failures without crashing the app.
  • Source switching: SourcePanel renders Mirador or PDFViewer based on Sources enum; 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.

Testing

  • Component and page tests are written with Vitest + React Testing Library. See examples in Workspace and Modal.
  • Run the suite with npm test

Code quality

  • 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).

License

This project is licensed under the GNU General Public License v3.0 or later. See LICENSE.md for full terms.

Contributing

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).

About

An open, research-focused tool for the analysis of Papyrus 46

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •