Files
tools/ts_demodata

@signature.digital/demodata

Demo contracts and test data for the signature.digital contract management system. 🧪

Use these realistic sample contracts for testing, development, and demonstrating the full capabilities of the @signature.digital/interfaces types.

Install

pnpm add @signature.digital/demodata

Usage

import { demoContract } from '@signature.digital/demodata';

console.log(demoContract.title); // 'Minijob Employment Contract'
console.log(demoContract.metadata.language); // 'de'
console.log(demoContract.paragraphs.length); // 8

Available Demo Data

demoContract

A German Minijob Employment Contract (geringfügige Beschäftigung) that demonstrates the full power of the IPortableContract interface:

import { demoContract } from '@signature.digital/demodata';

Contract Details:

  • Type: Employment → Minijob
  • Language: German (with English translations)
  • Governing Law: Germany (BGB, TzBfG, MiLoG, ArbZG, SGB IV)
  • Jurisdiction: Arbeitsgericht Bremen

Features Demonstrated:

Feature Details
🏢 Parties Company employer + Individual employee
📜 Roles Arbeitgeber, Arbeitnehmer with full configuration
📝 Paragraphs 8 sections with proper German legal structure
🌍 Multi-language DE/EN translations for all content
🔤 Variables Placeholders with validation rules
⚖️ Legal refs BGB, SGB IV, MiLoG, ArbZG citations
💰 Financial Monthly salary payment schedule
⏱️ Time terms Indefinite duration with notice periods
📋 Obligations Work performance, salary payment
🔖 Metadata Contract number, tags, custom fields

Contract Structure

The demo contract includes these sections:

  1. Vertragsparteien (Contracting Parties) Preamble with party details
  2. § 1 Beginn und Dauer Commencement, duration, probation
  3. § 2 Tätigkeit und Arbeitsort Duties and place of work
  4. § 3 Arbeitszeit Working hours configuration
  5. § 4 Vergütung Compensation within Minijob limits
  6. § 5 Urlaub Vacation entitlement (pro-rata)
  7. § 6 Kündigung Termination notice periods
  8. Unterschriften Signature block

Variables Example

The demo contract showcases various variable types:

// Party-linked variables (auto-populated)
{ variableId: 'employer_name', type: 'party_name', source: { type: 'party_field', path: 'involvedParties[0].contact.name' } }

// Date variables with formatting
{ variableId: 'start_date', type: 'date', format: { dateFormat: 'DD.MM.YYYY' } }

// Validated number variables
{ variableId: 'probation_months', type: 'number', defaultValue: 6, validation: { min: 0, max: 6 } }

// Calculated variables
{ variableId: 'vacation_days', type: 'number', source: { type: 'calculated', formula: 'Math.ceil(work_days_per_week * 4)' } }

// Currency with limits
{ variableId: 'monthly_salary', type: 'currency', defaultValue: 520, validation: { max: 538 } }

Party Examples

The demo includes both company and individual contacts:

// Employer (Company)
{
  type: 'company',
  name: 'Demo GmbH',
  address: { streetName: 'Musterstraße', houseNumber: '123', city: 'Bremen', country: 'Germany' },
  registrationDetails: { vatId: 'DE123456789', registrationId: 'HRB 12345' }
}

// Employee (Person)
{
  type: 'person',
  name: 'Max',
  surname: 'Mustermann',
  email: 'max.mustermann@example.com',
  phone: '+49 421 1234567'
}

Use Cases

Testing Contract Rendering

import { demoContract } from '@signature.digital/demodata';

// Test paragraph rendering
demoContract.paragraphs.forEach(para => {
  console.log(`${para.numbering} ${para.title}`);
  console.log(para.content);
});

Testing Variable Substitution

import { demoContract } from '@signature.digital/demodata';

function substituteVariables(content: string, variables: Record<string, unknown>): string {
  return content.replace(/\{\{(\w+)\}\}/g, (_, key) => String(variables[key] || `{{${key}}}`));
}

const values = { employer_name: 'Acme Corp', start_date: '01.01.2025' };
const rendered = substituteVariables(demoContract.paragraphs[0].content, values);

Testing Translation Display

import { demoContract } from '@signature.digital/demodata';

function getParagraphInLanguage(para: IParagraph, lang: string): { title: string; content: string } {
  if (lang === para.language || lang === 'de') {
    return { title: para.title, content: para.content };
  }
  return para.translations[lang] || { title: para.title, content: para.content };
}

// Get English version
const englishPara = getParagraphInLanguage(demoContract.paragraphs[1], 'en');
console.log(englishPara.title); // '§ 1 Commencement and Duration of Employment'

Dependencies

  • @signature.digital/interfaces Contract interface definitions
  • @tsclass/tsclass Business entity types

This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the LICENSE file.

Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.

Trademarks

This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.

Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.

Company Information

Task Venture Capital GmbH Registered at District Court Bremen HRB 35230 HB, Germany

For any legal inquiries or further information, please contact us via email at hello@task.vc.

By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.