A contextual AI memory system. Not a bookmark manager — a memory operating system that preserves why things mattered.
This is a TanStack Start full-stack React app (deployed on Cloudflare Workers via Lovable) plus an MV3 Chrome extension.
src/
routes/ React routes (login, register, _authenticated/*, api/extension/*)
lib/
hydradb.server.ts HydraDB REST client — the core memory engine
firecrawl.server.ts URL scraping
ai.server.ts NIM MiniMax M2.7 + Groq llama-3.1-8b-instant
memories.functions.ts saveMemory / recallCheck / chat / list / delete server functions
tenant.functions.ts HydraDB tenant provisioning
extension/ MV3 Chrome extension (floating orb, recall toast)
supabase/migrations/ Schema: profiles + memories with RLS
- Save — Firecrawl scrapes the URL → NIM extracts topics & semantic context → HydraDB stores the memory → Supabase keeps the metadata row.
- Recall — Groq turns the user's current context into a query → HydraDB
recall_preferencesreturns related memories → the orb glows. - Chat — User question → HydraDB
recall_preferences+full_recallin parallel → NIM answers with cited memories.
HydraDB is the core memory engine. Supabase only holds auth and display metadata.
HYDRADB_API_KEYFIRECRAWL_API_KEYNVIDIA_NIM_API_KEY(optional override:NVIDIA_NIM_BASE_URL,NVIDIA_NIM_MODEL)GROQ_API_KEY(optional override:GROQ_MODEL)
Supabase URL / keys are auto-provisioned by Lovable Cloud.
See extension/README.md.
Existing memories can be re-ingested into HydraDB using the graph-friendly packet format:
bun run reprocess:memoriesThe script is dry-run by default and logs extracted entities, normalized anchors, triplets, graph packet previews, and reuse metrics. To actually replace old HydraDB entries, run:
bun run reprocess:memories -- --commitIn commit mode, the script deletes each old hydradb_memory_id before re-upserting the improved semantic packet, then updates Supabase with the new HydraDB id. Use --limit 10 or --user-id <uuid> for focused runs.
For larger runs, the script retries AI rate limits and waits between memories by default. Tune this with --delay-ms 3000 if your provider rate limit is tight.