Introduce Data Storage API, Pipelines and Drag & Drop#13
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a data storage API for ADAM by creating a pluggable storage system that supports local, server, and ADAM storage methods for tool and schema registries.
- Replaces local storage synchronization with a unified P2P API supporting multiple storage backends
- Implements reactive data synchronization between registries and storage providers
- Adds HTTPS file server and ADAM integration for distributed data persistence
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tools/registries/constants.ts | Defines predicate constants for RDF-style storage |
| src/tools/registries/ToolRegistry.tsx | Replaces local storage with P2P API and adds reactive sync components |
| src/tools/registries/SchemaRegistry.tsx | Integrates P2P API with reactive sync for schema persistence |
| src/tools/GraphPage.tsx | Adds storage method dropdown and dynamic API client initialization |
| src/api/server.ts | Implements server-based storage API client |
| src/api/local.ts | Implements localStorage-based storage API client |
| src/api/CRUD.ts | Defines core CRUD API types and P2P_API state |
| src/ad4m/useADAM.tsx | Implements ADAM storage API client using AD4M protocol |
| package.json | Adds express dependency and fileserver script |
| fileserver.ts | Implements HTTPS file server for server storage backend |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| .get({ source, predicate: SCHEMA_PREDICATE }) | ||
| .then(async (response: object) => { | ||
| if (!response) return | ||
| const { schema, label, description } = response as any |
There was a problem hiding this comment.
Using as any bypasses TypeScript type checking. Define a proper interface for the expected response structure to ensure type safety.
| @@ -0,0 +1,184 @@ | |||
| import express, { Request } from 'express' | |||
| import fs from 'fs' | |||
| import https from 'https' | |||
There was a problem hiding this comment.
The HTTPS server uses hardcoded certificate paths that may not exist in all environments. Consider adding error handling for missing certificate files or making paths configurable through environment variables.
…sion utilities, and update related components
No description provided.