- Updated: March 28, 2026
- 6 min read
Archiving Spanish Laws in Git: Open Source Legal Tech for Transparency
Legalize‑ES is an open‑source Git repository that archives every Spanish law as a Markdown file, giving developers, lawyers, and citizens version‑controlled, searchable legal data.
Legalize‑ES: Open‑Source Git Archive of Spanish Legislation for Transparency and Innovation
In a bold move toward legal data transparency, the Legalize‑ES project transforms Spain’s entire body of statutes, royal decrees, and organic laws into a public Git repository. By converting each law into a Markdown file and every amendment into a distinct commit, the initiative creates a living, version‑controlled archive that can be cloned, queried, and contributed to by anyone with an internet connection. This article unpacks the project’s purpose, technical design, and the ripple effects it creates for the legal‑tech ecosystem.

Project Overview – What Legalize‑ES Does and Why It Matters
Legalize‑ES aggregates more than 8,600 pieces of legislation sourced from the official Boletín Oficial del Estado (BOE) API. Each law is stored as a .md file with a YAML front‑matter header that captures metadata such as title, identifier, publication date, and current status. The repository’s commit history mirrors the chronological evolution of Spanish law, allowing users to trace every amendment back to its original publication date.
Key Features
- Full‑text, human‑readable Markdown for every statute.
- Granular version control – each amendment is a separate Git commit.
- Rich metadata in YAML front‑matter for easy indexing and search.
- Public domain content, ensuring unrestricted reuse.
- Open contribution workflow that welcomes developers, jurists, and civic hackers.
By treating legislation as code, Legalize‑ES makes it possible to apply modern software development tools—diffs, branches, pull requests—to the legal domain. This paradigm shift is essential for building transparent, auditable, and programmable legal services.
Motivation and Goals – Transparency, Accessibility, and Legal‑Tech Innovation
The Spanish government publishes laws in a machine‑readable format, yet the data remains siloed behind proprietary portals and limited APIs. Legalize‑ES addresses three core motivations:
- Transparency: By exposing the full legislative history in a public Git repo, citizens can verify when and how a law changed, fostering trust in democratic institutions.
- Accessibility: Markdown files are lightweight, searchable, and can be rendered on any device, removing barriers for developers who need to integrate legal texts into applications.
- Innovation: Open data fuels the creation of AI‑driven legal assistants, compliance bots, and analytics dashboards that can automatically detect regulatory shifts.
These goals align closely with the broader open‑government movement and echo the mission of platforms like UBOS homepage, which champion AI‑enabled transparency across industries.
Technical Implementation – Git Repository, Markdown Files, Licensing, and Contribution Workflow
Legalize‑ES leverages the proven capabilities of Git to manage legal data. Below is a concise breakdown of the technical stack:
Repository Structure
spain/
├── BOE-A-1978-31229.md # Constitución Española
├── BOE-A-1995-25444.md # Código Penal
├── BOE-A-2015-11430.md # Estatuto de los Trabajadores
├── BOE-A-2000-323.md # Ley de Enjuiciamiento Civil
└── … (8,600+ files)
YAML Front‑Matter Example
---
titulo: "Constitución Española"
identificador: "BOE-A-1978-31229"
pais: "es"
rango: "constitucion"
fecha_publicacion: "1978-12-29"
ultima_actualizacion: "2024-02-17"
estado: "vigente"
fuente: "https://www.boe.es/eli/es/c/1978/12/27/(1)"
---
Licensing Model
The legislative text itself is in the public domain, as mandated by Spanish law. The repository’s structure, tooling, and documentation are released under the MIT License, allowing unrestricted reuse and modification.
Contribution Workflow
Contributors follow a familiar open‑source process:
- Fork the repository.
- Create a new branch for the amendment or correction.
- Update the relevant Markdown file and adjust the YAML metadata.
- Submit a pull request with a clear description and a link to the official BOE source.
- Maintainers review, merge, and the change becomes part of the immutable Git history.
This workflow mirrors the collaborative model used by the UBOS platform overview, where developers co‑create AI‑enhanced solutions in a version‑controlled environment.
Impact and Significance – Benefits for Developers, Lawyers, and Citizens
Legalize‑ES unlocks a new class of applications that were previously impractical due to data fragmentation. Below are the primary stakeholder benefits:
Developers
- Instant API‑free access to the full legislative corpus.
- Ability to run
git diffon any law to detect changes programmatically. - Seamless integration with AI models for automated compliance checks.
Lawyers & Legal Researchers
- Historical traceability of statutes for case law analysis.
- Exportable Markdown for quick citation and annotation.
- Open‑source community support for interpreting complex reforms.
Citizens & NGOs
- Transparent view of how public policy evolves over time.
- Tools to compare current law with previous versions without legal jargon.
- Empowerment to hold institutions accountable through data‑driven advocacy.
These advantages dovetail with the capabilities of AI marketing agents, which can now ingest legal texts directly from the repository to generate compliance‑aware content at scale.
How to Get Involved – Contribution Guide and Community Resources
Joining the Legalize‑ES movement is straightforward. Follow these steps to become an active contributor:
- Clone the repo:
git clone https://github.com/EnriqueLop/legalize-es.git - Explore the file tree: Navigate to
spain/and locate the law you wish to examine. - Identify a gap: Use
git log --oneline -- spain/BOE-A-xxxx-xxxxx.mdto view its revision history. - Propose a change: Fork, edit, and submit a pull request with a concise description and a citation to the official BOE entry.
- Engage with the community: Join the discussion on the repository’s Issues page, or follow related conversations on the UBOS partner program forum.
For those looking to build AI‑driven services on top of the data, UBOS offers a suite of ready‑made templates. For example, the AI SEO Analyzer can be adapted to audit legal‑tech websites, while the AI Article Copywriter can generate explanatory blog posts about new statutes directly from the repository.
Additionally, the Web app editor on UBOS lets you prototype a searchable legal portal without writing a single line of code, and the Workflow automation studio can trigger notifications whenever a law changes, feeding directly into compliance pipelines.
Conclusion – Join the Open‑Legal Revolution
Legalize‑ES demonstrates that the principles of open source—transparency, collaboration, and reproducibility—are equally powerful in the realm of law. By turning Spain’s statutes into a Git‑backed knowledge base, the project empowers a new generation of developers, lawyers, and civic activists to build smarter, more accountable solutions.
Ready to explore the repository? Visit the Legalize‑ES GitHub page and start cloning today. Whether you’re a startup looking for a data foundation (UBOS for startups), an SMB seeking compliance automation (UBOS solutions for SMBs), or an enterprise aiming to embed legal intelligence at scale (Enterprise AI platform by UBOS), the synergy between Legalize‑ES and UBOS’s AI toolkit can accelerate your roadmap.
Stay informed about upcoming features—such as a public API for real‑time diff queries—by following the project’s roadmap on the UBOS portfolio examples. Together, we can make the law as open and programmable as the code that powers our digital world.