Show HN: Tritium – The Legal IDE in Rust (tritium.legal)
Hi HN! I'd like to submit for your consideration Tritium (https://tritium.legal). Tritium aims to bring the power of the integrated development environment (IDE) to corporate lawyers.
My name is Drew Miller, and I'm lawyer admitted to the New York bar. I have spent the last 13 years in and out of corporate transactional practice, while building side projects in various languages using vanilla Vim. One day at work, I was asked to implement a legal technology product at my firm. Of course the only product available for editing and running programs in a locked-down environment was VS Code and its friends like Puppeteer from Microsoft.
I was really blown away at all of the capabilities of go-to definition and out-of-the box syntax highlighting as well as the debugger integration. I made the switch to a full IDE for my side projects immediately. And it hit me: why don't we have this exact same tool in corporate law?
Corporate lawyers spent hours upon hours fumbling between various applications and instances of Word and Adobe. There are sub-par differencing products that make `patch` look like the future. They do this while charging you ridiculous rates.
I left my practice a few months later to build Tritium. Tritium aims to be the lawyer's VS Code: an all-in-one drafting cockpit that treats a deal's entire document suite as a single, searchable, AI-enhanced workspace while remaining fast, local, and secure.
Tritium is implemented in pure Rust. It is cross-platform and I'm excited for the prospect of lawyers running Linux as their daily driver. It leverages a modified version of the super fast egui.rs immediate-mode GUI library. The windows build includes a Rust COM implementation which was probably one of the more technical challenges other than laying out and rendering the text.
Download a copy at https://tritium.legal/download or try out a web-only WASM preview here: https://tritium.legal/preview
Let me know your thoughts! Your criticisms are the most important. Thank you for the time.
170 comments
[ 3.7 ms ] story [ 218 ms ] threadI'm curious what was your experience like building this in Rust? Also, how did you find working with egui, what made you choose egui over other UI frameworks?
It's my first Rust project, and I've found Rust to be amazing once you cross over the learning hurdle. The biggest issue was of course the borrow checker, but for a project like this where you aren't really iterating much on the design (as opposed to say a game dev), it lets you fly. It saves you from all the big mistakes and allows you to comfortably use threads and things. No idea how I would have made it without rust_analyzer, though.
Egui was simple to get going, while it has some downsides being an immediate mode UI, those are mostly overcome by the caching necessary for rendering documents, etc.
This beautiful software that looks a bit like VS Code, what did you use to make it? I'm guessing Tauri but curious if you used something else.
Thanks a ton for the feedback!
I am interested in developing software in this space, so these are earnest questions and not criticism.
Absolutely. Overbought. They're owned by Microsoft. Go to a legal tech conference and there are thousands of vendors and not a single MSFT representative. All they want to do is push more Azureware on the deep pockets of profitable firms.
> Is the docx format fully supported?
It will be. There are certainly edge case features that don't render correctly yet, but those will come. The 80% that we care about should work. No data will be dropped, as mentioned elsewhere it will just look bad and gracefully degrade behind the scenes to a safe representation that ensures the data isn't lost.
> Can one person use Tritium without affecting others?
Yes, it's totally private and secure. Using Tritium doesn't require any cloud access or anything like that (other than to phone home with the auto-update or your LLM integration). I'm going to link the history to a separate hidden directory in the filesystem a la .git in the future which will allow some basic multi-editor features.
> Other than tabs, what does Tritium offer that two Word panes and a file browser pane tiled on screen can't cover?
Great question! It does the things lawyers care about: help them pick out symbols (defined terms, specifically) and run diffs (redlines) cheap and quick. It also renders PDFs (using pdfium).
> I am interested in developing software in this space, so these are earnest questions and not criticism.
Drop a line to the email in my bio. I'd love to chat offline.
1: https://www.law.cornell.edu/cfr/text/10/30.19
> Except for persons who manufacture, process, produce, or initially transfer for sale or distribution self-luminous products containing tritium, krypton-85, or promethium-147, and except as provided in paragraph (c) of this section, any person is exempt from the requirements for a license set forth in section 81 of the Act and from the regulations in parts 20 and 30 through 36 and 39 of this chapter to the extent that such person receives, possesses, uses, transfers, owns, or acquires tritium, krypton-85, or promethium-147 in self-luminous products manufactured, processed, produced, or initially transferred in accordance with a specific license issued pursuant to § 32.22 of this chapter, which license authorizes the initial transfer of the product for use under this section.
... and also because it is ambiguous / error-prone / subject to interpretation, especially when figuring out antecedents of pronouns, referents, and textual boundaries.
I tried four times to read the above by paragraph without reformatting it with some parentheses etc, but failed.
I have a gun with a tritium-based night sight (so the sight dots glow with no light), and it came with documentation about the provenance of each of the three tritium vials.
I also believe it is a crime to break open a sealed tritium vial.
I've seen a bulleted list being used for both conjunctions and disjunctions within the same document and in both cases it was not obvious from context (it was related to conditions for receiving funding)
As to whether I know any lawyers interested in that kind of thing -- I think your thing would face the same kind of issue that others in this thread have identified: why would lawyers be interested in a product that, at the end of the day, helps them bill fewer hours? You could argue that some law firm could use it as their secret sauce like Whatsapp used Erlang or something like that, but I don't think that the legal space has many people interested in this kind of innovation.
To the extent the law can be parsed as English you could generate CSTML documents by parsing the text of laws (or even writing laws in CSTML) but I think the "secret weapon" scenario is more likely in the present -- that a firm would use CSTML to show them effectively encode their current understanding of the structure of the text of the written law.
Good luck!
I've gone back and forth on the UX idea, and while I do agree, it's important that Tritium selects for users that are going to be able to quickly adopt the newer concepts. Just simply presenting a "better Word" isn't really going to move the needle. It's really a shift in expectations. That said, I have recently backed off defaulting to dark mode to make it feel slightly more familiar.
Think about programming languages- ones that introduce radical new concepts may still employ familiar syntax/naming to smooth the transition for newcomers. Rust mimicked C++, TypeScript extended JS, etc. These languages were made to introduce powerful new ways of thinking about code, but by appearing as similar as possible to what devs already knew, they freed up more brain cycles for people trying to adopt them. They didn't muddy their concept-space for the sake of familiarity, but they didn't introduce any more unfamiliarity than they actually needed to for the benefits they wanted to give
Dig the idea of this product, will give it a whirl tonight.
Source: attorney, former dev
How much less adoption would Rust have gotten if it looked like OCaml instead of C++?
Its adopters are not stupid, they could have figured out alien syntax if they were already convinced of the benefit. But selling someone on an entirely new substrate for their professional work is a huge ask. You need to make it as immediately-palatable as possible, or they'll just keep on sailing without giving it a chance.
if anything, it didn't mimick /enough/
But I would push back a bit against the UX and it being a "better Word". It is not immediately clear from looking at the website whether you support tracking changes. If you support editing Word documents, why aren't basic editing features, like font selection, size and weight, exposed in the UI. (I am viewing it on mobile Chrome and I might have missed it because your page doesn't support pinch to Zoom.)
You don't have to make it look like Word but it must be designed to facilitate common interaction patterns needed for working with Word documents.
(If you are building it on top of VSCode you could use its multiplayer features, which could be a good sell. )
IANAL: idk if lawyers dont do pdfs but tried some research papers and PDF rendering could use some love (MacOS)
it's really more blurry than any pdf on chrome https://imgur.com/a/AElOuaA
seems you're doing work on all files when loading, you should be more like lazy-loading?
[Person] - hope you're well! I wanted to put Tritium on your radar. It's a word processor jacked on steroids built just for transactional lawyers.
From built-in defined term annotation to multi-document search/replace to redlining and much, much more, it will help your team work faster and more effectively on existing Word documents and PDFs. You'll even pick up errors from outside counsel.
Tritium runs on Windows, MacOS and even Linux for your most tech savvy lawyers.
Please let me know if that might be good for your legal team, and I'd love to demo it for you."
What would you say if you were going to focus on a pain point and a problem that this specifically solved for you, that it can also solve for the other lawyers who are not using this and that is not being met by the other options?
And to achieve this you would have to create a machine readable format for legal documents, and have a library of them already converted to it.
Then you could have a linter that highlighted that you made a logical mistake or did something wrong from the perspective of a legal guy.
Egui is great!
Given that many lawfirms bill by the hour, are there incentives to make their work more efficient? I.e. if a firm were to adopt this tool, can they practically charge more per hour than a firm that does not?
I talked a little about this back in September: https://www.legalinnovators.co.uk/post/legal-innovators-uk-t...
The "Fetch Example" button on the web demo doesn't seem to work. It would be nice if the web demo was pre-loaded with some stuff.
I guess all of that is TBD though I suspect based on the tech choices will be way harder than it sounds.
Try the download!
I’m not a lawyer but I draft insurance contracts and work with reviewing lawyers closely. As a former software developer I miss version control, partial includes, conditional logic, etc. I am shocked at how poorly supported the business world is by the ubiquity of MS Word.
I’ve been experimenting with Typst now for some time and it has a lot of what I want in creating and versioning documents but I believe may be too technical to become integrated with existing workflows and the non-technical users engaged in the development process. Basically my experience is normal users tune out once you get outside of even basic MS Word.
I really want a great tool to exist but I’m afraid I’m an outlier and unique in my technical ability in this space. Nice to see others interested in such a tool.
I think we technical folk need to build technical tools for us to use while we explore the space and iterate on something that the normies will accept.
If you find anyone willing to invest money so a team can spend time on this, please let me know! :-)
Our document editor is powered by Zoho Writer, offering all the capabilities of a word processor along with versioning, document assembly, and automation features. On top of this, we’ve built structured version control, clause-level change tracking, and workflow-integrated collaboration. This enables legal and business teams to work together seamlessly without relying on external editors or juggling redlined Word files over email.
Just sharing in case anyone else here is tackling similar problems or interested in the space.