A reusable React component for displaying and enriching TEI (Text Encoding Initiative) XML documents.
Prerequisites: Node.js 18+ and pnpm
# Install dependencies
make install
# Start the demo application
make devVisit http://localhost:3000/ to see the viewer in action.
- TEI Document Rendering: Display TEI XML documents with semantic structure
- Term Enrichment: Support for Unitex, Multicat, NB, and TEEFT enrichments
- Interactive Navigation: Table of contents, footnotes, and bibliographic references
- Customizable: Built with Material-UI for easy theming
- Internationalization: English and French language support
- Responsive: Works on desktop and mobile devices
This monorepo contains three packages:
@istex/react-tei: Core React component library (reusable in your projects)@istex/viewer-demo: Demo application showcasing the viewer@istex/e2e: End-to-end test suite with Playwright
pnpm add @istex/react-teiimport { Viewer } from '@istex/react-tei/Viewer';
function App() {
return (
<Viewer
teiDocument={teiXmlString}
enrichments={[unitexEnrichment, multicatEnrichment]}
/>
);
}See Viewer Architecture for detailed API documentation.
Unit tests:
make test # Headless mode
make test-watch # Watch mode (headless)
make test-browser # Interactive browser modeEnd-to-end tests:
make e2e # Production build
make e2e-ui # Development mode with hot reloadmake install # Install all dependencies
make dev # Start demo app (port 3000)
make build # Build all packages
make lint # Run Biome linter
make format # Format code with Biome
make typecheck # Type check with TypeScript- Testing Guide - Running and writing tests
- Repository Architecture - Monorepo structure and tools
- Viewer Architecture - Component API and internals
- Demo Architecture - Demo application structure
- Term Enrichment - How term enrichment works
This project uses:
- pnpm workspaces for monorepo management
- Turbo for build orchestration
- Biome for linting and formatting
- TypeScript for type safety
- Vitest for unit testing
- Playwright for E2E testing
This project is licensed under the CeCILL License - see the licence.md file for details.