How caiorafael/unitex-poc works
UniTeX is a browser-based LaTeX project editor: users create or open a project, edit and organize its files, then receive a compiled PDF preview or an error log. Project metadata and file contents are stored locally in IndexedDB; compilation runs through BusyTeX/WASM, with TeX Live packages optionally fetched remotely. The graph includes the documented project, file-import, editor, and preview capabilities. Relationships for unsampled implementation details are omitted; edges reflect shown calls or README statements.
Main entry points: Editor.tsx Project editor · Workspace.tsx Project workspace · files.ts File operations · App.tsx App router
Components 20
Project lifecycle
- App router
src/App.tsx - Project workspace
src/components/Workspace.tsx - Project library
src/project/library.ts - Hash navigation
src/workspace/navigation.ts
Editing workspace
- Project editor
src/components/Editor.tsx - File tree
src/components/FileTree.tsx - File pane
src/components/FilePane.tsx - LaTeX editor
src/components/LatexEditor.tsx - Compile log
src/components/CompileLog.tsx - Compile overlay
src/components/CompileOverlay.tsx
Compile and preview
- LaTeX compiler
src/latex/compiler.ts - BusyTeX WASM
- TeX Live endpoint
- PDF preview
src/components/PdfPreview.tsx
Project and language services
- File operations
src/project/files.ts - File import
src/project/upload.ts - Default project
src/project/defaultProject.ts - Project types
src/project/types.ts - LaTeX highlighting
src/latex/monacoLatex.ts
Other components
- User
Connections 24
- User → Project workspace: creates or opens
README.md - Project workspace → Project library: manages projects
src/components/Workspace.tsx - Project workspace → Default project: seeds project
src/components/Workspace.tsx - Project workspace → File operations: infers main file
src/components/Workspace.tsx - Project workspace → Hash navigation: opens project
src/components/Workspace.tsx - Hash navigation → App router: updates hash
src/App.tsx - App router → Project editor: routes project
src/App.tsx - App router → Project workspace: shows workspace
src/App.tsx - Project editor → Project library: loads and saves
src/components/Editor.tsx - Project editor → LaTeX compiler: compiles project
src/components/Editor.tsx - Project editor → File operations: updates files
src/components/Editor.tsx - Project editor → File tree: renders
src/components/Editor.tsx - Project editor → File pane: renders
src/components/Editor.tsx - Project editor → PDF preview: renders result
src/components/Editor.tsx - Project editor → Compile log: shows errors
src/components/Editor.tsx - Project editor → Compile overlay: shows compiling
src/components/Editor.tsx - File tree → File import: imports files
src/components/FileTree.tsx - File tree → File operations: builds tree
src/components/FileTree.tsx - File pane → LaTeX editor: renders editor
src/components/FilePane.tsx - LaTeX editor → LaTeX highlighting: registers language
src/components/LatexEditor.tsx - LaTeX compiler → File operations: prepares inputs
src/latex/compiler.ts - LaTeX compiler → BusyTeX WASM: runs XeLaTeX
README.md - BusyTeX WASM → TeX Live endpoint: fetches packages
README.md - PDF preview → BusyTeX WASM: receives PDF URL