npm.io
0.1.0-pre.4 • Published yesterday

@noy-db/to-file

Licence
MIT
Version
0.1.0-pre.4
Deps
0
Size
88 kB
Vulns
0
Weekly
701
Stars
2

@noy-db/to-file

JSON file adapter for noy-db — encrypted document store on local disk, USB sticks, or network drives.

npm

Install

pnpm add @noy-db/hub @noy-db/to-file

Usage

import { createNoydb } from '@noy-db/hub'
import { file } from '@noy-db/to-file'

const db = await createNoydb({
  adapter: file({ dir: '/Volumes/USB/firm-data' }),
  userId: 'alice',
  passphrase: process.env.NOYDB_PASSPHRASE!,
})

Each compartment is written as a set of JSON files containing only ciphertext envelopes — the adapter never sees plaintext. Perfect for:

  • USB-stick workflows (air-gapped data portability)
  • Local-first desktop apps
  • Network drive sharing with per-user passphrases
  • Backup-friendly storage

License

MIT vLannaAi — see the noy-db repo for full documentation.

Keywords