Why Monorepo?

We maintain a monorepo for our project because it enables us to manage both code and legal documents cohesively, ensuring everything remains in sync. This approach allows us to move swiftly from concept to feature deployment without compromising quality—particularly vital to our firm’s overarching mission of improving access to justice.

Time Savings and Context

One of the chief advantages of a monorepo is the time it saves. Writing software is already complex; drafting contracts adds an additional layer of difficulty. Combining both in a single repository ensures that updates to legal documents and software code occur in tandem, reducing the risk of misalignment. According to various engineering discussions—such as Google’s monorepo practices—a unified repository simplifies code reviews, ensures consistent quality standards, and improves discoverability.

Every pull request in our system triggers a comprehensive test suite. This suite validates both our software changes and our Neon Notations via Ecto changesets. This guarantees that the legal frameworks we build (including templated contracts and questionnaires) remain correct and properly aligned with any updates to our code.

A Perfect Fit for Small Teams

For a small team, a monorepo offers significant advantages. By consolidating our entire codebase, we can give both developers and Large Language Models (LLMs) a single, holistic view of the project. This approach facilitates:

  • AI-Assisted Refactoring: An LLM can review the entire codebase at once, resulting in more accurate and cohesive recommendations.
  • Less Overhead: We avoid the complexity of multiple repositories, conflicting version histories, and difficult dependency management.

This efficiency allows us to direct our limited development resources toward delivering high-value features that bolster our legal services.

Elixir and Phoenix Synergy

We run our entire application in one Elixir and Phoenix codebase, encapsulated within a single Docker container. This architecture depends on just two primary state providers: PostgreSQL for relational data and object storage for file management. This simplicity reduces our DevOps burden and helps us focus on building cutting-edge legal technology rather than wrangling infrastructure.

Exceptions to the Rule

Certain clients require private, specialized legal advice that cannot be shared in our public-facing monorepo. In those situations, we create dedicated private repositories. However, we still apply our continuous integration and continuous delivery (CI/CD) workflow to these repos, verifying each contract against the Neon Notations specification. This ensures that even in separate, confidential spaces, our legal documents adhere to a uniform grammar, structure, and degree of quality.

A Single Timeline

Another advantage of the monorepo strategy is the unified timeline it provides. Inspired by the OneFlow approach, we maintain a single main branch for our repository. Each commit to main is gated by a pull request that undergoes peer review from both AI agents and human collaborators. This constant vetting process keeps our code and documents aligned and makes it straightforward to trace the exact version of any document provided as legal advice. If changes are ever necessary, the single commit tree ensures that we can pinpoint the relevant version, review the historical context, and make precise updates—critical safeguards for a law firm dedicated to comprehensive client service.