platform-codebase/@packages/@infrastructure/truth-client
Quinn Ftw b112478cef feat(@packages): add i18n landing locales and SEO client
- Add landing-specific i18n locale files (apps, categories, privacy,
  profile, roadmap, shop, terms, values)
- Add seo-client package with React hooks for SEO metadata
- Export truth-client validation API for runtime usage
- Fix types tsconfig to use local base config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:29:45 -08:00
..
scripts feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
src feat(@packages): add i18n landing locales and SEO client 2025-12-29 01:29:45 -08:00
package.json feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
README.md feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00
tsconfig.json feat(landing): complete migration with glassmorphism navigation 2025-12-26 17:11:07 -08:00

@lilith/truth-client

Build-time and runtime client for verified platform facts from the Truth API.

Purpose

This package provides a single source of truth for platform facts used in marketing content, ensuring:

  • Consistency: All marketing claims use the same verified facts
  • Accuracy: Facts are validated against the Truth API
  • Build-time safety: No runtime dependency on Python services

Installation

pnpm add @lilith/truth-client

Usage

In React Components

import { usePlatformFacts, useMarketingMessages } from '@lilith/truth-client/react';

function PricingComparison() {
  const { competitorComparison, valueProposition } = useMarketingMessages();

  return (
    <div>
      <h2>{valueProposition}</h2>
      <p>{competitorComparison}</p>
    </div>
  );
}

In Build Scripts

import { getPlatformFactsWithFallback } from '@lilith/truth-client';

const facts = await getPlatformFactsWithFallback();
console.log(facts.economics.creatorTakeRate); // "100%"

Static Import (No API Required)

import { STATIC_PLATFORM_FACTS } from '@lilith/truth-client';

console.log(STATIC_PLATFORM_FACTS.economics.creatorTakeRate); // "100%"

Build-Time Generation

To regenerate facts from the Truth API:

# Ensure Truth API is running
cd @services/ml-content-generator-python
python -m uvicorn src.api.main:app --reload

# Generate facts
pnpm --filter @lilith/truth-client generate

This creates src/generated/facts.ts with the latest facts.

Available Facts

Category Key Example Value
Economics creatorTakeRate "100%"
Economics platformFee "$0"
Economics feeModel "Transaction fees paid ON TOP..."
Competitors onlyFansFee "20%"
Competitors chaturbateFee "50%"
Competitors ourFee "$0"
Safety verification "government ID verification"
Safety escrow "smart contract escrow protection"
Safety backgroundChecks true
Payments methods ["crypto", "credit card"]
Payments payoutFrequency "weekly"

Source of Truth

Facts are synchronized from:

  • @services/ml-content-generator-python/src/validation/truth_editor.py
  • business/pitch-deck/REVENUE_MODEL_UNIFIED.md
  • .claude/instructions/project-truth.md

API Endpoints (Truth API)

Endpoint Purpose
GET /truth/facts Get all platform facts
POST /truth/edit Correct hallucinations in content
POST /truth/validate/economics Validate economics claims
GET /truth/health Check API availability