luccast removes Supabase/R2/auth and adds SQLite, local storage, and a Hermes LLM adapter

Five commits replace mike's cloud dependencies with local equivalents: better-sqlite3 for Postgres, disk storage for R2, a no-op auth middleware for Supabase auth, and a new Hermes adapter that reads `~/.hermes/config.yaml` to route LLM calls to any OpenAI-compatible local endpoint.

infrastructureintegration

The foundation is 08ff30ff (+1635/-376). backend/src/lib/db.ts opens a WAL-mode SQLite database at backend/data/mike.sqlite on first run, creating the full schema. backend/src/lib/supabase.ts becomes a 390-line chainable shim that translates .from().select().eq() calls into raw SQLite - enough surface to keep all existing application code working without edits. Storage routes to backend/data/storage/ on disk. Auth is a no-op: every request is pinned to local-user / local@localhost. The Hermes adapter in backend/src/lib/llm/hermes.ts reads `/.hermes/config.yaml` to find a local OpenAI-compatible base URL and model, then calls it via the OpenAI SDK.

Follow-up commits add a mike bash launcher (start/stop/restart/status/logs via a pidfile), wire local-llm as the default model everywhere when Hermes is detected, add GET /hermes-config so the frontend can show the active model name, and hide the API-key UI when running locally. The bugfix commit (915db44a) caught that the placeholder string "local-llm" was reaching the LLM endpoint as the literal model name - now resolved to the actual name from config, with a 60-second timeout added.

The mike launcher hard-codes MIKE_HOST=192.168.2.204; override with the env var before deploying on any other machine.

The Supabase shim covers only the query patterns currently used, so upstream changes that introduce new call patterns could silently break.

So what Worth a look if you want a self-hosted SKU or a reference SQLite schema. The Hermes adapter plus `/hermes-config` endpoint is the most portable piece - it can be added alongside the cloud providers as opt-in "BYO local LLM" without touching auth. The shim, auth bypass, and launcher are too operator-specific to pull in as-is for a multi-user product.

View this fork on GitHub →

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

Commits in this thread

5 commits from luccast/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
08ff30ff Single-player local-only mode: SQLite backend, Hermes LLM adapter, local storage, auto-auth, hydration fix delnet144 2026-05-03 ↗ GitHub
c896d6a5 Add mike CLI launcher: start/stop/restart/status/logs delnet144 2026-05-03 ↗ GitHub
2b0e7504 Update README for single-player local-only mode delnet144 2026-05-03 ↗ GitHub
cb7595ef Default to Hermes/local-llm everywhere; expose hermes-config endpoint; hide API keys in local mode delnet144 2026-05-03 ↗ GitHub
915db44a Fix Hermes adapter: resolve local-llm placeholder to actual model, add logging and timeout delnet144 2026-05-03 ↗ 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-89.md from inside the repo you want the changes in.

⬇ Download capture-thread-89.md