Cadefi Legal Search Platform
Hierarchical legal text navigation and search platform modeling approximately 100,000 legal content nodes with PostgreSQL full-text search and cross-law references.
Challenge
Cadefi, a continuous training school for accountants, needed a better way for students and instructors to navigate three interconnected Mexican legal codes: the Código Fiscal de la Federación, the Constitución Política de los Estados Unidos Mexicanos, and the Ley Federal del Trabajo.
The existing workflow depended on physical books, manual bookmarks, and slow cross-referencing between legal provisions. The hard part was not only search: the system needed to preserve the hierarchy of the law, support cross-law navigation, and give non-technical staff a reliable way to capture structured legal text.
Solution
Designed and built a full-stack legal text navigation platform with structured content modeling at the center.
Key capabilities:
- Hierarchical content model: Modeled approximately 100,000 content nodes in PostgreSQL using an adjacency list structure, preserving legal hierarchy from titles and chapters down to articles, sections, and paragraphs.
- Cross-law references: Implemented UUID-linked references between provisions, allowing users to jump between related content across all three legal bodies.
- Structured ingestion interface: Built a custom admin capture interface with Tiptap, enforcing structural integrity while non-technical staff entered and maintained legal text.
- Full-text legal search: Integrated PostgreSQL native full-text search across the corpus, making the legal material searchable without flattening away its hierarchy.
- Reader-first UX: Developed a Nuxt.js frontend modeled after the Kindle reading experience, including paginated reading, bookmarking, font/display controls, and reading progress tracking.
Impact
- ~100,000 structured legal nodes modeled with hierarchy and cross-references intact
- Instant cross-reference navigation replaced manual physical-bookmark workflows
- Maintainable legal corpus through an admin interface built for non-technical staff
- Full-stack delivery with team leadership, including guiding two junior developers through the build
Why It Matters
This project shows how search-heavy systems often require more than a search box. The real value came from modeling the domain correctly, preserving legal structure, enforcing data quality at ingestion time, and building a reading experience that matched how users actually worked with the material.