Skip to content

Enterprise: StoreBackend ABC + Turso/Supabase backends #17

Description

@itdove

Description

Optional centralized DB backends for teams that need real-time sharing without git sync delay.

StoreBackend ABC (extends #3)

Already defined in #3. This issue adds new implementations.

New Backends

Turso (libSQL)

  • SQLite-compatible API — existing queries work with minimal changes
  • FTS5 preserved
  • Native float32 vectors for hybrid search
  • Config: `store.type: "turso"`, `store.url`, `store.auth_token_env`

Supabase (Postgres + RLS)

  • Row-level security at DB level — MCP server carries no ACL logic
  • `pgvector` for vector search
  • `pg_tsvector` for FTS
  • Config: `store.type: "supabase"`, `store.url_env`, `store.anon_key_env`

AlloyDB / Cloud SQL

  • Google Cloud managed Postgres
  • `pgvector` support
  • Pairs with Vertex AI embeddings

Data Migration

lore migrate --to turso|supabase
→ export all entries from local SQLite
→ create schema on remote backend
→ import entries
→ update config to point to new backend
→ local SQLite becomes offline fallback

Local SQLite Stays

Always available as offline fallback. When centralized DB is configured:

  • Writes go to centralized DB
  • Local SQLite syncs periodically for offline access
  • If centralized DB unreachable → fall back to local

Acceptance

  • Turso backend implements StoreBackend ABC
  • Supabase backend implements StoreBackend ABC
  • `lore migrate --to turso|supabase` migrates data
  • Local SQLite works as offline fallback
  • `lore init` backend selector works

Dependencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:5-centralized-dbPhase 5 — Enterprise: Centralized DBsize:LLarge — 2-3 days

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions