An in-memory JSON file-based implementation of the CrudInterface for brackets-manager.js. Stable version 1.0.3 uses node-json-db to persist tournament brackets data to a JSON file. Designed primarily for testing the brackets-manager.js library where a simple file-based storage is sufficient. Requires brackets-model ^1.7.0 as a peer dependency. Ships TypeScript type definitions. Low release cadence; not intended for production use.
npm install brackets-json-dbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate the JsonDatabase with config and use it as storage for BracketsManager.
Use a proper database (e.g., PostgreSQL via brackets-db) for multi-process scenarios.
Avoid using JsonDatabase for large datasets; consider a database-backed storage.
Use: new JsonDatabase({ filePath: './data.json' })Use dynamic import or set 'type': 'module' in package.json. Instead of require('brackets-json-db'), use import('brackets-json-db').then(mod => ...).Set autoSave: false to disable all automatic saves and manage writes manually.
Use an absolute path or resolve via process.cwd() and path.resolve() to be explicit.
Ensure each JsonDatabase instance uses a unique file path.
Run 'npm install brackets-json-db' and ensure your project uses ESM (type: module in package.json) or dynamic import.
Use 'import { JsonDatabase } from 'brackets-json-db'' instead of 'import JsonDatabase from ...'.Change 'new JsonDatabase('./data.json')' to 'new JsonDatabase({ filePath: './data.json' })'.Run 'npm install brackets-model@^1.7.0' and ensure it is in node_modules.