Davemaina1/iroh_

Kenya-law legal assistant with a memory-engineered Python RAG sidecar, Claude-only LLM, and a product rebrand to Iroh

Active development across multiple tracks: LLM provider simplification, citation integrity, Kenya-specific legal grounding, RAG infrastructure, UI rebrand, and a marketing site. The RAG sidecar thread is the most complete and the most transferable to other deployments.

View on GitHub →

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

Direction

searchbrandinginfrastructure

Activity

Themed changes and pull requests touching this fork, newest first. Themed changes that haven't been turned into a public post yet still appear — they're real work even without a published writeup.

📝 Baseline lockfile refresh for local Iroh run 1 commit 2mo ago minor change

Threads of work (detailed view)

15 threads have been distilled into posts.

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.

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.

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.

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.

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.