TexLeaf

A modern, web-based LaTeX editor with real-time preview

        $ cd backend && go run .
Server running at http://localhost:8080

# Open browser
$ open http://localhost:8080
→ Create project → Write LaTeX → See PDF
      

Quick Start

  • Run
  • Docker
  • Build
            $ cd backend
$ go run .
            $ docker-compose up -d
# Open http://localhost:8080
            $ cd backend
$ go build -o texleaf .
          

Monaco Editor

Full-featured code editor with syntax highlighting, auto-completion, and LaTeX-specific suggestions.

Real-time Preview

Live PDF compilation with zoom controls. Compile in draft or normal mode.

SQLite Storage

All project data in a single database file. Easy backup and deployment.

File Management

Create, rename, and delete files. Multi-tab editing for working on multiple files.

Search & Replace

Find and replace text using the editor's built-in search functionality.

Clean Interface

Minimal, distraction-free interface. Sidebar always visible, no unnecessary toggles.

Create a .env file to customize port and data directory

Deployment Guide

Configuration

Environment Variables

  • TEXLEAF_PORT — Server port (default: 8080)
  • TEXLEAF_DATA_DIR — Data directory (default: data)

API Endpoints

  • GET /api/projects — List all projects
  • POST /api/projects — Create project
  • GET /api/projects/{id}/files — List files
  • POST /api/projects/{id}/compile — Compile LaTeX
  • GET /api/projects/{id}/output.pdf — Get PDF