brainy/examples
David Snelling 755b1a6fc1 **feat: add browser-compatible exports and define BrainyData interface**
### Changes:
- Created `examples/browser_compatible_exports.ts`:
  - Introduced browser-friendly exports with polyfill for `Buffer` in browser environments.
  - Implemented shims for Node.js modules (`fs`, `util`, and `path`) to avoid compatibility issues.
  - Exported browser-compatible types and utilities: `BrainyData`, `NounType`, `VerbType`, graph types, core types, distance functions, embedding utilities, and storage adapters.
  - Explicitly excluded Node.js/CLI-specific parts to focus on browser compatibility.
- Added `src/types/brainyDataInterface.ts`:
  - Defined `BrainyDataInterface` to break the circular dependency between `brainyData.ts` and `serverSearchAugmentations.ts`.
  - Provided methods for managing nodes, relationships, initialization, search, and adding vector data with metadata.

### Purpose:
- Enhanced the codebase to support browser environments by introducing browser-specific exports and avoiding Node.js dependencies.
- Established clearer separation of concerns and modularity by introducing the `BrainyDataInterface` for dependency management, improving maintainability and flexibility.
2025-06-19 15:00:41 -07:00
..
browser_compatible_exports.ts **feat: add browser-compatible exports and define BrainyData interface** 2025-06-19 15:00:41 -07:00
demo.html **feat: refine README and enhance embedding workflows** 2025-06-19 15:00:08 -07:00