heaventree reverse-engineers Mike's database from scratch

A single migration file rebuilds the entire Mike data model for Supabase - a head-start the upstream project never shipped.

infrastructuresecurity

Upstream Mike ships the application but not a canonical database schema, leaving anyone who wants to host their own copy to piece it together from the code. heaventree has done that work: a single migration stands up the full data model - user profiles and tiered credits, encrypted per-user API keys for Claude, Gemini and OpenAI, projects and subfolders, documents with version history, workflows, chats, and the tabular review tables. Access is locked down to a backend service role rather than exposed to anonymous users, and new signups automatically get a profile row.

A few details to scrutinise before borrowing it wholesale: the default tabular model points at a Gemini preview that may not match upstream, and project ownership is stored loosely rather than as a strict foreign key to the auth system. Worth a careful read, not a blind copy.

So what Anyone planning to self-host Mike on Supabase just got the provisioning step mostly written for them.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from heaventree/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
d3c0554b Updated package-lock.json Heaventree Digital 2026-05-20 ↗ GitHub

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-515.md from inside the repo you want the changes in.

⬇ Download capture-thread-515.md