Skip to content

db: add SQLite backend for mobile/embedded environments #154

@melvincarvalho

Description

@melvincarvalho

MongoDB works great for servers but won't run on mobile (Termux/Android, iOS) or embedded environments.

A SQLite backend for the /db/ route would provide the same JSON-LD document storage with:

  • No daemon process required
  • Single file storage
  • Works on mobile via better-sqlite3 or sql.js (pure WASM)

The storage API in src/db/store.js (findOne, upsertOne, deleteOne, listByPrefix) stays the same — just a different backend implementation.

Could auto-detect: use MongoDB if --mongo is set, fall back to SQLite otherwise via --db-sqlite or similar flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions