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.
Davemaina1 pulled the AI search machinery out of the main app and into a small dedicated service, then spent several rounds shrinking it to fit a hard ceiling. Free hosting tiers - here, Render's - cap memory at 512MB, and the usual machine-learning toolkit blows straight past that at roughly 1.5GB. So Davemaina1 swapped the heavyweight components for leaner equivalents, compressed the underlying case-law data, and stopped loading the whole library into memory at once, reading it from disk on demand instead.
The reference corpus now lives in cloud storage (Supabase, a hosted database-and-files service) and is pulled in at startup. Final memory use lands around 320MB - comfortably under budget.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?