[P3] feat: migrate all routes and libs from Supabase SDK to Prisma

↗ view on GitHub · Dshamir · 2026-05-23 · 9485e7d9

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>
Repository Dshamir/AI-Legal
Author Dshamir <dshamir@blucap.ca>
Authored
Parents 54378941
Stats 13 files changed , +1761 , -2142
Part of Prisma ORM migration off the Supabase SDK

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-9485e7d9.md from inside the repo you want the change in.

⬇ Download capture-commit-9485e7d9.md