Skip to content

This repository serves as the drafting and collaboration zone for schemas intended to be incorporated into the OriginVault Namespace. It provides a structured environment for defining, reviewing, and refining JSON-LD schemas before they are pushed to the main OriginVault schema registry.

License

Notifications You must be signed in to change notification settings

OriginVault/originvault-schema-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ OriginVault Schema Registry

OriginVault Logo

Type-safe, verifiable credential schemas for the decentralized creator economy

Schema Count QuickType Ready W3C VC 2.0 DIF Standards

πŸ“– Documentation β€’ πŸš€ Quick Start β€’ πŸ”§ QuickType Integration β€’ πŸ“‹ Schema Categories


πŸš€ Quick Start with QuickType

Generate Types in Any Language

# Install QuickType
npm install -g quicktype

# Generate TypeScript for all schemas
quicktype --src schemas/v1/ --lang typescript --out types/all-schemas.ts

# Generate Python for business workflows
quicktype --src schemas/v1/business/ --lang python --out types/business.py

# Generate Go for identity management
quicktype --src schemas/v1/identity/ --lang go --out types/identity.go

# Generate C# for trust systems
quicktype --src schemas/v1/trust/ --lang csharp --out types/Trust.cs

# Generate Java for payments
quicktype --src schemas/v1/payments/ --lang java --out types/Payments.java

# Generate Rust for platform services
quicktype --src schemas/v1/platform/ --lang rust --out types/platform.rs

Direct from OriginVault Registry

# Generate from hosted schemas
quicktype --src https://schemas.originvault.box/v1/business/ContractCredential.schema.json --lang typescript

# Generate entire category
quicktype --src https://schemas.originvault.box/v1/business/ --lang python --out business_types.py

🎯 Complete Platform Features

πŸ” Interactive Schema Explorer

  • Browse and search all 90+ schemas with advanced filtering
  • Real-time validation with detailed error messages
  • Category-based navigation (Identity, Business, Content, Trust, Platform)
  • Schema visualization with property details and examples

