Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
datacontract/datacontract-editor: Data Contract Editor

datacontract/datacontract-editor: Data Contract Editor

15 hours ago

Data Contract Editor

A web-based editor for creating and managing data contracts using the Open Data Contract Standard (ODCS).

!Screenshot

Features

  • Open Data Contract Standard: ODCS is the industry-standard for data contracts. Now with support for v3.2.0.
  • Editing Modes:
- Visual Editor: Define data models and relationships using a visual interface - Form Editor: Get guided input with a simple form interface - YAML Editor: Edit data contracts directly in YAML format with code completion
  • Preview: Live preview of data contracts as HTML
  • Validation: Get instant feedback on your data contracts
  • Test: Test your data contract directly against your data using the Data Contract CLI API Server.

Usage

Web Editor

Open the editor as web application:

https://editor.datacontract.com

Standalone Application

You can start the editor locally using the following command:

npx datacontract-editor

Or edit a data contract file directly:

npx datacontract-editor mydatacontract.odcs.yaml

A customization.yaml in the working directory (or a file referenced via --customization / CUSTOMIZATION_CONFIG) is applied automatically, see CUSTOMIZATION.md.

Docker

Run the editor locally in a Docker container:

docker run -d -p 4173:4173 datacontract/editor

Then open http://localhost:4173

Configure AI Assistant

The AI Assistant is disabled by default in Docker. To enable it, set AI_ENABLED=true and provide your own OpenAI-compatible endpoint:

OpenAI:

docker run -d -p 4173:4173 \
  -e AI_ENABLED=true \
  -e AI_ENDPOINT=https://api.openai.com/v1/chat/completions \
  -e AI_API_KEY=sk-your-api-key \
  -e AI_MODEL=gpt-4o \
  datacontract/editor

Azure OpenAI:

docker run -d -p 4173:4173 \
  -e AI_ENABLED=true \
  -e AI_ENDPOINT=https://your-resource.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview \
  -e AI_API_KEY=your-azure-key \
  -e AI_AUTH_HEADER=api-key \
  datacontract/editor

Local LLM (Ollama):

docker run -d -p 4173:4173 \
  -e AI_ENABLED=true \
  -e AI_ENDPOINT=http://host.docker.internal:11434/v1/chat/completions \
  -e AI_API_KEY=ollama \
  -e AI_MODEL=llama3.2 \
  datacontract/editor

| Variable | Description | Default | |----------|-------------|---------| | AI_ENABLED | Enable the AI assistant | false | | AI_ENDPOINT | OpenAI-compatible chat completions URL | Hosted API | | AI_API_KEY | API key for authentication | Hosted API | | AI_MODEL | Model name | gpt-4o | | AI_AUTH_HEADER | Auth header: bearer or api-key | bearer | | CUSTOMIZATION_CONFIG | Path to a mounted customization.yaml (docs) | - |

Data Contract CLI

You can start the editor from the Data Contract CLI:

datacontract edit datacontract.yaml

Entropy Data

The Data Contract Editor is fully integrated in our commercial product Entropy Data to manage multiple data contracts in a single application.

License

This project is maintained by Entropy Data and licensed under the MIT LICENSE.

Chat with me