mihailnica10 moves Mișu to Cloudflare, the whole backend in two days

A Romanian-market fork of Mike just swapped its entire server stack for Cloudflare's low-cost, pay-as-you-go platform.

infrastructureintegration

Over a two-day sprint, the team ripped out Supabase (a hosted database service) and a traditional server, rebuilding everything as a single application on Cloudflare, whose serverless platform has a generous free tier. Roughly seventeen database tables were translated to the new setup, and every feature of the app was ported across, including a rewritten chat that streams answers in real time and speaks Romanian by design, branded as Mișu.

The chat is also provider-agnostic: users can route questions to Anthropic, Google, OpenAI, or OpenRouter (a marketplace that brokers access to many AI models), and supply their own API keys rather than relying on the operator's. The work is candid about its rough edges, including a first-pass login system the team itself replaced one commit later, and planning notes that list what is still untested.

So what If you are weighing how cheaply a legal-AI product can run, or want a local-language deployment playbook, this fork is worth a close read.

View this fork on GitHub →

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

Commits in this thread

12 commits from mihailnica10/misu-legal, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
91befa8b misu: Cloudflare migration step 1 - D1 + Drizzle + Hono Worker API Super User 2026-06-09 ↗ GitHub
b8890f13 misu: curățare infra - șters Supabase, păstrăm doar Cloudflare Super User 2026-06-09 ↗ GitHub
1e3f0c99 misu: full refactor la Cloudflare - JWT auth, Drizzle D1, curățare Supabase, rebranding Mihail Nica 2026-06-09 ↗ GitHub
fffde734 Migrare completă Cloudflare: toate rutele Express în Hono Worker + JWT auth în frontend Mihail Nica 2026-06-09 ↗ GitHub
commit body
- Rescrise toate rutele Express în worker.ts (Hono + Drizzle + D1):
  Chat CRUD (list, create, detail, update, delete)
  Workflows full (CRUD + shares + hidden)
  User (profile, api keys)
  Projects (update, people, folders, chats)
  Documents (display, url, docx, versions)
  CaseLaw, Downloads
- Eliminat complet Supabase din frontend:
  misuApi.ts → JWT din localStorage
  AuthContext, login, signup → fetch direct la Worker API
  Hooks (useFetchSingleDoc, useFetchDocxBytes, useDocumentVersions)
  Componente (EditCard, AssistantMessage, DocPanel, DocxView)
- Zero referințe Supabase în frontend
- Worker API live la misu-api.mihailnica10.workers.dev
13a03261 TanStack AI streaming chat endpoint în Worker API Mihail Nica 2026-06-09 ↗ GitHub
commit body
- Adăugat POST /api/chat/stream cu TanStack AI
- Suport pentru Claude (anthropicText), Gemini (geminiText), OpenAI (openaiText), OpenRouter
- System prompt juridic RO
- SSE streaming response via toServerSentEventsResponse
- Endpoint protejat cu requireAuth (JWT)
- @tanstack/ai, @tanstack/ai-anthropic, @tanstack/ai-gemini, @tanstack/ai-openai instalate în backend
- @tanstack/ai-react, @tanstack/ai-client instalate în frontend
cc00acb2 Migrare completă: tabular + projectChat routes în worker.ts, mikeApi.ts frontend client, locale EN+RO, șters Supabase Mihail Nica 2026-06-09 ↗ GitHub
2a5d2c13 Fix: restored clean files from upstream + JWT auth re-applied Mihail Nica 2026-06-09 ↗ GitHub
355332c4 fix: type errors, JSX truncation, BYOK infrastructure, UserProfileContext migration Mihail Nica 2026-06-10 ↗ GitHub
commit body
- MikeDocumentVersion: added filename, file_type, size_bytes, page_count
- DocumentSidePanel: closed unclosed JSX tags, added DataRow component
- CaseLawPanel: added CaseCitationQuote type, orderOpinions, opinionTitle
- UserProfileContext: fully migrated from Supabase to Worker API (JWT)
- mikeApi.ts: added Document alias, CaseLawOpinion type, getCourtlistenerOpinions
- misuApi.ts: created as re-export layer + helpers (fileTypeForVersion, etc.)
- ProjectPage: added initialTab prop support
- ProjectAssistantTab/ReviewsTab/PageParts: fixed type imports (MikeChat, MikeProject)
- RowActions: added renameLabel prop
- shared/types: added active_version_number to MikeDocument
e479e0e7 fix: rename wrangler project name to misu-legal Mihail Nica 2026-06-10 ↗ GitHub
f373b7c0 fix: regenerate bun.lock to match package.json Mihail Nica 2026-06-10 ↗ GitHub
f34f744d fix: remove remaining supabase files causing TS error Mihail Nica 2026-06-10 ↗ GitHub
8118d001 fix: switch to Workers with Assets mode for correct static serving Mihail Nica 2026-06-10 ↗ 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-647.md from inside the repo you want the changes in.

⬇ Download capture-thread-647.md