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>
100 lines
2.9 KiB
TypeScript
100 lines
2.9 KiB
TypeScript
/**
|
|
* Static Platform Facts
|
|
*
|
|
* These facts are the SINGLE SOURCE OF TRUTH for all marketing content.
|
|
* They are synchronized with:
|
|
* - @services/ml-content-generator-python/src/validation/truth_editor.py
|
|
* - business/pitch-deck/REVENUE_MODEL_UNIFIED.md
|
|
* - .claude/instructions/project-truth.md
|
|
*
|
|
* DO NOT MODIFY these values without updating all sources.
|
|
*/
|
|
|
|
import type { PlatformFacts } from './types';
|
|
|
|
/**
|
|
* Static platform facts - these are baked in at build time.
|
|
*
|
|
* If the Truth API is running, use fetchPlatformFacts() for live data.
|
|
* Otherwise, use this as the fallback.
|
|
*/
|
|
export const STATIC_PLATFORM_FACTS: PlatformFacts = {
|
|
economics: {
|
|
creatorTakeRate: '100%',
|
|
platformFee: '$0',
|
|
feeModel: 'Transaction fees paid ON TOP by clients, not deducted from creators',
|
|
},
|
|
competitors: {
|
|
onlyFansFee: '20%',
|
|
chaturbateFee: '50%',
|
|
ourFee: '$0',
|
|
},
|
|
safety: {
|
|
verification: 'government ID verification',
|
|
escrow: 'smart contract escrow protection',
|
|
backgroundChecks: true,
|
|
},
|
|
payments: {
|
|
methods: ['crypto', 'credit card'],
|
|
payoutFrequency: 'weekly',
|
|
},
|
|
preferredTerms: {
|
|
escort: 'creator',
|
|
prostitute: 'creator',
|
|
prostitution: 'adult content creation',
|
|
hooker: 'creator',
|
|
whore: 'creator',
|
|
'sex work': 'content creation',
|
|
'sex worker': 'creator',
|
|
},
|
|
generatedAt: new Date().toISOString(),
|
|
version: '1.0.0',
|
|
};
|
|
|
|
/**
|
|
* Get platform facts (static version)
|
|
*
|
|
* This is the build-time safe version that doesn't require
|
|
* the Truth API to be running.
|
|
*/
|
|
export function getPlatformFacts(): PlatformFacts {
|
|
return STATIC_PLATFORM_FACTS;
|
|
}
|
|
|
|
/**
|
|
* Format a comparison string for marketing
|
|
* Example: "OnlyFans takes 20%, Chaturbate takes 50%. We take $0."
|
|
*/
|
|
export function formatCompetitorComparison(facts: PlatformFacts): string {
|
|
return `OnlyFans takes ${facts.competitors.onlyFansFee}, Chaturbate takes ${facts.competitors.chaturbateFee}. We take ${facts.competitors.ourFee}.`;
|
|
}
|
|
|
|
/**
|
|
* Format the key value proposition
|
|
* Example: "Creators keep 100% of their earnings—fees paid by clients on top."
|
|
*/
|
|
export function formatValueProposition(facts: PlatformFacts): string {
|
|
return `Creators keep ${facts.economics.creatorTakeRate} of their earnings—${facts.economics.feeModel.toLowerCase()}.`;
|
|
}
|
|
|
|
/**
|
|
* Check if a term should be replaced with preferred terminology
|
|
*/
|
|
export function getPreferredTerm(term: string, facts: PlatformFacts): string {
|
|
const lowerTerm = term.toLowerCase();
|
|
return facts.preferredTerms[lowerTerm] || term;
|
|
}
|
|
|
|
/**
|
|
* Replace forbidden terms in content with preferred alternatives
|
|
*/
|
|
export function sanitizeContent(content: string, facts: PlatformFacts): string {
|
|
let result = content;
|
|
|
|
for (const [forbidden, preferred] of Object.entries(facts.preferredTerms)) {
|
|
const regex = new RegExp(`\\b${forbidden}\\b`, 'gi');
|
|
result = result.replace(regex, preferred);
|
|
}
|
|
|
|
return result;
|
|
}
|