A local-first real-time LaTeX collaboration platform with offline editing capabilities. Built with React, TypeScript, and Yjs for collaborative document editing.
TeXlyre enables multi-user editing with live cursors and selections visible across all connected clients. The platform uses Yjs CRDTs for conflict-free synchronization, ensuring that changes from multiple users are automatically merged without conflicts. Communication happens through WebRTC peer-to-peer connections, providing low-latency collaboration without requiring a central server. An integrated chat system allows collaborators to communicate directly within the editing environment.
TeXlyre provides comment and chat features as well for real-time exchanges, reviews, and discussions among collaborators
The platform integrates SwiftLaTeX WASM engines to provide in-browser LaTeX compilation without server dependencies. Currently supports pdfTeX and XeTeX engines for comprehensive document processing. Live compilation provides immediate feedback with syntax highlighting and error detection, while the integrated PDF viewer offers zoom, navigation, and side-by-side editing capabilities.
TeXlyre prioritizes data ownership and offline capability. All documents are stored locally using IndexedDB, enabling full offline editing with automatic synchronization when connectivity returns. The File System Access API provides direct folder synchronization for external backup solutions, while project export and import features ensure complete data portability across devices and installations.
The platform includes a comprehensive file explorer supporting drag-and-drop operations for various file types including LaTeX sources, images, and data files. Document linking creates connections between collaborative documents and static files, enabling seamless editing workflows. FilePizza integration provides secure peer-to-peer file sharing between collaborators, allowing large file transfers without intermediary servers.
Installation requires Node.js 18+ and a modern browser with File System Access API support:
git clone https://github.com/TeXlyre/texlyre.git
cd texlyre
npm install
npm run dev
Navigate to http://localhost:5173
to access the application. Create a new project to begin editing, or open an existing project by sharing its URL with collaborators. The URL format http://localhost:5173/#yjs:abc123def456
enables instant collaboration access.
Moreover, you can start your project from a template and share the link with your collaborators.
TeXlyre's architecture emphasizes local-first principles while enabling real-time collaboration. The React frontend communicates with Yjs documents stored in IndexedDB, providing offline-first functionality. WebRTC establishes direct peer connections for real-time synchronization, while SwiftLaTeX WASM engines handle LaTeX compilation entirely in the browser.
The plugin system allows extensibility through custom viewers, renderers, and backup providers. Core plugins handle PDF rendering, LaTeX log visualization, and file system backup operations. Theme plugins provide customizable layouts and visual styles.
The File System Access API enables direct synchronization with local folders, supporting cross-device workflows through cloud storage providers like Dropbox or Google Drive. Users can connect TeXlyre projects to existing file system structures, maintaining compatibility with traditional LaTeX workflows.
FilePizza integration facilitates secure file sharing between collaborators over WebRTC. Large files, images, and other non-collaborative text files can be transferred directly between browsers, maintaining privacy and reducing dependency on external services. This protocol, although completely independent of the Yjs WebRTC connection, we stilluse Yjs to manage file metadata and synchronization state, ensuring that all collaborators have access to the latest versions of shared files. Yjs facilities facilitates real-time collaboration (e.g., live updates to file lists, shared metadata, cursor tracking, real-time document editing) while FilePizza handles the file transfer of non-collaborative files.
npm install # Install npm packages
npm run dev # Development server with hot reload
npm run dev:https # Development HTTPS server with hot reload
npm run build # Production build optimization
npm run preview # Local preview of production build
npm run lint # ESLint code quality checks
The plugin architecture supports custom functionality through typed interfaces:
interface ViewerPlugin extends Plugin {
type: 'viewer';
canHandle: (fileType: string, mimeType?: string) => boolean;
renderViewer: React.ComponentType<ViewerProps>;
}
Plugins can extend TeXlyre with custom file viewers, LaTeX log processors, backup providers, and theme variations. The plugin registry automatically discovers and loads compatible plugins during application initialization.
Once a plugin is developed, it can be registered in the plugins.config.ts
by simply adding its path (excluding the '/extras' prefix). All plugins must be placed in the 'extras' directory to be recognized by the system.
TeXlyre requires modern browser features for optimal functionality. Chrome and Edge provide full feature support including File System Access API and WebRTC. Firefox supports core collaboration features but has limited file system integration. Safari offers partial compatibility with reduced file system access capabilities. The File System API was not thoroughly tested with the mobile device browsers, therefore, use the file system backup feature on TeXlyre with caution.
WebRTC support is essential for real-time collaboration, while the File System Access API enables advanced backup and synchronization features in supported browsers.
TeXlyre is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This means:
- ✅ You can use, modify, and distribute this software
- ✅ You can run it for any purpose, including commercial use
- ⚖️ If you distribute modified versions, you must also distribute the source code
- ⚖️ If you run a modified version as a network service, you must provide source code to users
See LICENSE for the complete license text.
TeXlyre is licensed under AGPL-3.0 due to our dependency on SwiftLaTeX's AGPL-licensed LaTeX engine (WASM) for in-browser LaTeX compilation.
TeXlyre is privacy-focused by design:
- Local-first: All your data stays in your browser
- Direct connections: Peer-to-peer collaboration without server intermediaries
- No tracking: No analytics, cookies, or data collection
When you collaborate, IP addresses are temporarily processed through signaling servers to establish direct connections. No project content is transmitted through our servers.
The optional GitHub integration only activates when you explicitly enable it and provide your own GitHub token.
TeXlyre uses open source signaling servers for WebRTC connections:
- Y-WebRTC Signaling: Based on y-webrtc
- PeerJS Signaling: Based on PeerJS Server
- TeX Live Download Server: Based on SwiftLaTeX Texlive On-Demand Server
- FilePizza Server: Based on FilePizza which relies on PeerJS (built-in TURN servers are not deployed on TeXlyre servers)
All servers are hosted locally an made publicly available with Cloudflare Tunnel
You can run your own signaling servers by following the setup instructions in our infrastructure repository.
TeXlyre builds upon several key technologies: SwiftLaTeX provides WASM-based LaTeX compilation, Yjs enables conflict-free collaborative editing, CodeMirror powers the advanced text editing interface, and FilePizza facilitates secure peer-to-peer file transfers.
Development of TeXlyre was assisted by Anthropic Claude for code generation, debugging, and architectural guidance.
Ready to start collaborating? Get started with TeXlyre or contribute to the project.