🌐 File Upload & Code Generation

  • Drag & drop interface for JSON Schema, TypeScript, or JSON files
  • Multi-language support (10+ languages including TypeScript, Python, Go, C#, Java, Rust)
  • Batch processing for multiple files simultaneously
  • ZIP download for all generated code
  • Real-time preview and validation

πŸ” Verifiable Credentials Suite

  • W3C VC validation against standards and custom schemas
  • Template generation for any credential type
  • Presentation verification with detailed security reports
  • JSON-LD context support for semantic web compatibility
  • 50+ pre-built credential schemas ready for production

πŸ“· C2PA Content Authenticity

  • C2PA manifest creation with cryptographic content hashing
  • Provenance chain tracking for derivative and transformed content
  • Content verification against original manifests and signatures
  • Authenticity assertions with creator and tool metadata
  • Standards compliance with Coalition for Content Provenance

πŸ›οΈ Trust Registry & DTC Integration

  • Decentralized trust management with DID-based identities
  • Endorsement system with weighted trust scores and reputation
  • Trust chain analysis and path finding algorithms
  • Authority-based revocation with governance controls
  • cheqd DTC integration for hierarchical trust management

πŸ”Œ API-First Architecture

  • RESTful APIs for all platform functionality
  • GraphQL endpoint with full schema introspection
  • Real-time validation and processing APIs
  • Batch processing endpoints for enterprise use
  • OpenAPI documentation with interactive testing

πŸš€ Getting Started:

# Start the complete platform
npm install && npm run build && npm run server

# Access all features at:
# - Web Interface: http://localhost:3001/
# - Schema Explorer: http://localhost:3001/explorer
# - QuickType Generator: http://localhost:3001/quicktype
# - VC Tools: http://localhost:3001/verifiable-credentials
# - GraphQL Playground: http://localhost:3001/api/graphql

πŸ“‹ Schema Categories

πŸ” Identity & Access Management (6 schemas)

Core identity and permission management

Schema Description QuickType Command
OriginVaultRootAuthority Platform root authority quicktype --src schemas/v1/identity/OriginVaultRootAuthority.schema.json --lang typescript
PersonCredential Individual identity verification quicktype --src schemas/v1/identity/PersonCredential.schema.json --lang python
OrganizationCredential Business entity verification quicktype --src schemas/v1/identity/OrganizationCredential.schema.json --lang go
VaultAccessCredential Vault permission management quicktype --src schemas/v1/identity/VaultAccessCredential.schema.json --lang csharp
AdminCredential Administrative privileges quicktype --src schemas/v1/identity/AdminCredential.schema.json --lang java
APIAccessCredential API access control quicktype --src schemas/v1/identity/APIAccessCredential.schema.json --lang rust

πŸ“‹ Business Workflow Automation (7 schemas)

Complete business process automation

Schema Description QuickType Command
ContractCredential Legal contract execution quicktype --src schemas/v1/business/ContractCredential.schema.json --lang typescript
EquityGrantCredential Equity compensation management quicktype --src schemas/v1/business/EquityGrantCredential.schema.json --lang python
WorkflowExecutionCredential Multi-step workflow tracking quicktype --src schemas/v1/business/WorkflowExecutionCredential.schema.json --lang go
VerificationReportCredential Third-party verification quicktype --src schemas/v1/business/VerificationReportCredential.schema.json --lang csharp
CustomerOnboardingCredential Customer setup automation quicktype --src schemas/v1/business/CustomerOnboardingCredential.schema.json --lang java
SustainabilityCredential Environmental impact tracking quicktype --src schemas/v1/business/SustainabilityCredential.schema.json --lang rust
RevocationService Credential revocation management quicktype --src schemas/v1/business/RevocationService.schema.json --lang typescript

🎨 Content & Creation Management (3 schemas)

Content authenticity and creation workflows

Schema Description QuickType Command
CreativeWorkCredential Content ownership and metadata quicktype --src schemas/v1/content/CreativeWorkCredential.schema.json --lang typescript
ContentAuthenticityCredential Content integrity verification quicktype --src schemas/v1/content/ContentAuthenticityCredential.schema.json --lang python
ContentAIPermissionCredential AI usage permissions quicktype --src schemas/v1/content/ContentAIPermissionCredential.schema.json --lang go

🀝 Trust & Verification Systems (2 schemas)

Trust networks and reputation systems

Schema Description QuickType Command
TrustedIssuerCredential Trusted credential issuers quicktype --src schemas/v1/trust/TrustedIssuerCredential.schema.json --lang csharp
ReputationCredential Reputation scoring and history quicktype --src schemas/v1/trust/ReputationCredential.schema.json --lang java

πŸ’° Payments & Economics (2 schemas)

Financial and economic interactions

Schema Description QuickType Command
PaymentCredential Payment verification and tracking quicktype --src schemas/v1/payments/PaymentCredential.schema.json --lang rust
StorageCredential Storage usage and billing quicktype --src schemas/v1/payments/StorageCredential.schema.json --lang typescript

πŸ”Œ Platform & Services (2 schemas)

Platform services and integrations

Schema Description QuickType Command
PluginEndorsementCredential Plugin verification and trust quicktype --src schemas/v1/platform/PluginEndorsementCredential.schema.json --lang python
GemCredential Platform reward and achievement system quicktype --src schemas/v1/platform/GemCredential.schema.json --lang go

πŸ’‘ Quick Examples

Business Contract Workflow

// Generate types: quicktype --src schemas/v1/business/ --lang typescript --out types/business.ts

import { 
  OrganizationCredential, 
  ContractCredential, 
  WorkflowExecutionCredential 
} from './types/business';

// Create organization
const orgCredential: OrganizationCredential = {
  "@context": ["https://www.w3.org/2018/credentials/v1"],
  "type": ["VerifiableCredential", "OrganizationCredential"],
  "issuer": "did:cheqd:mainnet:originvault",
  "issuanceDate": new Date().toISOString(),
  "credentialSubject": {
    "id": "did:cheqd:mainnet:acme-corp",
    "legalName": "Acme Corporation",
    "registrationNumber": "123456789"
  }
};

// Issue contract
const contractCredential: ContractCredential = {
  "@context": ["https://www.w3.org/2018/credentials/v1"],
  "type": ["VerifiableCredential", "ContractCredential"],
  "issuer": "did:cheqd:mainnet:originvault",
  "issuanceDate": new Date().toISOString(),
  "credentialSubject": {
    "id": "did:cheqd:mainnet:contract-456",
    "contractType": "ContentCreation",
    "parties": [orgCredential.credentialSubject.id, "did:cheqd:mainnet:creator-789"],
    "terms": "Exclusive content creation agreement...",
    "effectiveDate": new Date().toISOString(),
    "compensation": {
      "amount": 5000,
      "currency": "USD",
      "paymentSchedule": "monthly"
    }
  }
};

Python Implementation

# Generate types: quicktype --src schemas/v1/business/ --lang python --out types/business.py

from business_types import OrganizationCredential, ContractCredential
from datetime import datetime

# Create organization credential
org_credential = OrganizationCredential(
    context=["https://www.w3.org/2018/credentials/v1"],
    type=["VerifiableCredential", "OrganizationCredential"],
    issuer="did:cheqd:mainnet:originvault",
    issuance_date=datetime.now().isoformat(),
    credential_subject=OrganizationCredentialSubject(
        id="did:cheqd:mainnet:acme-corp",
        legal_name="Acme Corporation",
        registration_number="123456789"
    )
)

# Create contract credential
contract_credential = ContractCredential(
    context=["https://www.w3.org/2018/credentials/v1"],
    type=["VerifiableCredential", "ContractCredential"],
    issuer="did:cheqd:mainnet:originvault",
    issuance_date=datetime.now().isoformat(),
    credential_subject=ContractCredentialSubject(
        id="did:cheqd:mainnet:contract-456",
        contract_type="ContentCreation",
        parties=[org_credential.credential_subject.id, "did:cheqd:mainnet:creator-789"],
        terms="Exclusive content creation agreement...",
        effective_date=datetime.now().isoformat(),
        compensation=Compensation(
            amount=5000.0,
            currency="USD",
            payment_schedule="monthly"
        )
    )
)

Go Implementation

// Generate types: quicktype --src schemas/v1/business/ --lang go --out types/business.go

package main

import (
    "time"
    "./types"
)

func main() {
    // Create organization credential
    orgCredential := types.OrganizationCredential{
        Context: []string{"https://www.w3.org/2018/credentials/v1"},
        Type:    []string{"VerifiableCredential", "OrganizationCredential"},
        Issuer:  "did:cheqd:mainnet:originvault",
        IssuanceDate: time.Now(),
        CredentialSubject: types.OrganizationCredentialSubject{
            ID:                "did:cheqd:mainnet:acme-corp",
            LegalName:         "Acme Corporation",
            RegistrationNumber: "123456789",
        },
    }

    // Create contract credential
    contractCredential := types.ContractCredential{
        Context: []string{"https://www.w3.org/2018/credentials/v1"},
        Type:    []string{"VerifiableCredential", "ContractCredential"},
        Issuer:  "did:cheqd:mainnet:originvault",
        IssuanceDate: time.Now(),
        CredentialSubject: types.ContractCredentialSubject{
            ID:           "did:cheqd:mainnet:contract-456",
            ContractType: "ContentCreation",
            Parties: []string{
                orgCredential.CredentialSubject.ID,
                "did:cheqd:mainnet:creator-789",
            },
            Terms:        "Exclusive content creation agreement...",
            EffectiveDate: time.Now().Format(time.RFC3339),
            Compensation: &types.Compensation{
                Amount:          5000,
                Currency:        "USD",
                PaymentSchedule: "monthly",
            },
        },
  }
}

πŸ”§ Advanced QuickType Features

🌐 Web-Based QuickType Generator

NEW: Upload and convert your files directly in the browser!

Visit our QuickType page to:

  • Drag & drop your JSON Schema, TypeScript, or JSON files
  • Select target language from 10+ supported languages
  • Generate type-safe code instantly in your browser
  • Download individual files or get everything as a ZIP
  • Batch process multiple files at once
# Start the QuickType API server
npm install
npm run build
npm run server

# Visit http://localhost:3001/quicktype

API Endpoints:

  • POST /api/quicktype/generate-from-files - Generate code from uploaded files
  • POST /api/quicktype/download-zip - Download generated files as ZIP
  • POST /api/quicktype/validate-schema - Validate schemas

For full API documentation, see QuickType API Guide.

Batch Generation

# Generate types for all schemas
quicktype --src schemas/v1/ --lang typescript --out types/all-schemas.ts

# Generate for specific categories
quicktype --src schemas/v1/business/ --lang python --out types/business.py
quicktype --src schemas/v1/identity/ --lang go --out types/identity.go

Custom Options

# Generate with custom type names
quicktype \
  --src schemas/v1/business/ContractCredential.schema.json \
  --lang typescript \
  --out types/Contract.ts \
  --type-name Contract

# Generate union types
quicktype \
  --src schemas/v1/ \
  --lang typescript \
  --out types/AllCredentials.ts \
  --prefer-unions \
  --union-type-name Credential

URL Generation

# Generate directly from OriginVault schema registry
quicktype \
  --src https://schemas.originvault.box/v1/business/ContractCredential.schema.json \
  --lang typescript

# Generate entire category from URL
quicktype \
  --src https://schemas.originvault.box/v1/business/ \
  --lang python \
  --out business_types.py

πŸ“š Documentation

Implementation Guides

Architecture Documentation

Governance & Standards

Migration & Standards


🌟 Why OriginVault Schemas?

βœ… Production Ready

  • 22 production schemas powering real business workflows
  • W3C VC 2.0 compliant for maximum interoperability
  • Real-world examples tested with actual data

βœ… Developer Friendly

  • QuickType optimized for instant type generation
  • Multi-language support for any tech stack
  • Comprehensive documentation with examples

βœ… Business Focused

  • Complete workflows from identity to payment
  • Legal compliance built into schemas
  • Scalable architecture for enterprise adoption

βœ… Future Proof

  • Open standards for long-term compatibility
  • Extensible design for custom requirements
  • Active development with regular updates

πŸ“š Additional Resources

External Documentation

Community & Support


Ready to build type-safe verifiable business processes?

πŸš€ QuickType Integration Guide β€’ πŸ“‹ Business Implementation β€’ πŸ—οΈ Architecture

About

This repository serves as the drafting and collaboration zone for schemas intended to be incorporated into the OriginVault Namespace. It provides a structured environment for defining, reviewing, and refining JSON-LD schemas before they are pushed to the main OriginVault schema registry.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •