# I Put My Country's Entire Legal Code in Git: 300,000+ Documents Since 1810

DevFeed: [I Put My Country's Entire Legal Code in Git: 300,000+ Documents Since 1810](<https://devfeed.tech/articles/i-put-my-country-s-entire-legal-code-in-git-300-000-documents-since-1810-112831.md>)

Original publisher: [Read original article](<https://hackernoon.com/i-put-my-countrys-entire-legal-code-in-git-300000-documents-since-1810?source=rss>)

Author: Maximiliano Morel

Published: 2026-11-02T20:15:33Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [version-control](<https://devfeed.tech/topics/version-control.md>), [search-engines](<https://devfeed.tech/topics/search-engines.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [actions](<https://devfeed.tech/tags/actions.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [alternatives](<https://devfeed.tech/tags/alternatives.md>), [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [api-key](<https://devfeed.tech/tags/api-key.md>), [apis](<https://devfeed.tech/tags/apis.md>), [article](<https://devfeed.tech/tags/article.md>), [building](<https://devfeed.tech/tags/building.md>), [code](<https://devfeed.tech/tags/code.md>), [country](<https://devfeed.tech/tags/country.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [git](<https://devfeed.tech/tags/git.md>), [git-legal-history](<https://devfeed.tech/tags/git-legal-history.md>), [github](<https://devfeed.tech/tags/github.md>), [hackernoon-top-story](<https://devfeed.tech/tags/hackernoon-top-story.md>), [law](<https://devfeed.tech/tags/law.md>), [legal](<https://devfeed.tech/tags/legal.md>), [legal-corpus](<https://devfeed.tech/tags/legal-corpus.md>), [legaltech](<https://devfeed.tech/tags/legaltech.md>), [net](<https://devfeed.tech/tags/net.md>), [repo](<https://devfeed.tech/tags/repo.md>), [user-friendly](<https://devfeed.tech/tags/user-friendly.md>)

## AI overview

The project records Chilean legal publications in Git, with one commit per publication, so users can inspect laws and amendments as they stood on a given date. It builds a corpus from BCN's SPARQL catalog and LeyChile's norm and version data, then creates an amendment graph and Git history. The author reports roughly 358,000 cataloged norms, with about 339,000 placed in the main history builder. Git's directory and push limits required workarounds including compressed cache files, split commits, sparse checkout, and date handling for pre-1970 publications. A web interface, API, and read-only MCP server make the corpus searchable; search moved from Meilisearch plus Postgres to Postgres alone after Meilisearch's storage and memory costs and an outage exposed a reliability problem. Postgres uses separate typeahead and deep-search strategies, though common-word results can favor low-ID laws over relevance. Git serves as the history source, while the UI and search infrastructure provide practical access.

## Source excerpt

Building a Git repo from the Chilean law: more than 300,000 legal documents in a corpus that reaches back to 1810. Lots of interesting engineering challenges.