Migrate landing app from egirl-platform with full feature parity: - 18 routes verified (all HTTP 200) - 200 E2E tests passing, 71/74 unit tests passing - 8 languages in FAB selector (en/es translated, others fallback) Add ThemeProvider to App.tsx for styled-components theme context. Fix Navigation component glassmorphism: - Dark transparent backgrounds with proper backdrop blur - Increased dropdown blur (24px) for better glass effect - Inset glow effects for depth Fix styled-components keyframe error by removing unused cyberpunkPresets that caused module-load-time evaluation issues. Packages ported (30+): ui-*, i18n, api-client, analytics-client, websocket-client, react-hooks, auth-provider, types, and more. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
99 lines
2.6 KiB
Markdown
99 lines
2.6 KiB
Markdown
# @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
|
|
|
|
```bash
|
|
pnpm add @lilith/truth-client
|
|
```
|
|
|
|
## Usage
|
|
|
|
### In React Components
|
|
|
|
```typescript
|
|
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
|
|
|
|
```typescript
|
|
import { getPlatformFactsWithFallback } from '@lilith/truth-client';
|
|
|
|
const facts = await getPlatformFactsWithFallback();
|
|
console.log(facts.economics.creatorTakeRate); // "100%"
|
|
```
|
|
|
|
### Static Import (No API Required)
|
|
|
|
```typescript
|
|
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:
|
|
|
|
```bash
|
|
# 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 |
|