MCPSERV.CLUB
Overleaf

Overleaf

Self-Hosted

Collaborative real‑time LaTeX editing for researchers

Active(100)
16.7kstars
0views
Updated 4 days ago
Overleaf screenshot

Overview

Discover what makes Overleaf powerful

Overleaf Community Edition is an open‑source, real‑time collaborative LaTeX editor that runs entirely on the web. From a technical standpoint it is a full‑stack application composed of a Node.js backend, a React/Redux front end, and a set of micro‑services that orchestrate LaTeX compilation, file storage, and user collaboration. The core of the system is built on a **Pub/Sub architecture** using Redis for message brokering, which allows multiple workers to pick up compile jobs and push results back to the client via WebSockets. The editor itself is a rich‑text/markdown hybrid powered by CodeMirror, with syntax highlighting and real‑time diffing to support simultaneous editing across dozens of users.

Backend

Compilation Service

Front End

Storage

Overview

Overleaf Community Edition is an open‑source, real‑time collaborative LaTeX editor that runs entirely on the web. From a technical standpoint it is a full‑stack application composed of a Node.js backend, a React/Redux front end, and a set of micro‑services that orchestrate LaTeX compilation, file storage, and user collaboration. The core of the system is built on a Pub/Sub architecture using Redis for message brokering, which allows multiple workers to pick up compile jobs and push results back to the client via WebSockets. The editor itself is a rich‑text/markdown hybrid powered by CodeMirror, with syntax highlighting and real‑time diffing to support simultaneous editing across dozens of users.

Architecture

  • Backend: Node.js (v14+), Express, and a suite of custom modules that expose RESTful APIs for project management, file operations, and compilation triggers. The server communicates with a PostgreSQL database (schema versioned via Flyway) for user accounts, project metadata, and audit logs.
  • Compilation Service: A containerized worker pool that pulls jobs from a Redis queue, runs pdflatex, xelatex, or other TeX engines inside a sandboxed Docker environment, and streams the PDF back to the client. The worker images are based on texlive distributions and can be extended via custom package overlays.
  • Front End: React with Redux, bundled by Webpack, and served as a single‑page application. Real‑time collaboration is achieved through Socket.IO over secure WebSockets, which synchronizes document changes and cursor positions.
  • Storage: User files are stored in an S3‑compatible object store (MinIO or AWS S3) with lifecycle policies for versioning. Project snapshots are persisted in PostgreSQL, while large binaries reside in the object store to keep the database lean.
  • Containerization: Two Dockerfiles exist – a base image that installs texlive and system utilities, and an application image that layers the Overleaf code and services. The base image is reused across all worker nodes, reducing build time for new deployments.

Core Capabilities

  • Real‑time Collaboration: Bidirectional WebSocket streams enable instant sharing of edits, comments, and compilation status.
  • APIs: REST endpoints for project CRUD, file uploads/downloads, and compile triggers. Webhooks can be registered to notify external services when a project is compiled or a new version is pushed.
  • Version Control: Built‑in Git integration allows users to commit changes, view diffs, and roll back to previous states. The API exposes Git operations for automated workflows.
  • Sandboxed Compiles: Optional feature that isolates compilation in a chrooted Docker container, preventing malicious code from accessing host resources. This is critical for multi‑tenant deployments.
  • Template Engine: JSON schema–driven project templates can be defined and published, enabling developers to ship pre‑configured LaTeX projects with custom branding.

Deployment & Infrastructure

Overleaf is designed for self‑hosting in a Kubernetes or Docker Compose environment. The official Overleaf Toolkit provides Helm charts and docker‑compose files that spin up:

  1. API Gateway (NGINX) – TLS termination and load balancing.
  2. Node.js API Pods – stateless instances behind the gateway.
  3. Redis Cluster – for message passing and session storage.
  4. PostgreSQL StatefulSet – with persistent volumes for metadata.
  5. MinIO or S3 Buckets – for file storage.
  6. Compile Workers – horizontally scalable pods that pull from Redis.

Scaling is straightforward: add more worker replicas to handle increased compile load, or increase the Node.js pool for higher API throughput. The system is stateless except for Redis and PostgreSQL, making rolling upgrades safe.

Integration & Extensibility

  • Plugin System: Developers can hook into the compilation pipeline by adding custom Docker images or extending the Node.js middleware stack.
  • Webhooks & APIs: External CI/CD pipelines can trigger compiles or pull PDFs via the REST API.
  • SAML/LDAP: Enterprise deployments can integrate with corporate identity providers for single sign‑on.
  • Custom Templates: JSON templates can be stored in a dedicated Git repository, automatically pulled by the server, and exposed through the UI.
  • CLI Tools: A lightweight command‑line client (overleaf-cli) can be used to programmatically create projects, upload files, and fetch compilation logs.

Developer Experience

The project follows a clean repository layout with comprehensive documentation in the docs/ directory and a detailed Wiki. The codebase is heavily commented, and unit tests cover critical paths in both the backend and worker services. Community support is robust: a dedicated mailing list, Slack channel, and GitHub Discussions provide rapid assistance. Licensing under AGPL‑3.0 ensures that any derivative work remains open, which is attractive for academic institutions and research labs.

Use Cases

  • Academic Research Groups: Host a private Overleaf instance where students and collaborators can edit papers in real time without exposing their work to the public internet.
  • Publishers & Journals: Provide a templated submission portal that compiles manuscripts on the fly and validates LaTeX syntax before acceptance.
  • Enterprise Documentation: Use Overleaf to produce technical manuals, whitepapers, and reports with version control and SSO integration.

Open SourceReady to get started?

Join the community and start self-hosting Overleaf today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
other
License
AGPL-3.0
Stars
16.7k
Technical Specs
Pricing
Open Source
Database
PostgreSQL
Docker
Dockerfile
Supported OS
LinuxDocker
Author
overleaf
overleaf
Last Updated
4 days ago