
In simple English
This tool turns a folder of PDFs and text files into a smart library. It automatically links documents together based on the laws or references they mention. You can search the text, highlight passages, and ask questions to built-in AI helpers. It connects to your server using Docker (a way to run a program inside its own sealed box, so it cannot break anything else on your server). You can use it for free, but you need a computer or server with enough memory to run several background services at once.
What it is
OpenContracts is a self-hosted document management platform with built-in AI agents, human annotation tools, and a graph database. It exposes its features through a React web interface, a GraphQL and REST API, and a Model Context Protocol (an open standard that lets AI assistants securely talk to data sources and tools) server.
What it is good for
Researchers, legal teams, and solo builders who need to organize hundreds of complex documents, track cross-references between them, and let AI assistants query the collection without hallucinating answers.
- Links citations between documents automatically so you can trace references instantly.
- Includes a Model Context Protocol server so AI tools like Claude can search your documents directly.
- Allows precise, layout-faithful text and PDF highlighting that humans and AI share as ground truth.
- Requires Docker and multiple container services running together, making setup complicated for non-programmers.
- Needs several gigabytes of RAM and optionally a GPU to run vector embeddings and background document workers smoothly.
- Heavy ongoing maintenance if self-hosted on a personal machine rather than a cloud server.
Proprietary document management systems and closed legal research tools
Docker
- getomni-ai/zerox12k stars
Extracts text from PDF documents using vision models instead of building a full citation graph.
- mozilla/pdf.js54k stars
A PDF reader written in JavaScript that renders documents inside a web page with no plugin.
- Hack-with-Github/Awesome-Hacking123k stars
An index of 81 curated security reading lists, with one line on each.
- Zettlr/Zettlr14k stars
A desktop writing program for Markdown documents, with citation support and export to Word, PDF and LaTeX.
git clone https://github.com/Open-Source-Legal/OpenContracts.git cd OpenContracts mkdir -p .envs/.local lp ./docs/sample_env_files/backend/local/.django ./.envs/.local/.django cp ./docs/sample_env_files/backend/local/.postgres ./.envs/.local/.postgres cp ./docs/sample_env_files/frontend/local/django.auth.env ./.envs/.local/.frontend docker compose -f local.yml build docker compose -f local.yml --profile fullstack up