How uurtech/jdf works
JDF is a JSON document format with three product surfaces: a desktop reader/editor, an embeddable JavaScript viewer, and a CLI supporting conversion, validation, and retrieval-oriented processing. The main user workflow is opening or converting a document, rendering and editing its structure, then saving it; the CLI adds PDF/Markdown/JSON import and chunking, embedding, transcription, and description workflows. Edges are limited to README statements and relationships visible in the supplied excerpts or SOURCE INDEX; unsampled implementation details are not asserted.
Main entry points: App.tsx Reader application · index.ts CLI command dispatcher · rag.ts RAG workflow · transcribe.ts Media transcription
Components 34
Document format
- JDF types and defaults
packages/jdf-core/src/types.ts - JDFX manifest
packages/jdf-core/src/manifest.ts
Desktop reader
- Reader application
apps/reader/src/App.tsx - File access
apps/reader/src/lib/fs.ts - Document normalization
apps/reader/src/lib/docGuard.ts - Edit mutations
apps/reader/src/edit/mutations.ts - Undo and redo
apps/reader/src/edit/history.ts - Document rendering
apps/reader/src/components/viewer/DocumentViewer.tsx - Editing toolbar
apps/reader/src/components/shared/Toolbar.tsx - Document search
apps/reader/src/components/shared/SearchPanel.tsx - JSON editor
apps/reader/src/components/json/JsonViewer.tsx - Markdown editing and preview
apps/reader/src/components/markdown/MarkdownViewer.tsx
Web viewer
- Web embed entry
jdfjs/src/auto-init.ts - Web document viewer
jdfjs/src/viewer.ts - Element renderer
jdfjs/src/renderers/element.ts - Style resolution
jdfjs/src/utils/style.ts
Document import
- PDF conversion
packages/jdf-pdf-import/src/core.ts - Paragraph folding
packages/jdf-pdf-import/src/paragraphs.ts - PDF table extraction
packages/jdf-pdf-import/src/tables.ts - Markdown image preprocessing
apps/reader/src/import/markdownImages.ts
CLI and retrieval
- CLI command dispatcher
tools/jdf-cli/src/index.ts - Document validation
tools/jdf-cli/src/commands/validate.ts - Markdown conversion
tools/jdf-cli/src/commands/import-md.ts - PDF conversion command
tools/jdf-cli/src/commands/import-pdf.ts - JSON conversion
tools/jdf-cli/src/commands/import-json.ts - Retrieval chunking
tools/jdf-cli/src/commands/chunk.ts - Vector embedding
tools/jdf-cli/src/commands/embed.ts - Media transcription
tools/jdf-cli/src/commands/transcribe.ts - Media description
tools/jdf-cli/src/commands/describe.ts - RAG workflow
tools/jdf-cli/src/commands/rag.ts - JDFX bundle handling
tools/jdf-cli/src/jdfx.ts
Other components
- Document user
- Embedding provider
- OCR and caption providers
Connections 39
- Document user → Reader application: opens and edits
- Reader application → File access: reads and saves
apps/reader/src/App.tsx - Reader application → Document normalization: normalizes
apps/reader/src/App.tsx - Reader application → Edit mutations: applies changes
apps/reader/src/App.tsx - Reader application → Undo and redo: tracks edits
apps/reader/src/App.tsx - Reader application → Document rendering: renders documents
apps/reader/src/App.tsx - Reader application → Editing toolbar: shows controls
apps/reader/src/App.tsx - Reader application → Document search: provides search
apps/reader/src/App.tsx - Reader application → JSON editor: shows JSON
apps/reader/src/App.tsx - Reader application → Markdown editing and preview: opens Markdown
apps/reader/src/App.tsx - Reader application → PDF conversion: imports PDF
- Reader application → Markdown image preprocessing: preprocesses images
apps/reader/src/App.tsx - Reader application → JDF types and defaults: uses document model
- PDF conversion → PDF table extraction: extracts tables
packages/jdf-pdf-import/src/core.ts - PDF conversion → Paragraph folding: folds paragraphs
packages/jdf-pdf-import/src/core.ts - Document user → Web embed entry: embeds viewer
- Web embed entry → Web document viewer: initializes
jdfjs/src/auto-init.ts - Web document viewer → Element renderer: renders elements
jdfjs/src/viewer.ts - Web document viewer → Style resolution: resolves styles
jdfjs/src/viewer.ts - Document user → CLI command dispatcher: runs commands
- CLI command dispatcher → Document validation: dispatches validation
tools/jdf-cli/src/index.ts - CLI command dispatcher → Markdown conversion: dispatches conversion
tools/jdf-cli/src/index.ts - CLI command dispatcher → PDF conversion command: dispatches conversion
tools/jdf-cli/src/index.ts - CLI command dispatcher → JSON conversion: dispatches conversion
tools/jdf-cli/src/index.ts - CLI command dispatcher → Retrieval chunking: dispatches chunking
tools/jdf-cli/src/index.ts - CLI command dispatcher → Vector embedding: dispatches embedding
tools/jdf-cli/src/index.ts - CLI command dispatcher → Media transcription: dispatches transcription
tools/jdf-cli/src/index.ts - CLI command dispatcher → Media description: dispatches description
tools/jdf-cli/src/index.ts - CLI command dispatcher → RAG workflow: dispatches RAG
tools/jdf-cli/src/index.ts - RAG workflow → Media transcription: transcribes media
tools/jdf-cli/src/commands/rag.ts - RAG workflow → Media description: describes media
tools/jdf-cli/src/commands/rag.ts - RAG workflow → Vector embedding: creates vectors
tools/jdf-cli/src/commands/rag.ts - RAG workflow → Retrieval chunking: creates chunks
tools/jdf-cli/src/commands/rag.ts - Vector embedding → Embedding provider: requests vectors
- Media description → OCR and caption providers: uses providers
- Media transcription → OCR and caption providers: uses provider
- Markdown conversion → JDFX bundle handling: packages assets
tools/jdf-cli/src/commands/import-md.ts - Media description → JDFX bundle handling: handles bundles
tools/jdf-cli/src/commands/describe.ts - Media transcription → JDFX bundle handling: handles bundles
tools/jdf-cli/src/commands/transcribe.ts