projects

TexLeaf

2026 · live · github

A web-based LaTeX editor with project management, real-time editing, and live PDF compilation. Built around a Go backend and a browser-based Monaco editor, it provides a full LaTeX workflow without local tooling.

It is designed to be self-hostable and lightweight, packaged as a Docker environment (~509MB image) that runs the full editor, compiler pipeline, and storage layer in a single deployable unit.

The Problem

After several years of using Overleaf, my LaTeX projects grew in size and complexity. This eventually led to frequent hits on free-tier compilation limits, which disrupted workflow and made iterative writing slower than necessary.

The requirement became clear: a web-based LaTeX editor that could be fully self-hosted, predictable, and not constrained by external quotas.

I attempted to use the Overleaf Community Edition (https://github.com/overleaf/toolkit/), but the setup process was overly complex for my needs. After spending more than two days on configuration and troubleshooting, it became clear that it was not aligned with the simplicity I wanted.

The Solution

TexLeaf was built as a lightweight alternative focused on deployability and workflow integration.

Key design decisions:

  • Fully self-hostable via Docker
  • Minimal setup overhead (single service deployment)
  • Local-first architecture with no external dependencies
  • Lightweight runtime (~509MB Docker image including TeX tooling)

Instead of replicating the full Overleaf ecosystem, TexLeaf focuses on core writing and compilation workflows with predictable performance and simple deployment.

Technical Details

  • Go backend (standard library HTTP server)
  • SQLite database (single-file persistence with WAL mode)
  • Monaco Editor for LaTeX editing with syntax support
  • PDF.js for in-browser PDF rendering
  • LaTeX compilation via pdftex in isolated temp directories
  • Full project abstraction stored in SQLite (no filesystem dependency)
  • Draft and full compilation modes for fast iteration vs final output
  • Vanilla JavaScript frontend (no framework overhead)
  • Docker-based deployment with bundled TeX environment (~509MB image)
  • Auto-save with debounced API synchronization