Dshamir is cutting the cord with Supabase

The fork's biggest backend change rips out its dependence on one hosting vendor so the app can run on any standard database.

infrastructuresecurity

Dshamir has reworked how this fork talks to its database. The original build leaned on Supabase - a popular all-in-one backend platform - for storing and retrieving everything from chats to documents to projects. This change swaps that out for a more portable setup built on Prisma, a database toolkit that speaks to plain Postgres, the widely-used open-source database. In practice, the team rewrote nearly the entire data layer of the app to make the switch.

The payoff is independence: instead of being tied to one provider's hosting, the fork can now run on essentially any Postgres database, including a self-hosted one. The work also bundles in reusable pieces - a 'soft delete' pattern that keeps deleted records recoverable, and an audit-log utility that tracks who changed what.

So what Anyone weighing where their legal data lives - on a vendor's cloud versus their own infrastructure - should watch this as a template for breaking platform lock-in.

View this fork on GitHub →

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

Commits in this thread

6 commits from Dshamir/AI-Legal, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
7af01ab6 [P3] chore: initialize Prisma ORM Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
872dcfc5 [P3] feat: add complete Prisma schema with enums and soft-delete Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
139c4d38 [P3] feat: add Prisma client with soft-delete extension Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7b042604 [P3] feat: add audit log utility Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
54378941 [P3] feat: add Prisma seed script Dshamir 2026-05-23 ↗ GitHub
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9485e7d9 [P3] feat: migrate all routes and libs from Supabase SDK to Prisma Dshamir 2026-05-23 ↗ GitHub
commit body
Replace every supabase.from() query across 13 files with Prisma client
calls. Auth middleware (auth.ts) intentionally retained Supabase for
admin.auth.getUser(). Added audit logging on create/update/delete
operations in route handlers.

Files migrated:
- Routes: chat, projectChat, projects, documents, tabular, workflows,
  user, downloads
- Libraries: access, chatTools, documentVersions, userApiKeys,
  userSettings

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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-521.md from inside the repo you want the changes in.

⬇ Download capture-thread-521.md