Davemaina1/iroh_
Kenya-law legal assistant with a memory-engineered Python RAG sidecar, Claude-only LLM, and a product rebrand to Iroh
Davemaina1/iroh_ is a Kenya-focused fork that diverges from the upstream in two distinct directions. On the product side: Claude is the only supported LLM (Gemini removed, Opus gated behind thinking mode), display names persist via Supabase user_metadata backfill, the app is rebranded to Iroh at the UI layer, and a marketing landing site and premium polish pass have been applied. On the infrastructure side: the fork went through several iterations building a Kenya Law retrieval stack -- starting with in-process ONNX in Node (later abandoned due to segfaults), landing on a standalone FastAPI sidecar that runs all-MiniLM-L6-v2 via ONNX runtime and serves results over HTTP to a thin TypeScript client.
The most technically substantial work is the RAG sidecar's memory optimization. Four commits take it from ~1.5GB (torch + sentence-transformers + ChromaDB) down to 320MB peak RSS: replacing torch with onnxruntime, exporting the 86K-chunk corpus to int8-quantized .npz files on Supabase Storage, and memory-mapping the embedding array on startup. BM25 was dropped in the final pass to save another 150MB, leaving semantic-only search. The citation pipeline got a parallel rework to use stable chunk_id values, and a honesty contract was added to the system prompt to prevent the model from fabricating Kenya law citations.
What's in it
- Kenyan law, grounded The assistant is wired to refuse rather than guess on Kenyan statutes and cases, leaning on a dedicated retrieval layer instead of model recall.
- Trustworthy citations An end-to-end citation pipeline with stable identifiers means a lawyer can follow any claim back to the underlying source.
- Free-tier-friendly retrieval A Python sidecar runs an 86,000-chunk legal search index inside 320MB of RAM - a deployment story worth studying if you're shipping on a budget.
- Claude-only, with mode selector Multi-vendor model support is gone, replaced by a three-button mode selector that bets the whole experience on Anthropic.
- Iroh branding and storefront A surface-level rename to Iroh paired with a new marketing landing site and a premium polish pass.
- Quieter product fixes Small but real reliability work, like stopping users' display names from vanishing between logins.
Direction
searchbrandinginfrastructure
Activity
Threads of work (detailed view)
Davemaina1 builds a storefront for its Mike fork
What started as a separate marketing site got folded straight into the product, turning a developer project into something that looks ready to sell.
Marketing site lands, gets consolidated into the product app, then rebranded premium
Four commits build and reshape Davemaina1's public-facing marketing presence. The structural moves are mostly Iroh-specific, but two bugs buried in the rebrand commit - a `workflow` column schema mismatch and a Next.js favicon override - are worth knowing about if your fork shares upstream code.
Davemaina1 stops the sign-up flow from dropping users' names
A quiet bug where new accounts could lose the name a user typed at registration now has a belt-and-braces fix.
Display names now survive email-confirmation flows via user_metadata backfill
Davemaina1 fixes a Supabase signup race that silently drops display names for users who go through email confirmation. The pattern - write to user_metadata at signup, merge on the backend at login - is applicable to any product using Supabase auth with a separate profiles table.
Davemaina1 crams a legal-search engine onto a free server
A multi-step rebuild to make AI-powered case-law search run inside a 512MB hosting budget, at zero cost.
RAG sidecar squeezed into 320MB on Render's free tier
Davemaina1 pulled embedding and search out of Node entirely, built a FastAPI sidecar, then spent four commits cutting its memory footprint from 1.5GB down to 320MB peak RSS -- small enough to run on Render's free tier with 192MB to spare.
Davemaina1 makes Mike's citations click through to the right place
When Mike cites a source, the link now actually opens what it claims to - and stops breaking on web results.
Stable chunk_ids travel from retrieval tool to UI via a citation_sources SSE event
Four commits rebuild how RAG citations flow from tool result to the UI in Davemaina1's fork. The core change - assigning stable ids at retrieval time and propagating them as a side-channel SSE event - is applicable to any RAG product that needs to link citations back to their sources without re-parsing text.
Davemaina1 learns the hard way that legal search doesn't want to live in Node
Five commits chasing a Kenyan-law search engine through crash after crash - and then abandoning the whole approach.
Davemaina1 stops Mike from citing Kenyan law it never looked up
The fork rewrites the AI's instructions so it can't fall back on memory for legal citations - it has to search first or admit it found nothing.
Kenya legal grounding contract: 8-rule retrieval gate replaces open-ended knowledge fallback
Davemaina1 replaces "answer based on your legal knowledge" with a hard retrieval requirement: the model must call a tool before citing any Kenyan statute or case, and training-data citations are banned outright. The honesty contract and the dual-tool retrieval pattern are both portable, even if the Kenya corpus isn't.
Davemaina1 gives the fork its own name: Mike becomes Iroh
A one-commit rebrand swaps every visible mention of "Mike" for "Iroh" - a signal this fork is steering toward its own product, not staying in step with upstream.
Mike renamed to Iroh at the UI layer, internals untouched
A single commit swaps 12 user-visible strings across 9 files -- system prompts, the DOCX tracked-changes author, browser title, nav text, a handful of placeholders. Every internal identifier stays as-is.
Davemaina1 bolts the fork to Anthropic and aims it at Kenyan law
This isn't a multi-model experiment anymore - it's a single-vendor legal product with a clear home jurisdiction.
Davemaina1/iroh_ locks to Anthropic-only, gates extended thinking to Opus
Two commits remove multi-provider routing entirely and replace the model picker with a Quick/Deep/Draft mode selector. If you're evaluating this fork, the provider lock is the defining constraint to know about upfront.