refactor: migrate TrumpSignal to TypeScript monorepo and Pages Router
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import type { Metadata } from 'next'
|
||||
import AnalyticsPageClient from '@/screens/analytics/AnalyticsPageClient'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
async function generateMetadata(): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
const title = isZh ? '交易分析与表现' : 'Trading Analytics & Performance'
|
||||
const description = isZh
|
||||
? '查看胜率、最大回撤、平均持仓时间、信号准确率和历史交易表现,评估 Trump Alpha 的真实执行质量。'
|
||||
: 'Review win rate, drawdown, average hold time, signal accuracy, and historical trade performance to evaluate live execution quality.'
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
openGraph: { title, description },
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/analytics`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/analytics`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default function AnalyticsPage() {
|
||||
return (
|
||||
<>
|
||||
<Breadcrumbs items={[{ name: 'Analytics', path: '/en/analytics' }]} />
|
||||
<AnalyticsPageClient />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: await generateMetadata() } }
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Archive is legacy/test data only — not part of the live signal stack.
|
||||
// noindex keeps it out of search results (duplicate/thin content risk)
|
||||
// while keeping it accessible to logged-in users for inspection.
|
||||
import type { Metadata } from 'next'
|
||||
import { type PostListResponse } from '@/lib/api'
|
||||
import { getPosts } from '@/lib/api'
|
||||
import { buildArchiveFallbackResponse, getInitialPostPage } from '@/lib/postPage'
|
||||
import ArchivePageClient from '@/screens/archive/ArchivePageClient'
|
||||
|
||||
const metadata: Metadata = {
|
||||
robots: { index: false, follow: false },
|
||||
}
|
||||
|
||||
export default function ArchivePage({ initialData }: Awaited<ReturnType<typeof loadData>>) {
|
||||
return <ArchivePageClient initialData={initialData} />
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
const initialData: PostListResponse | null = await getInitialPostPage(30, 1, {
|
||||
filters: { archiveOnly: true },
|
||||
legacyFallback: async () => {
|
||||
// Old backend (no /posts-paged archive_only): /posts caps at 500 per
|
||||
// page, so a single page only sees the latest 500 posts globally — older
|
||||
// archive rows get buried under fresh truth posts and silently dropped.
|
||||
// Page through a few windows so archive coverage isn't truncated.
|
||||
const MAX_PAGES = 4 // up to 2000 most-recent posts scanned for archive rows
|
||||
const collected: Awaited<ReturnType<typeof getPosts>> = []
|
||||
for (let p = 1; p <= MAX_PAGES; p++) {
|
||||
const batch = await getPosts(500, p).catch(() => null)
|
||||
if (!batch || batch.length === 0) break
|
||||
collected.push(...batch)
|
||||
if (batch.length < 500) break // last page reached
|
||||
}
|
||||
return collected.length ? buildArchiveFallbackResponse(collected, 1, 30) : null
|
||||
},
|
||||
})
|
||||
|
||||
return { initialData }
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
context.res.setHeader('Cache-Control', 'public, s-maxage=30, stale-while-revalidate=60')
|
||||
return { props: { ...(await loadData()), seo: metadata } }
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function Redirect() {
|
||||
return null
|
||||
}
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async ({ params }) =>
|
||||
params?.locale !== 'en'
|
||||
? { notFound: true }
|
||||
: { redirect: { destination: '/en/macro', permanent: true } }
|
||||
@@ -0,0 +1,530 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
interface CaseStudy {
|
||||
id: string
|
||||
date: string
|
||||
source: string
|
||||
title: string
|
||||
summary: string
|
||||
signal: 'LONG' | 'SHORT' | 'DIVERGENCE'
|
||||
asset: string
|
||||
priceImpact: string
|
||||
impactWindow: string
|
||||
detail: string
|
||||
evidence: string
|
||||
externalUrl?: string
|
||||
}
|
||||
|
||||
type CaseStudiesCopy = {
|
||||
title: string
|
||||
description: string
|
||||
keywords: string[]
|
||||
ogTitle: string
|
||||
ogDescription: string
|
||||
heroTitle: string
|
||||
heroSubtitle: string
|
||||
intro: string
|
||||
statAsset: string
|
||||
statImpact: string
|
||||
statWindow: string
|
||||
evidenceLabel: string
|
||||
footer: string
|
||||
footerMethodology: string
|
||||
footerGlossary: string
|
||||
cases: CaseStudy[]
|
||||
}
|
||||
|
||||
function getCopy(locale: string): CaseStudiesCopy {
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
if (isZh) {
|
||||
return {
|
||||
title: '案例研究 - Trump Alpha',
|
||||
description:
|
||||
'整理 Trump Truth Social 帖子如何影响比特币与加密市场的公开案例,包括战略储备公告、链上大额抢跑交易、风险偏好切换以及 KOL 言行偏离样本。',
|
||||
keywords: [
|
||||
'Trump 加密市场影响',
|
||||
'Truth Social 比特币',
|
||||
'Trump 帖子行情',
|
||||
'加密市场案例研究',
|
||||
'KOL 言行偏离案例',
|
||||
'BTC 底部案例',
|
||||
],
|
||||
ogTitle: 'Case Studies | Trump Alpha',
|
||||
ogDescription: '记录过往真正推动市场的帖子、仓位和链上证据,解释这些信号为什么值得跟踪。',
|
||||
heroTitle: '案例研究',
|
||||
heroSubtitle: '把历史上真正推动市场的帖子、仓位和价格反应摊开来看',
|
||||
intro:
|
||||
'这不是收益展示页,而是证据页。每个案例都尽量回答三个问题:发生了什么、市场怎么动、为什么这件事支持某个信号引擎的存在。',
|
||||
statAsset: '资产',
|
||||
statImpact: '价格影响',
|
||||
statWindow: '观察窗口',
|
||||
evidenceLabel: '证据',
|
||||
footer: '这些案例用于说明信号背后的历史依据,不构成前瞻性收益承诺。',
|
||||
footerMethodology: '方法论',
|
||||
footerGlossary: '术语表',
|
||||
cases: [
|
||||
{
|
||||
id: 'strategic-reserve-2025',
|
||||
date: '2025 年 3 月 2 日',
|
||||
source: 'Trump Truth Social',
|
||||
title: '美国“战略加密储备”表态',
|
||||
summary: 'Trump 在 Truth Social 上确认美国战略加密储备将涵盖 BTC、ETH、SOL、XRP 和 ADA。',
|
||||
signal: 'LONG',
|
||||
asset: 'BTC / ETH',
|
||||
priceImpact: 'BTC +8.2%,ETH +10%+',
|
||||
impactWindow: '24 小时',
|
||||
detail:
|
||||
'这条帖子之所以重要,不只是因为点名了多个资产,而是因为它把“政府政策支持”从模糊口风变成了明确承诺。Trump Alpha 的语义引擎会把这种带有具体资产清单和国家层面措辞的内容识别为高置信度 LONG 事件。',
|
||||
evidence:
|
||||
'CNBC 和 Al Jazeera 均报道了该消息后的市场反应。链上和交易所数据也出现了明显的动量资金流入。',
|
||||
externalUrl:
|
||||
'https://www.cnbc.com/2025/03/02/trump-announces-strategic-crypto-reserve-including-bitcoin-solana-xrp-and-more.html',
|
||||
},
|
||||
{
|
||||
id: 'whale-6m-perp',
|
||||
date: '2025 年 3 月',
|
||||
source: '链上 / Truth Social',
|
||||
title: '战略储备帖子前后出现 680 万美元抢跑收益',
|
||||
summary:
|
||||
'一只匿名地址在战略储备帖子发布前后快速建立 50 倍 BTC/ETH 杠杆仓位,并在当天平仓,获利约 680 万美元。',
|
||||
signal: 'LONG',
|
||||
asset: 'BTC',
|
||||
priceImpact: '+680 万美元',
|
||||
impactWindow: '当日',
|
||||
detail:
|
||||
'这个案例说明了两件事:第一,Trump 帖子确实能形成足够大的短线价格冲击;第二,在这种事件中,反应速度本身就是边际优势。无论这笔交易是抢跑还是极快的自动化反应,它都证明了“帖子 -> 交易 -> 盈亏”链条是真实存在的。',
|
||||
evidence:
|
||||
'Raw Story / NewsBreak 对这笔交易做了记录,TIME 也提到相关监管层面的质疑与讨论。',
|
||||
externalUrl:
|
||||
'https://www.newsbreak.com/raw-story-2096750/4286876592634-that-s-the-maga-playbook-crypto-trade-made-moments-before-trump-post-raises-eyebrows',
|
||||
},
|
||||
{
|
||||
id: 'tariff-china-2025',
|
||||
date: '2025 年 4 月',
|
||||
source: 'Trump Truth Social',
|
||||
title: '关税升级帖子引发风险偏好下移',
|
||||
summary: 'Trump 发文谈及对中国加征大规模关税,这类表态通常被市场解读为短线 risk-off。',
|
||||
signal: 'SHORT',
|
||||
asset: 'BTC',
|
||||
priceImpact: 'BTC -4.1%',
|
||||
impactWindow: '4 小时',
|
||||
detail:
|
||||
'并不是每条 Trump 帖子都偏利多。带有贸易摩擦、关税升级、监管收紧或避险语义的内容,往往会压缩风险资产偏好。这个案例支持了信号系统中 SHORT 方向存在的必要性。',
|
||||
evidence:
|
||||
'CoinDesk 曾整理过多次 Trump 发言影响 BTC 的案例,这次关税语境下的风险偏好回落与其历史模式一致。',
|
||||
externalUrl:
|
||||
'https://www.coindesk.com/markets/2026/04/20/five-times-president-trump-made-a-statement-that-moved-bitcoin-and-why-it-might-happen-again-this-week',
|
||||
},
|
||||
{
|
||||
id: 'kol-divergence-example',
|
||||
date: '示意型复合案例',
|
||||
source: 'KOL 文章 + 链上地址',
|
||||
title: '公开看多 ETH,但钱包在减仓',
|
||||
summary:
|
||||
'某位被追踪的 KOL 发布看多 ETH 的长文,随后 5 天内其钱包减少约 18 万美元 ETH 仓位,构成典型言行偏离。',
|
||||
signal: 'DIVERGENCE',
|
||||
asset: 'ETH',
|
||||
priceImpact: 'N/A',
|
||||
impactWindow: '±7 天',
|
||||
detail:
|
||||
'这个案例不是在讲单条帖子多会拉盘,而是在讲“公开叙事”和“真实仓位”可能不是一回事。对于研究型用户,这类偏离通常比单纯看多或看空更有信息增量。',
|
||||
evidence:
|
||||
'言行偏离的判定逻辑来自平台内部交叉信号系统,方法在 Methodology 页面有完整说明。',
|
||||
},
|
||||
{
|
||||
id: 'btc-bottom-nov-2022',
|
||||
date: '2022 年 11 月',
|
||||
source: '历史 BTC 周期底部参考',
|
||||
title: 'FTX 崩盘后的 1.55 万美元区域',
|
||||
summary:
|
||||
'FTX 事件后 BTC 跌入约 1.55 万美元区域,随后在 18 个月内回升至 6.9 万美元附近。这是 BTC 周期底部系统试图捕捉的环境类型。',
|
||||
signal: 'LONG',
|
||||
asset: 'BTC',
|
||||
priceImpact: '+345%',
|
||||
impactWindow: '18 个月',
|
||||
detail:
|
||||
'当前线上 BTC 系统并不是去回放旧版链上触发器,而是用 AHR999、200 周均线和 Pi Cycle Bottom 去逼近同一种市场结构:深度杀估值、长期趋势支撑和长期情绪出清同时出现。',
|
||||
evidence: '公开历史行情和长期图表都把 FTX 洗盘区间视为该轮熊市的底部核心区域。',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: 'Case Studies — Documented Trump Posts That Moved Crypto',
|
||||
description:
|
||||
'Documented cases where Trump Truth Social posts, KOL positioning, or macro-bottom conditions moved Bitcoin and crypto markets. Includes price impact, timing, and evidence.',
|
||||
keywords: [
|
||||
'Trump crypto market impact',
|
||||
'Trump Truth Social Bitcoin',
|
||||
'crypto market moving events',
|
||||
'Trump BTC trade case study',
|
||||
'KOL divergence example',
|
||||
'Bitcoin macro bottom case study',
|
||||
],
|
||||
ogTitle: 'Case Studies | Trump Alpha',
|
||||
ogDescription:
|
||||
'Historical cases that show why the Trump, BTC, and KOL engines exist: posts, wallet behavior, price reaction, and evidence.',
|
||||
heroTitle: 'Case Studies',
|
||||
heroSubtitle: 'Real events, real price moves — why these signals are worth tracking.',
|
||||
intro: 'Three documented cases where the signal worked. Not forecasts — history.',
|
||||
statAsset: 'Asset',
|
||||
statImpact: 'Move',
|
||||
statWindow: 'Window',
|
||||
evidenceLabel: 'Source',
|
||||
footer:
|
||||
"Past events don't guarantee future results. These cases show why the signal categories exist.",
|
||||
footerMethodology: 'Methodology',
|
||||
footerGlossary: 'Glossary',
|
||||
cases: [
|
||||
{
|
||||
id: 'strategic-reserve-2025',
|
||||
date: 'March 2, 2025',
|
||||
source: 'Trump Truth Social',
|
||||
title: 'Trump announces U.S. Strategic Crypto Reserve — BTC +8%, ETH +10%',
|
||||
summary:
|
||||
'Trump posted confirmation of a U.S. Strategic Crypto Reserve including BTC, ETH, SOL, XRP, and ADA. Markets moved within minutes.',
|
||||
signal: 'LONG',
|
||||
asset: 'BTC / ETH',
|
||||
priceImpact: 'BTC +8.2%, ETH +10%+',
|
||||
impactWindow: '24 hours',
|
||||
detail:
|
||||
'The post named specific assets and tied them to a government-level commitment — the clearest possible bullish signal. This is exactly what the Trump signal engine is built to catch: a post that goes from vague political tone to explicit crypto policy in one statement.',
|
||||
evidence:
|
||||
'CNBC and Al Jazeera documented the market response. Exchange data showed immediate momentum-driven inflows.',
|
||||
externalUrl:
|
||||
'https://www.cnbc.com/2025/03/02/trump-announces-strategic-crypto-reserve-including-bitcoin-solana-xrp-and-more.html',
|
||||
},
|
||||
{
|
||||
id: 'tariff-china-2025',
|
||||
date: 'April 2025',
|
||||
source: 'Trump Truth Social',
|
||||
title: 'Tariff escalation post — BTC -4% in 4 hours',
|
||||
summary:
|
||||
'A tariff-escalation post compressed risk appetite fast. BTC dropped 4.1% in 4 hours — no crypto-specific news, just macro sentiment repricing.',
|
||||
signal: 'SHORT',
|
||||
asset: 'BTC',
|
||||
priceImpact: 'BTC -4.1%',
|
||||
impactWindow: '4 hours',
|
||||
detail:
|
||||
'Not every Trump post is bullish for crypto. Trade conflict, tariffs, and macro uncertainty posts can hit crypto just as hard as equity markets. This is why the signal engine has a real SHORT branch — and why noise filtering matters.',
|
||||
evidence:
|
||||
'CoinDesk has documented multiple Trump statements that moved BTC in both directions.',
|
||||
externalUrl:
|
||||
'https://www.coindesk.com/markets/2026/04/20/five-times-president-trump-made-a-statement-that-moved-bitcoin-and-why-it-might-happen-again-this-week',
|
||||
},
|
||||
{
|
||||
id: 'kol-divergence-example',
|
||||
date: 'Composite example',
|
||||
source: 'KOL post + tracked wallet',
|
||||
title: 'KOL bullish on ETH in public, selling ETH on-chain',
|
||||
summary:
|
||||
'A tracked KOL published a bullish ETH thesis. Within 5 days, their wallet reduced ~$180k of ETH exposure. Public pitch said buy — the wallet said sell.',
|
||||
signal: 'DIVERGENCE',
|
||||
asset: 'ETH',
|
||||
priceImpact: 'N/A',
|
||||
impactWindow: '±7 days',
|
||||
detail:
|
||||
"Words are free. Wallet moves cost money. When a KOL's on-chain behavior contradicts their public call, the wallet is usually telling the truth. This is why the KOL module tracks both — and why divergence is the highest-conviction category.",
|
||||
evidence: 'Divergence detection logic is documented on the Methodology page.',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
|
||||
return {
|
||||
title: copy.title,
|
||||
description: copy.description,
|
||||
keywords: copy.keywords,
|
||||
openGraph: {
|
||||
title: copy.ogTitle,
|
||||
description: copy.ogDescription,
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/${locale}/case-studies`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/case-studies`,
|
||||
'x-default': `${siteUrl}/en/case-studies`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const SIGNAL_COLOR: Record<string, string> = {
|
||||
LONG: '#22c55e',
|
||||
SHORT: '#ef4444',
|
||||
DIVERGENCE: '#f5a524',
|
||||
}
|
||||
|
||||
// Map a free-text case date ("March 2, 2025", "April 2025", "Illustrative
|
||||
// composite") to an ISO date where possible. Returns undefined for vague /
|
||||
// non-date labels so we omit datePublished rather than emit garbage.
|
||||
function caseIsoDate(raw: string): string | undefined {
|
||||
const d = new Date(raw)
|
||||
return isNaN(d.getTime()) ? undefined : d.toISOString().slice(0, 10)
|
||||
}
|
||||
|
||||
export default function CaseStudiesPage() {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
// ── GEO: each case as a schema.org/Article in an ItemList ─────────────────
|
||||
// These documented event walkthroughs are exactly what AI answer engines
|
||||
// (Perplexity, Gemini, ChatGPT) cite for "did Trump posts move crypto"
|
||||
// queries. Structured data makes them machine-citeable. Evidence URLs become
|
||||
// citation links; Endorphin is the author/publisher.
|
||||
const pageUrl = `${siteUrl}/${locale}/case-studies`
|
||||
const caseJsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'ItemList',
|
||||
'@id': `${pageUrl}#cases`,
|
||||
name: copy.title,
|
||||
description: copy.description,
|
||||
itemListElement: copy.cases.map((c, i) => {
|
||||
const iso = caseIsoDate(c.date)
|
||||
const article: Record<string, unknown> = {
|
||||
'@type': 'Article',
|
||||
'@id': `${pageUrl}#${c.id}`,
|
||||
headline: c.title,
|
||||
description: c.summary,
|
||||
articleBody: c.detail,
|
||||
about: c.asset,
|
||||
author: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
|
||||
publisher: { '@id': `${siteUrl}/#org` },
|
||||
isPartOf: { '@id': `${siteUrl}/#website` },
|
||||
}
|
||||
if (iso) article.datePublished = iso
|
||||
if (c.externalUrl) {
|
||||
article.citation = c.externalUrl
|
||||
article.isBasedOn = c.externalUrl
|
||||
}
|
||||
return { '@type': 'ListItem', position: i + 1, item: article }
|
||||
}),
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page" style={{ maxWidth: 780 }}>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(caseJsonLd) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/case-studies` }]} />
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{copy.heroTitle}</h1>
|
||||
<p className="page-sub">{copy.heroSubtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p
|
||||
style={{
|
||||
fontSize: 13,
|
||||
color: 'var(--ink-3)',
|
||||
lineHeight: 1.7,
|
||||
marginBottom: 24,
|
||||
fontStyle: 'italic',
|
||||
}}
|
||||
>
|
||||
{copy.intro}
|
||||
</p>
|
||||
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
||||
{copy.cases.map((c) => (
|
||||
<article
|
||||
key={c.id}
|
||||
className="card"
|
||||
style={{ padding: '24px 28px' }}
|
||||
itemScope
|
||||
itemType="https://schema.org/Article"
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'flex-start',
|
||||
gap: 12,
|
||||
flexWrap: 'wrap',
|
||||
marginBottom: 12,
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 10,
|
||||
fontWeight: 700,
|
||||
letterSpacing: '0.07em',
|
||||
textTransform: 'uppercase',
|
||||
fontFamily: 'monospace',
|
||||
padding: '4px 10px',
|
||||
borderRadius: 4,
|
||||
flexShrink: 0,
|
||||
background: `color-mix(in srgb, ${SIGNAL_COLOR[c.signal]} 14%, transparent)`,
|
||||
color: SIGNAL_COLOR[c.signal],
|
||||
border: `1px solid color-mix(in srgb, ${SIGNAL_COLOR[c.signal]} 30%, transparent)`,
|
||||
}}
|
||||
>
|
||||
{c.signal}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 12,
|
||||
color: 'var(--ink-4)',
|
||||
fontFamily: 'monospace',
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
{c.date}
|
||||
</span>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 11,
|
||||
color: 'var(--ink-4)',
|
||||
padding: '4px 8px',
|
||||
background: 'var(--bg-sunk)',
|
||||
borderRadius: 4,
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
{c.source}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h2
|
||||
itemProp="headline"
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: 700,
|
||||
color: 'var(--ink)',
|
||||
margin: '0 0 8px',
|
||||
lineHeight: 1.3,
|
||||
}}
|
||||
>
|
||||
{c.title}
|
||||
</h2>
|
||||
|
||||
<p style={{ fontSize: 14, color: 'var(--ink-2)', lineHeight: 1.6, margin: '0 0 16px' }}>
|
||||
{c.summary}
|
||||
</p>
|
||||
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
gap: 0,
|
||||
marginBottom: 16,
|
||||
flexWrap: 'wrap',
|
||||
border: '1px solid var(--line)',
|
||||
borderRadius: 8,
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
{[
|
||||
{ k: copy.statAsset, v: c.asset },
|
||||
{ k: copy.statImpact, v: c.priceImpact },
|
||||
{ k: copy.statWindow, v: c.impactWindow },
|
||||
].map(({ k, v }, i) => (
|
||||
<div
|
||||
key={k}
|
||||
style={{
|
||||
flex: '1 1 120px',
|
||||
padding: '10px 16px',
|
||||
borderRight: i < 2 ? '1px solid var(--line)' : 'none',
|
||||
background: 'var(--bg-sunk)',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 10,
|
||||
color: 'var(--ink-4)',
|
||||
textTransform: 'uppercase',
|
||||
letterSpacing: '0.06em',
|
||||
fontFamily: 'monospace',
|
||||
marginBottom: 4,
|
||||
}}
|
||||
>
|
||||
{k}
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 14,
|
||||
fontWeight: 700,
|
||||
color: 'var(--ink)',
|
||||
fontFamily: 'monospace',
|
||||
}}
|
||||
>
|
||||
{v}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<p
|
||||
itemProp="description"
|
||||
style={{ fontSize: 13, color: 'var(--ink-2)', lineHeight: 1.7, margin: '0 0 12px' }}
|
||||
>
|
||||
{c.detail}
|
||||
</p>
|
||||
|
||||
<p
|
||||
style={{
|
||||
fontSize: 12,
|
||||
color: 'var(--ink-3)',
|
||||
lineHeight: 1.65,
|
||||
margin: 0,
|
||||
paddingLeft: 12,
|
||||
borderLeft: '2px solid var(--line-2)',
|
||||
}}
|
||||
>
|
||||
<strong>{copy.evidenceLabel}:</strong> {c.evidence}
|
||||
{c.externalUrl && (
|
||||
<>
|
||||
{' '}
|
||||
<a
|
||||
href={c.externalUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
style={{ color: 'var(--amber)', textDecoration: 'none' }}
|
||||
>
|
||||
{isZh ? '来源 ↗' : 'Source ↗'}
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ padding: '20px 24px', marginTop: 12 }}>
|
||||
<p style={{ fontSize: 13, color: 'var(--ink-4)', lineHeight: 1.6, margin: 0 }}>
|
||||
{copy.footer} {isZh ? '另见:' : 'See also:'}{' '}
|
||||
<Link href={`/${locale}/methodology`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerMethodology}
|
||||
</Link>{' '}
|
||||
·{' '}
|
||||
<Link href={`/${locale}/glossary`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerGlossary}
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return {
|
||||
props: { ...{}, seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }) },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import { Input } from '@trumpsignal/ui/components/input'
|
||||
import { Button } from '@trumpsignal/ui/components/button'
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
const metadata: Metadata = {
|
||||
title: 'Contact Us',
|
||||
description:
|
||||
'Get in touch with Trump Alpha for questions, feedback, or support. We respond within 24 hours.',
|
||||
alternates: {
|
||||
canonical: `${process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'}/en/contact`,
|
||||
},
|
||||
robots: { index: false, follow: true }, // no SEO value in indexing a contact form
|
||||
}
|
||||
|
||||
export default function ContactPage() {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
return (
|
||||
<div className="page" style={{ maxWidth: 560 }}>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{isZh ? '联系我们' : 'Contact Us'}</h1>
|
||||
<p className="page-sub">
|
||||
{isZh
|
||||
? '问题、反馈或支持请求都可以从这里发来。'
|
||||
: 'Questions, feedback, or support requests.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ padding: 32 }}>
|
||||
<form action="mailto:support@bitnews.day" method="get" encType="text/plain">
|
||||
<div className="field" style={{ marginBottom: 16 }}>
|
||||
<label htmlFor="subject">{isZh ? '主题' : 'Subject'}</label>
|
||||
<Input
|
||||
id="subject"
|
||||
name="subject"
|
||||
type="text"
|
||||
placeholder={isZh ? '例如:机器人没有执行交易' : 'e.g. Bot not executing trades'}
|
||||
/>
|
||||
</div>
|
||||
<div className="field" style={{ marginBottom: 24 }}>
|
||||
<label htmlFor="body">{isZh ? '内容' : 'Message'}</label>
|
||||
<textarea
|
||||
id="body"
|
||||
name="body"
|
||||
rows={6}
|
||||
placeholder={
|
||||
isZh ? '尽量详细描述你的问题或需求…' : 'Describe your issue or question in detail…'
|
||||
}
|
||||
style={{ width: '100%', resize: 'vertical' }}
|
||||
/>
|
||||
</div>
|
||||
<Button type="submit" className="btn amber lg">
|
||||
{isZh ? '用邮件客户端打开 →' : 'Open in mail client →'}
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
<div
|
||||
style={{
|
||||
marginTop: 28,
|
||||
paddingTop: 20,
|
||||
borderTop: '1px solid var(--line)',
|
||||
fontSize: 13,
|
||||
color: 'var(--ink-3)',
|
||||
lineHeight: 1.6,
|
||||
}}
|
||||
>
|
||||
<div style={{ marginBottom: 6 }}>
|
||||
{isZh ? '也可以直接发邮件给我们:' : 'You can also reach us directly:'}
|
||||
</div>
|
||||
<div>
|
||||
<a href="mailto:support@bitnews.day" style={{ color: 'var(--amber)' }}>
|
||||
support@bitnews.day
|
||||
</a>
|
||||
</div>
|
||||
<div style={{ marginTop: 8 }}>
|
||||
{isZh ? '通常会在 24 小时内回复。' : 'Response time: typically within 24 hours.'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: metadata } }
|
||||
}
|
||||
@@ -0,0 +1,510 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
type GlossaryTerm = {
|
||||
term: string
|
||||
abbr?: string
|
||||
category: string
|
||||
definition: string
|
||||
extra?: string
|
||||
}
|
||||
|
||||
type GlossaryCopy = {
|
||||
title: string
|
||||
description: string
|
||||
keywords: string[]
|
||||
ogTitle: string
|
||||
ogDescription: string
|
||||
heroTitle: string
|
||||
heroSubtitle: string
|
||||
intro: string
|
||||
terms: GlossaryTerm[]
|
||||
footerLead: string
|
||||
footerContact: string
|
||||
footerMethodology: string
|
||||
footerCaseStudies: string
|
||||
}
|
||||
|
||||
function getCopy(locale: string): GlossaryCopy {
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
if (isZh) {
|
||||
return {
|
||||
title: '加密信号术语表 - Trump Alpha',
|
||||
description:
|
||||
'系统化定义 Trump Alpha 使用的核心术语,包括 AHR999、Pi Cycle Bottom、200 周均线、KOL、言行偏离、资金费率、Conviction Score、逐仓等。',
|
||||
keywords: [
|
||||
'AHR999 定义',
|
||||
'Pi Cycle Bottom 是什么',
|
||||
'200周均线',
|
||||
'KOL 是什么',
|
||||
'言行偏离',
|
||||
'资金费率',
|
||||
'逐仓',
|
||||
'加密信号术语表',
|
||||
],
|
||||
ogTitle: 'Crypto Signals Glossary | Trump Alpha',
|
||||
ogDescription: 'Trump Alpha 核心术语的清晰定义,适合搜索摘录、AI 引用和快速查阅。',
|
||||
heroTitle: '术语表',
|
||||
heroSubtitle: '把页面里所有关键实体和专业词说清楚',
|
||||
intro:
|
||||
'这份术语表服务两个目标:第一,帮助用户快速理解平台内的指标和信号;第二,让搜索引擎和 LLM 能稳定识别这些实体之间的关系。每个词条都尽量给出定义、上下文和在 Trump Alpha 里的具体用法。',
|
||||
terms: [
|
||||
{
|
||||
term: 'AHR999',
|
||||
category: '宏观底部指标',
|
||||
definition:
|
||||
'AHR999 是中文加密圈常用的比特币估值指标,通常结合长期趋势和成本锚来判断 BTC 是否进入深度价值区。在 Trump Alpha 里,AHR999 低于 0.45 被视为一个经典底部信号。',
|
||||
extra: '它是当前 BTC 2-of-3 周期底部扫描器中的三大输入之一。',
|
||||
},
|
||||
{
|
||||
term: 'Pi Cycle Bottom',
|
||||
category: '宏观底部指标',
|
||||
definition:
|
||||
'Pi Cycle Bottom 是一种基于长周期均线关系的比特币底部判定方法。Trump Alpha 使用的条件是 150 日 EMA 低于 471 日 SMA 乘以 0.745。',
|
||||
extra: '它也是 BTC 周期底部扫描器的三项核心输入之一。',
|
||||
},
|
||||
{
|
||||
term: '200-week Moving Average',
|
||||
category: '宏观底部指标',
|
||||
definition:
|
||||
'200 周均线是比特币最常见的超长周期趋势锚之一。历史上,多轮熊市低点都出现在这个区域附近。Trump Alpha 将价格接近或跌破该均线视为底部共振条件的一部分。',
|
||||
},
|
||||
{
|
||||
term: 'KOL',
|
||||
abbr: 'Key Opinion Leader',
|
||||
category: '平台术语',
|
||||
definition:
|
||||
'在加密语境里,KOL 指的是能持续影响市场叙事或零售情绪的分析师、基金经理、内容创作者或节目主持人。Trump Alpha 跟踪的是带有长期内容产出的 KOL,而不是只发碎片推文的账号。',
|
||||
},
|
||||
{
|
||||
term: 'Talks-vs-Trades Divergence',
|
||||
category: '平台术语',
|
||||
definition:
|
||||
'言行偏离指 KOL 公开表达的方向与链上钱包实际操作方向相反。例如公开看多 ETH,但钱包在同一周内减仓 ETH。Trump Alpha 把链上动作视作更高优先级的真实信号。',
|
||||
extra: '这是平台里信息密度最高的信号之一,因为它把公开叙事和真实仓位拆开来看。',
|
||||
},
|
||||
{
|
||||
term: 'Conviction Score',
|
||||
category: '平台术语',
|
||||
definition:
|
||||
'Conviction Score 是 AI 给每条 KOL 观点分配的强度分,范围通常在 0.0 到 1.0。分数越高,说明作者表达越明确、重复度越高,且更可能带有仓位、时间或执行语气。',
|
||||
},
|
||||
{
|
||||
term: 'Funding Rate',
|
||||
category: '衍生品术语',
|
||||
definition:
|
||||
'资金费率是永续合约用来锚定现货价格的周期性支付机制。多头付空头代表市场做多拥挤,空头付多头则代表市场做空拥挤。极端 funding 往往出现在清算前夜。',
|
||||
},
|
||||
{
|
||||
term: 'Isolated Margin',
|
||||
category: '交易术语',
|
||||
definition:
|
||||
'逐仓模式意味着每笔仓位只使用自己的保证金,不会和账户内其他持仓共用风险池。即使某笔交易被强平,也不会拖累其他持仓。',
|
||||
extra: 'Trump Alpha 的自动执行层默认按逐仓方式工作。',
|
||||
},
|
||||
{
|
||||
term: 'TP / SL',
|
||||
abbr: 'Take-Profit / Stop-Loss',
|
||||
category: '交易术语',
|
||||
definition:
|
||||
'TP 和 SL 分别表示止盈和止损条件单。Trump Alpha 的自动交易在开仓时就会挂好,而不是事后补挂。',
|
||||
},
|
||||
{
|
||||
term: 'UTXO',
|
||||
abbr: 'Unspent Transaction Output',
|
||||
category: '比特币术语',
|
||||
definition:
|
||||
'UTXO 是比特币网络中的基础记账单元。虽然 Trump Alpha 当前线上 BTC 信号不再直接使用 UTXO 花费行为,但理解 UTXO 仍有助于读懂很多经典链上研究。',
|
||||
},
|
||||
{
|
||||
term: 'Perpetual Future',
|
||||
abbr: 'Perp',
|
||||
category: '衍生品术语',
|
||||
definition:
|
||||
'Perp 是没有到期日的永续合约。它依靠资金费率和标记价格机制尽量贴近现货。Hyperliquid 就是提供 perp 交易的去中心化交易平台之一。',
|
||||
},
|
||||
{
|
||||
term: 'Substack Signal',
|
||||
category: '平台术语',
|
||||
definition:
|
||||
'Substack Signal 指从 KOL 的长文订阅、博客或深度文章中提取出的资产观点。相比短推文,这类内容通常更完整,因此更适合做高质量的观点抽取。',
|
||||
},
|
||||
{
|
||||
term: 'Capitulation',
|
||||
category: '市场术语',
|
||||
definition:
|
||||
'Capitulation 指持有者在持续亏损后集中放弃、被迫卖出的一段市场阶段。它往往出现在熊市尾声,也是 BTC 底部扫描器最希望捕捉的环境之一。',
|
||||
},
|
||||
{
|
||||
term: 'EMA',
|
||||
abbr: 'Exponential Moving Average',
|
||||
category: '技术术语',
|
||||
definition:
|
||||
'EMA 是指数移动平均线,对最近价格赋予更高权重,因此比简单均线更敏感。Trump Alpha 在 Pi Cycle Bottom 条件中使用 150 日 EMA。',
|
||||
},
|
||||
],
|
||||
footerLead: '缺少某个词条?',
|
||||
footerContact: '联系我们',
|
||||
footerMethodology: '方法论',
|
||||
footerCaseStudies: '案例研究',
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: 'Crypto Signals Glossary — AHR999, Pi Cycle Bottom, KOL Divergence',
|
||||
description:
|
||||
'Definitions of every core term used in Trump Alpha, including AHR999, Pi Cycle Bottom, 200-week moving average, KOL, talks-vs-trades divergence, funding rate, conviction score, and isolated margin.',
|
||||
keywords: [
|
||||
'AHR999 definition',
|
||||
'Pi Cycle Bottom explained',
|
||||
'200-week moving average Bitcoin',
|
||||
'what is KOL crypto',
|
||||
'talks vs trades definition',
|
||||
'funding rate crypto',
|
||||
'isolated margin perpetual',
|
||||
'crypto signal glossary',
|
||||
],
|
||||
ogTitle: 'Crypto Signals Glossary | Trump Alpha',
|
||||
ogDescription:
|
||||
"Clear definitions of Trump Alpha's core terms, optimized for search, AI retrieval, and fast reference.",
|
||||
heroTitle: 'Glossary',
|
||||
heroSubtitle: 'Every term on the platform, defined precisely.',
|
||||
intro: "Quick definitions for the terms you'll encounter on this platform.",
|
||||
terms: [
|
||||
{
|
||||
term: 'AHR999',
|
||||
category: 'Macro-bottom signal',
|
||||
definition:
|
||||
'A Bitcoin valuation score. Below 0.45 = BTC is historically cheap and in a potential bottom zone. Above 1.2 = overvalued, bottom thesis is off. One of three conditions in the BTC bottom scanner.',
|
||||
},
|
||||
{
|
||||
term: 'Pi Cycle Bottom',
|
||||
category: 'Macro-bottom signal',
|
||||
definition:
|
||||
'A long-term moving-average signal that has historically aligned with Bitcoin cycle lows. Fires when the 150-day EMA crosses below the 471-day SMA × 0.745. Binary — either confirmed or not.',
|
||||
},
|
||||
{
|
||||
term: '200-week Moving Average',
|
||||
category: 'Macro-bottom signal',
|
||||
definition:
|
||||
"BTC's most-watched long-term support level. Every major bear-market low in history formed at or near it. The scanner counts price ≤ 200WMA × 1.05 as a bottom vote.",
|
||||
},
|
||||
{
|
||||
term: 'KOL',
|
||||
abbr: 'Key Opinion Leader',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
'An analyst, fund manager, podcast host, or creator whose calls move crypto narrative. The platform tracks 25 KOLs — Arthur Hayes, Delphi, Bankless, and others — cross-checking what they say publicly against what their wallets actually do.',
|
||||
},
|
||||
{
|
||||
term: 'Talks-vs-Trades Divergence',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
"When a KOL's public call and their wallet move in opposite directions on the same asset. Example: publicly bullish ETH while quietly reducing ETH on-chain. The wallet is treated as the real signal — it's harder to fake than words.",
|
||||
extra: 'Highest-conviction signal category on the platform.',
|
||||
},
|
||||
{
|
||||
term: 'Aligned',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
"A KOL's public call and their tracked wallet activity agree — e.g., bullish on BTC and the wallet is adding BTC. Reinforces the signal.",
|
||||
},
|
||||
{
|
||||
term: 'Mismatch',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
"A KOL's public call contradicts their wallet move. Bullish in public, selling on-chain = mismatch. This is the divergence signal you actually want to act on.",
|
||||
},
|
||||
{
|
||||
term: 'Paper mode',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
'Simulated trading — the bot runs through all its logic and tracks positions, but no real orders are sent to Hyperliquid. Use it to see how the bot would have performed before risking real money.',
|
||||
},
|
||||
{
|
||||
term: '/adopt',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
'A Telegram bot command. When a Macro Vibes signal fires, you open the position yourself on Hyperliquid, then send /adopt in the bot. The bot then takes over managing the exit — stop ladder, partial de-risk, pyramiding — without you having to watch it.',
|
||||
},
|
||||
{
|
||||
term: 'AI Confidence',
|
||||
category: 'Platform term',
|
||||
definition:
|
||||
'A percentage score (0–100%) the AI assigns to each Trump post signal. Higher = the post language is clearer and more explicitly directional. The default threshold is 70% — signals below this are not traded.',
|
||||
},
|
||||
{
|
||||
term: 'Funding Rate',
|
||||
category: 'Derivatives term',
|
||||
definition:
|
||||
'The periodic payment between long and short traders on a perp exchange, designed to keep the contract price close to spot. Extreme positive funding = crowded longs. Extreme negative = crowded shorts. Extreme readings often precede sharp reversals when the crowded side gets squeezed.',
|
||||
},
|
||||
{
|
||||
term: 'Isolated Margin',
|
||||
category: 'Trading term',
|
||||
definition:
|
||||
"Each trade uses only its own dedicated margin — if it gets liquidated, it doesn't touch your other positions. Trump Alpha always uses isolated margin so one bad trade can't wipe the account.",
|
||||
},
|
||||
{
|
||||
term: 'TP / SL',
|
||||
abbr: 'Take-Profit / Stop-Loss',
|
||||
category: 'Trading term',
|
||||
definition:
|
||||
'Automatic exit orders placed at entry. TP closes the trade in profit at your target. SL closes it to cut losses. Trump Alpha attaches both the moment a trade opens.',
|
||||
},
|
||||
{
|
||||
term: 'Perpetual Future',
|
||||
abbr: 'Perp',
|
||||
category: 'Derivatives term',
|
||||
definition:
|
||||
'A futures contract with no expiry. You stay in the trade until you close it or get liquidated. Trump Alpha executes on Hyperliquid perps.',
|
||||
},
|
||||
{
|
||||
term: 'Capitulation',
|
||||
category: 'Market term',
|
||||
definition:
|
||||
'The phase near a bear market bottom where panicked holders give up and sell en masse. Creates the washout conditions that the BTC macro-bottom scanner is designed to detect.',
|
||||
},
|
||||
],
|
||||
footerLead: 'Missing a term?',
|
||||
footerContact: 'Contact us',
|
||||
footerMethodology: 'Methodology',
|
||||
footerCaseStudies: 'Case Studies',
|
||||
}
|
||||
}
|
||||
|
||||
async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
|
||||
return {
|
||||
title: copy.title,
|
||||
description: copy.description,
|
||||
keywords: copy.keywords,
|
||||
openGraph: {
|
||||
title: copy.ogTitle,
|
||||
description: copy.ogDescription,
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/glossary`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/glossary`,
|
||||
'x-default': `${siteUrl}/en/glossary`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Glossary JSON-LD: DefinedTermSet + individual DefinedTerm entries.
|
||||
// LLMs and Google's Knowledge Graph use this to understand what each term
|
||||
// means *in context of this product*, which improves citation accuracy when
|
||||
// users ask "what is [term]" in ChatGPT/Perplexity.
|
||||
function buildGlossaryJsonLd(terms: { term: string; definition: string; extra?: string }[]) {
|
||||
return {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'DefinedTermSet',
|
||||
'@id': `${siteUrl}/en/glossary#termset`,
|
||||
name: 'Trump Alpha Crypto Glossary',
|
||||
url: `${siteUrl}/en/glossary`,
|
||||
description:
|
||||
'Definitions of key terms, indicators, and signal concepts used in the Trump Alpha crypto intelligence platform.',
|
||||
inLanguage: 'en',
|
||||
hasDefinedTerm: terms.map((t) => ({
|
||||
'@type': 'DefinedTerm',
|
||||
name: t.term,
|
||||
description: t.extra ? `${t.definition} ${t.extra}` : t.definition,
|
||||
url: `${siteUrl}/en/glossary#${t.term.toLowerCase().replace(/[^a-z0-9]+/g, '-')}`,
|
||||
inDefinedTermSet: `${siteUrl}/en/glossary#termset`,
|
||||
})),
|
||||
}
|
||||
}
|
||||
|
||||
const CATEGORY_COLOR: Record<string, string> = {
|
||||
'Macro-bottom metric': '#a78bfa',
|
||||
宏观底部指标: '#a78bfa',
|
||||
'Platform term': '#f5a524',
|
||||
平台术语: '#f5a524',
|
||||
'Trading term': '#22c55e',
|
||||
交易术语: '#22c55e',
|
||||
'Derivatives term': '#60a5fa',
|
||||
衍生品术语: '#60a5fa',
|
||||
'Bitcoin term': '#fb923c',
|
||||
比特币术语: '#fb923c',
|
||||
'Market term': '#f87171',
|
||||
市场术语: '#f87171',
|
||||
'Technical term': '#94a3b8',
|
||||
技术术语: '#94a3b8',
|
||||
}
|
||||
|
||||
export default function GlossaryPage() {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
const categories = Array.from(new Set(copy.terms.map((t) => t.category)))
|
||||
|
||||
const enTerms = locale === 'en' ? copy.terms : getCopy('en').terms
|
||||
const glossaryJsonLd = buildGlossaryJsonLd(enTerms)
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(glossaryJsonLd) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/glossary` }]} />
|
||||
<div className="page" style={{ maxWidth: 760 }}>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{copy.heroTitle}</h1>
|
||||
<p className="page-sub">{copy.heroSubtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p
|
||||
style={{
|
||||
fontSize: 13,
|
||||
color: 'var(--ink-3)',
|
||||
lineHeight: 1.7,
|
||||
marginBottom: 20,
|
||||
fontStyle: 'italic',
|
||||
}}
|
||||
>
|
||||
{copy.intro}
|
||||
</p>
|
||||
|
||||
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, marginBottom: 24 }}>
|
||||
{categories.map((cat) => (
|
||||
<span
|
||||
key={cat}
|
||||
style={{
|
||||
fontSize: 11,
|
||||
fontWeight: 700,
|
||||
letterSpacing: '0.06em',
|
||||
textTransform: 'uppercase',
|
||||
fontFamily: 'monospace',
|
||||
padding: '4px 10px',
|
||||
borderRadius: 999,
|
||||
background: `color-mix(in srgb, ${CATEGORY_COLOR[cat] ?? '#888'} 12%, transparent)`,
|
||||
color: CATEGORY_COLOR[cat] ?? '#888',
|
||||
border: `1px solid color-mix(in srgb, ${CATEGORY_COLOR[cat] ?? '#888'} 25%, transparent)`,
|
||||
}}
|
||||
>
|
||||
{cat}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
||||
{copy.terms.map((term) => (
|
||||
<div
|
||||
key={term.term}
|
||||
id={term.term.toLowerCase().replace(/[^a-z0-9]+/g, '-')}
|
||||
className="card"
|
||||
style={{ padding: '20px 24px' }}
|
||||
itemScope
|
||||
itemType="https://schema.org/DefinedTerm"
|
||||
>
|
||||
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 12, flexWrap: 'wrap' }}>
|
||||
<h2
|
||||
itemProp="name"
|
||||
style={{
|
||||
fontSize: 16,
|
||||
fontWeight: 700,
|
||||
color: 'var(--ink)',
|
||||
margin: 0,
|
||||
flex: '1 1 auto',
|
||||
}}
|
||||
>
|
||||
{term.term}
|
||||
</h2>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 10,
|
||||
fontWeight: 700,
|
||||
letterSpacing: '0.07em',
|
||||
textTransform: 'uppercase',
|
||||
fontFamily: 'monospace',
|
||||
padding: '3px 8px',
|
||||
borderRadius: 4,
|
||||
flexShrink: 0,
|
||||
background: `color-mix(in srgb, ${CATEGORY_COLOR[term.category] ?? '#888'} 12%, transparent)`,
|
||||
color: CATEGORY_COLOR[term.category] ?? '#888',
|
||||
}}
|
||||
>
|
||||
{term.category}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{term.abbr && (
|
||||
<p
|
||||
style={{
|
||||
fontSize: 12,
|
||||
color: 'var(--ink-4)',
|
||||
margin: '4px 0 0',
|
||||
fontStyle: 'italic',
|
||||
}}
|
||||
>
|
||||
{term.abbr}
|
||||
</p>
|
||||
)}
|
||||
|
||||
<p
|
||||
itemProp="description"
|
||||
style={{ fontSize: 14, color: 'var(--ink-2)', lineHeight: 1.7, margin: '10px 0 0' }}
|
||||
>
|
||||
{term.definition}
|
||||
</p>
|
||||
|
||||
{term.extra && (
|
||||
<p
|
||||
style={{
|
||||
fontSize: 13,
|
||||
color: 'var(--ink-3)',
|
||||
lineHeight: 1.65,
|
||||
margin: '8px 0 0',
|
||||
paddingLeft: 12,
|
||||
borderLeft: `2px solid ${CATEGORY_COLOR[term.category] ?? 'var(--amber)'}`,
|
||||
}}
|
||||
>
|
||||
{term.extra}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ padding: '20px 24px', marginTop: 12 }}>
|
||||
<p style={{ fontSize: 13, color: 'var(--ink-4)', lineHeight: 1.6, margin: 0 }}>
|
||||
{copy.footerLead}{' '}
|
||||
<Link href={`/${locale}/contact`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerContact}
|
||||
</Link>
|
||||
. {false ? '另见:' : 'See also:'}{' '}
|
||||
<Link href={`/${locale}/methodology`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerMethodology}
|
||||
</Link>{' '}
|
||||
·{' '}
|
||||
<Link href={`/${locale}/case-studies`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerCaseStudies}
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return {
|
||||
props: { ...{}, seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }) },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { getPosts } from '@/lib/api'
|
||||
import type { Metadata } from 'next'
|
||||
import DashboardClient from '@/screens/DashboardClient'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
interface OverviewPageProps {
|
||||
params: Promise<{ locale: string }>
|
||||
}
|
||||
|
||||
async function generateMetadata({ params }: OverviewPageProps): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
const title = isZh ? 'Trump Alpha — 实时加密信号研究台' : 'Trump Alpha — Live Crypto Signal Desk'
|
||||
const description = isZh
|
||||
? 'Endorphin 研究台追踪四个先于市场共识的信号:Trump 帖子、BTC 宏观底部、资金费率极值,以及 KOL 言行偏离。每个信号公开且带时间戳。'
|
||||
: 'Endorphin tracks six signals that move crypto before the crowd: Trump posts, BTC macro bottoms, funding-rate extremes, KOL long-form calls, talks-vs-trades divergence, and the Breakout Monitor. Public and timestamped.'
|
||||
const path = `${siteUrl}/${locale}`
|
||||
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
alternates: {
|
||||
canonical: path,
|
||||
languages: {
|
||||
en: `${siteUrl}/en`,
|
||||
'x-default': `${siteUrl}/en`,
|
||||
},
|
||||
},
|
||||
openGraph: {
|
||||
title,
|
||||
description,
|
||||
url: path,
|
||||
locale: isZh ? 'zh_CN' : 'en_US',
|
||||
alternateLocale: isZh ? ['en_US'] : ['zh_CN'],
|
||||
},
|
||||
twitter: {
|
||||
title,
|
||||
description,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default function OverviewPage({ posts }: Awaited<ReturnType<typeof loadData>>) {
|
||||
return <DashboardClient initialPosts={posts} />
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
// The overview only renders a small curated slice on first paint; pulling
|
||||
// 500 posts here bloats the server payload without improving the initial UI.
|
||||
const posts = await getPosts(80, 1).catch(() => [])
|
||||
|
||||
return { posts }
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
context.res.setHeader('Cache-Control', 'public, s-maxage=30, stale-while-revalidate=60')
|
||||
return {
|
||||
props: {
|
||||
...(await loadData()),
|
||||
seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
import { getKolChanges, getKolDigest, getKolDivergence, getKolPosts } from '@/lib/api'
|
||||
import type { Metadata } from 'next'
|
||||
import KolPageClient from '@/screens/kol/KolPageClient'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
interface KolPageProps {
|
||||
params: Promise<{ locale: string }>
|
||||
}
|
||||
|
||||
async function generateMetadata({ params }: KolPageProps): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
return {
|
||||
title: isZh ? 'KOL 信号与言行偏离追踪' : 'KOL Signals & Talks-vs-Trades Divergence',
|
||||
description: isZh
|
||||
? '从 25 个加密 KOL 信息源中提取可执行观点,覆盖 Arthur Hayes、Delphi Digital、Bankless、Empire、Unchained 等,并追踪“说法”和链上仓位是否一致。'
|
||||
: 'AI-extracted crypto signals from 25 KOL feeds: Arthur Hayes, Delphi Digital, Bankless, Empire, Unchained and more. Includes talks-vs-trades divergence — when KOL wallets contradict their public posts.',
|
||||
keywords: isZh
|
||||
? [
|
||||
'KOL 加密信号',
|
||||
'Arthur Hayes 信号',
|
||||
'Delphi Digital 分析',
|
||||
'KOL 钱包追踪',
|
||||
'言行不一致',
|
||||
'链上 KOL 跟踪',
|
||||
'Substack 加密信号',
|
||||
'播客加密信号',
|
||||
]
|
||||
: [
|
||||
'KOL crypto signals',
|
||||
'Arthur Hayes signals',
|
||||
'Delphi Digital analysis',
|
||||
'crypto KOL tracker',
|
||||
'talks vs trades',
|
||||
'smart money divergence',
|
||||
'on-chain KOL tracking',
|
||||
'Substack crypto signals',
|
||||
'crypto podcast signals',
|
||||
'KOL wallet tracking',
|
||||
],
|
||||
openGraph: {
|
||||
title: isZh
|
||||
? 'KOL 信号与言行偏离 | Trump Alpha'
|
||||
: 'KOL Signals & Talks-vs-Trades | Trump Alpha',
|
||||
description: isZh
|
||||
? '每天分析 KOL 长文、播客和公开观点,再与链上仓位交叉验证,找出真正有信息增量的观点与偏离。'
|
||||
: '25 KOL feeds (Hayes, Bankless, Empire…) AI-scored daily. Plus talks-vs-trades: when their wallets contradict their words.',
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/kol`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/kol`,
|
||||
'x-default': `${siteUrl}/en/kol`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GEO: the KOL talks-vs-trades feed is a dataset cross-referencing 25 crypto
|
||||
// KOLs' public statements against their on-chain wallet behaviour.
|
||||
const kolDataset = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Dataset',
|
||||
'@id': `${siteUrl}/en/kol#dataset`,
|
||||
name: 'Crypto KOL talks-vs-trades divergence dataset',
|
||||
description:
|
||||
"Daily cross-reference of 25 crypto KOLs' public statements (Substack / podcast) against their on-chain Ethereum wallet activity, flagging divergence when public stance and real positioning disagree within a ±7-day window.",
|
||||
url: `${siteUrl}/en/kol`,
|
||||
keywords: ['crypto KOL', 'on-chain', 'divergence', 'wallet tracking', 'sentiment'],
|
||||
isAccessibleForFree: true,
|
||||
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
|
||||
publisher: { '@id': `${siteUrl}/#org` },
|
||||
license: `${siteUrl}/en/terms`,
|
||||
measurementTechnique: 'On-chain wallet diff vs NLP stance extraction',
|
||||
temporalCoverage: '2025-01-01/..',
|
||||
}
|
||||
|
||||
export default function KolPage({
|
||||
posts,
|
||||
digest,
|
||||
changes,
|
||||
divergence,
|
||||
}: Awaited<ReturnType<typeof loadData>>) {
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(kolDataset) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: 'KOL talks-vs-trades', path: '/en/kol' }]} />
|
||||
<KolPageClient
|
||||
initialPosts={posts?.items ?? null}
|
||||
initialTotal={posts?.total ?? 0}
|
||||
initialDigest={digest}
|
||||
initialChanges={changes?.changes ?? null}
|
||||
initialDivergence={divergence?.items ?? null}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
// days=30 must match the client default (KolPageClient kolDays=30) so the
|
||||
// SSR payload and first client render agree — otherwise content flashes on
|
||||
// mount. 7d is frequently empty while 30d has data.
|
||||
const [posts, digest, changes, divergence] = await Promise.all([
|
||||
getKolPosts({ limit: 50, page: 1, days: 30 }).catch(() => null),
|
||||
getKolDigest(30).catch(() => null),
|
||||
getKolChanges({ days: 30 }).catch(() => null),
|
||||
getKolDivergence({ days: 30 }).catch(() => null),
|
||||
])
|
||||
|
||||
return { posts, digest, changes, divergence }
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
context.res.setHeader('Cache-Control', 'public, s-maxage=30, stale-while-revalidate=60')
|
||||
return {
|
||||
props: {
|
||||
...(await loadData()),
|
||||
seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import { getFundingSnapshot, getPosts } from '@/lib/api'
|
||||
import type { Metadata } from 'next'
|
||||
import MacroVibesPageClient from '@/screens/macro/MacroVibesPageClient'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
interface MacroVibesPageProps {
|
||||
params: Promise<{ locale: string }>
|
||||
}
|
||||
|
||||
async function generateMetadata({ params }: MacroVibesPageProps): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
return {
|
||||
title: isZh
|
||||
? '宏观氛围 — 加密市场宏观读数'
|
||||
: 'Macro Vibes — read crypto macro before price prints',
|
||||
description: isZh
|
||||
? 'Trump Alpha 的宏观氛围面板:AHR999、Fear & Greed、BTC 主导率、ETH/BTC、稳定币供应、ETF 资金流、永续 OI、Altcoin Season Index 八大公开宏观指标合一,外加 BTC 周期底部 + 资金费率反转两条触发器。'
|
||||
: 'Macro vibes for crypto. Eight public macro signals in one view — AHR999, Fear & Greed, BTC dominance, ETH/BTC, stablecoin supply, ETF flows, perp OI, Altcoin Season Index — plus BTC bottom and funding-rate triggers.',
|
||||
keywords: isZh
|
||||
? [
|
||||
'宏观氛围',
|
||||
'加密宏观',
|
||||
'AHR999',
|
||||
'Fear and Greed',
|
||||
'BTC 主导率',
|
||||
'ETH/BTC',
|
||||
'ETF 资金流',
|
||||
'稳定币供应',
|
||||
'资金费率反转',
|
||||
'Altcoin Season Index',
|
||||
]
|
||||
: [
|
||||
'crypto macro',
|
||||
'macro vibes',
|
||||
'AHR999',
|
||||
'Fear and Greed Index',
|
||||
'BTC dominance',
|
||||
'ETH/BTC ratio',
|
||||
'stablecoin supply',
|
||||
'Bitcoin ETF flow',
|
||||
'funding rate reversal',
|
||||
'Altcoin Season Index',
|
||||
],
|
||||
openGraph: {
|
||||
title: isZh ? '宏观氛围 | Trump Alpha' : 'Macro Vibes | Trump Alpha',
|
||||
description: isZh
|
||||
? '加密宏观一屏看完:八大宏观指标 + BTC 周期底部 + 资金费率反转触发器。'
|
||||
: 'Macro vibes for crypto. Read what is about to happen before price prints it.',
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/macro`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/macro`,
|
||||
'x-default': `${siteUrl}/en/macro`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default function MacroVibesPage({
|
||||
posts,
|
||||
fundingSnapshot,
|
||||
}: Awaited<ReturnType<typeof loadData>>) {
|
||||
return (
|
||||
<>
|
||||
<Breadcrumbs items={[{ name: 'Macro Vibes', path: '/en/macro' }]} />
|
||||
<MacroVibesPageClient initialPosts={posts} initialFundingSnapshot={fundingSnapshot} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
const [posts, fundingSnapshot] = await Promise.all([
|
||||
// The default tab is the bottom-reversal view. Fetch only the source this
|
||||
// page actually renders on first paint instead of hydrating with the
|
||||
// latest global post firehose and filtering it client-side.
|
||||
getPosts(200, 1, 'btc_bottom_reversal').catch(() => null),
|
||||
getFundingSnapshot().catch(() => null),
|
||||
])
|
||||
|
||||
return { posts, fundingSnapshot }
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
context.res.setHeader('Cache-Control', 'public, s-maxage=30, stale-while-revalidate=60')
|
||||
return {
|
||||
props: {
|
||||
...(await loadData()),
|
||||
seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,562 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
type Locale = 'en' | 'zh'
|
||||
|
||||
type MethodSection = {
|
||||
tag: string
|
||||
title: string
|
||||
answer: string
|
||||
paragraphs: string[]
|
||||
formula?: string
|
||||
bullets?: string[]
|
||||
limitation: string
|
||||
}
|
||||
|
||||
type MethodologyCopy = {
|
||||
title: string
|
||||
description: string
|
||||
keywords: string[]
|
||||
ogTitle: string
|
||||
ogDescription: string
|
||||
heroTitle: string
|
||||
heroSubtitle: string
|
||||
intro: string
|
||||
sections: MethodSection[]
|
||||
footer: string
|
||||
footerLinks: {
|
||||
contact: string
|
||||
glossary: string
|
||||
caseStudies: string
|
||||
}
|
||||
}
|
||||
|
||||
function getCopy(locale: string): MethodologyCopy {
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
if (isZh) {
|
||||
return {
|
||||
title: '信号方法论 - Trump Alpha',
|
||||
description:
|
||||
'完整解释 Trump Alpha 六个信号引擎的工作方式,包括 Trump Truth Social 语义打分、BTC 周期底部 2-of-3 共振、KOL 观点抽取、言行偏离、资金费率反转和 Hyperliquid 自动执行风控模型。',
|
||||
keywords: [
|
||||
'加密信号方法论',
|
||||
'AHR999',
|
||||
'Pi Cycle Bottom',
|
||||
'200周均线',
|
||||
'Trump Truth Social 信号',
|
||||
'KOL 观点抽取',
|
||||
'言行偏离',
|
||||
'资金费率反转',
|
||||
'Hyperliquid 自动交易',
|
||||
],
|
||||
ogTitle: 'Signal Methodology | Trump Alpha',
|
||||
ogDescription: 'Trump Alpha 六个引擎的完整方法论:数据源、触发规则、执行方式和已知限制。',
|
||||
heroTitle: '信号方法论',
|
||||
heroSubtitle: '从原始数据到交易动作,逐个解释每个引擎到底怎么工作',
|
||||
intro:
|
||||
'Trump Alpha 不是一个单一策略,而是六个相互独立的引擎。每个引擎都有自己的数据源、触发条件和失败模式。这里给出的是当前线上版本的真实逻辑,而不是营销版摘要。',
|
||||
sections: [
|
||||
{
|
||||
tag: 'Signal 1 · 实时事件',
|
||||
title: 'Trump Truth Social 情绪引擎',
|
||||
answer:
|
||||
'这个引擎实时轮询 Donald Trump 的 Truth Social 帖子,并在几秒内判断帖子是否会对加密市场形成短线方向性冲击。',
|
||||
paragraphs: [
|
||||
'系统只处理带有文字内容的原帖或转帖。纯图片、纯链接和没有可解释文本的信息会被过滤掉,因为这些内容更容易产生误触发。',
|
||||
'每条帖子会被送进结构化语义分类流程,输出方向、主要资产和置信度。只有当置信度高于用户门槛,且交易时间窗、日预算、仓位上限都允许时,自动执行层才会放行。',
|
||||
],
|
||||
formula: `if classification != NOISE
|
||||
AND confidence >= user_threshold
|
||||
AND current_time in active_window
|
||||
AND daily_spend < daily_cap
|
||||
=> open isolated-margin trade`,
|
||||
bullets: [
|
||||
'方向标签:LONG / SHORT / NOISE',
|
||||
'默认场景:突发政策表态、监管口径、关税升级、美元或财政扩张相关表述',
|
||||
'风控层:逐仓、止盈止损、日预算上限、活跃时段、单笔仓位上限',
|
||||
],
|
||||
limitation:
|
||||
'这个模型理解的是“帖子语义”,不是完整宏观环境。它很适合事件驱动,但不保证在风险偏好急转直下的市场里仍有同样的盈亏比。',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 2 · 日频 · BTC',
|
||||
title: 'BTC 周期底部 2-of-3 共振',
|
||||
answer:
|
||||
'当前线上 BTC 系统使用三项经典底部指标做 2-of-3 共振,只在宏观底部区域附近给出低频的 long-only 信号。',
|
||||
paragraphs: [
|
||||
'这套逻辑不再依赖付费链上数据,而是改成更稳健、更容易验证的公开价格框架。核心思想没变:抓大级别熊市尾声,而不是做日内择时。',
|
||||
'扫描器每天只跑一次,因为这不是高频策略。它要解决的不是“今天能不能涨 2%”,而是“是否正在进入一个值得持有数月的反转区间”。',
|
||||
],
|
||||
formula: `signal fires if count(
|
||||
AHR999 < 0.45,
|
||||
price <= 200-week MA * 1.05,
|
||||
Pi Cycle Bottom true
|
||||
) >= 2`,
|
||||
bullets: [
|
||||
'2-of-3 触发时,信心分高于单指标方案',
|
||||
'只做 long-only,不做趋势中的逆势 short',
|
||||
'退出更偏向保护利润和周期持有,而不是固定止盈',
|
||||
],
|
||||
limitation:
|
||||
'这套方法天生滞后于最低点。它接受“抄不到最底”,换取更少的中继下跌误判。最大的风险是把中期调整误判成结构性底部。',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 3 · 日频 · KOL',
|
||||
title: 'KOL 长文与播客观点抽取',
|
||||
answer:
|
||||
'KOL 引擎每天抓取长文、博客和播客描述,提取出明确的资产观点,并区分是明确买卖、方向性看法,还是只是提及。',
|
||||
paragraphs: [
|
||||
'比起碎片化推文,长文和播客摘要更容易包含完整论证、仓位语气和时间窗口,因此对 AI 提取更友好,也更适合作为可回溯的数据资产。',
|
||||
'输出结构不只包含 ticker,还包含动作类型、置信度和最短支撑引用句。这样前端和后续检索系统都能拿到“观点 + 证据”的组合,而不只是一个标签。',
|
||||
],
|
||||
formula: `{
|
||||
"summary": "<thesis>",
|
||||
"tickers": [
|
||||
{
|
||||
"ticker": "BTC",
|
||||
"action": "buy | sell | bullish | bearish | mention",
|
||||
"conviction": 0.0-1.0,
|
||||
"quote": "<supporting sentence>"
|
||||
}
|
||||
]
|
||||
}`,
|
||||
bullets: [
|
||||
'buy / sell 表示作者明确表达了交易动作',
|
||||
'bullish / bearish 表示方向明确但没有出现实际下单表述',
|
||||
'mention 仅表示提到标的,不足以视作交易观点',
|
||||
],
|
||||
limitation:
|
||||
'KOL 观点提取的难点在于上下文。历史复盘、赞助口播、反讽和模糊措辞都会降低可信度,因此系统对噪音过滤比较保守。',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 4 · 日频 · 交叉验证',
|
||||
title: 'Talks-vs-Trades 言行偏离',
|
||||
answer:
|
||||
'当 KOL 公开表达的方向,与其链上钱包在同一资产上的实际操作相反时,系统会把链上行为视作更高优先级的真实信号。',
|
||||
paragraphs: [
|
||||
'这个模块把“说了什么”和“做了什么”分开建模。公开叙事影响舆论,但仓位变化更接近真实风险暴露,因此两者冲突时,链上动作通常更有信息增量。',
|
||||
'目前系统会在 KOL 发文后的 ±7 天窗口内查找同资产的仓位变化,并将新增/加仓归为 long action,把减仓/清仓归为 short action。',
|
||||
],
|
||||
formula: `LONG_INTENT + SHORT_ACTION => DIVERGENCE (short)
|
||||
SHORT_INTENT + LONG_ACTION => DIVERGENCE (long)
|
||||
LONG_INTENT + LONG_ACTION => ALIGNMENT
|
||||
SHORT_INTENT + SHORT_ACTION => ALIGNMENT`,
|
||||
bullets: [
|
||||
'公开看多但链上减仓:偏离,方向按 short 解释',
|
||||
'公开看空但链上加仓:偏离,方向按 long 解释',
|
||||
'公开观点和链上仓位一致:一致性增强,不一定是反向机会',
|
||||
],
|
||||
limitation:
|
||||
'当前可见性仍受限于已知钱包集合。一个 KOL 可能分散使用多个地址、CEX 或未标记账户,因此偏离信号属于高质量但不保证覆盖完整仓位。',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 5 · 小时级 · 衍生品',
|
||||
title: '资金费率极值反转',
|
||||
answer:
|
||||
'资金费率引擎不是追涨杀跌,而是盯着拥挤度。当多头或空头过度拥挤,且极值开始均值回归时,系统会给出反向信号。',
|
||||
paragraphs: [
|
||||
'永续合约的 funding rate 能直观反映杠杆倾斜。如果市场长期是“多头在付钱”,说明做多拥挤;反过来则代表空头拥挤。极端拥挤往往在清算前夜。',
|
||||
'当前前端展示的是 30 日累计 funding 和实时状态,便于直接判断是否进入危险区,而不是只看单个时间点的 funding 数字。',
|
||||
],
|
||||
formula: `30d cumulative funding >= +3% and mean-reverting => SHORT bias
|
||||
30d cumulative funding <= -3% and mean-reverting => LONG bias`,
|
||||
bullets: [
|
||||
'用累计 funding 代替单点读数,更适合识别持续拥挤',
|
||||
'方向是反向交易 crowd,而不是顺着 crowd',
|
||||
'适合做拥挤度监控,也适合和其他系统做组合验证',
|
||||
],
|
||||
limitation:
|
||||
'资金费率极值可以持续比预期更久。它更像条件成熟的提醒,而不是保证立刻反转的钟摆,因此执行层必须配合止损和仓位控制。',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 6 · 执行层',
|
||||
title: 'Hyperliquid 自动交易与安全模型',
|
||||
answer:
|
||||
'自动交易层的职责不是“提高收益率”,而是把信号执行标准化,并在风控上强制落实逐仓、止损、预算和时间窗等约束。',
|
||||
paragraphs: [
|
||||
'Trump Alpha 通过 trade-only API key 与 Hyperliquid 连接,当前不会接触用户私钥或提现权限。这意味着系统能执行交易,但不能挪走资产。',
|
||||
'自动执行目前只接入 Trump Truth Social 实时信号。BTC 周期底部、KOL 观点和言行偏离依旧定位为研究与辅助决策层,默认由用户手动处理。',
|
||||
],
|
||||
bullets: [
|
||||
'最低置信度门槛',
|
||||
'逐仓模式',
|
||||
'开仓即挂止盈止损',
|
||||
'日预算上限',
|
||||
'活跃时间窗',
|
||||
'单笔仓位上限',
|
||||
],
|
||||
limitation:
|
||||
'执行层再稳,也无法把错误信号变成好交易。它能降低人为偏差,但不能替代策略本身的边际优势。',
|
||||
},
|
||||
],
|
||||
footer: '方法论最后更新于 2026 年 5 月。页面会随着线上逻辑更新而同步修订。',
|
||||
footerLinks: {
|
||||
contact: '联系我们',
|
||||
glossary: '术语表',
|
||||
caseStudies: '案例研究',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: 'Signal Methodology — How Each Engine Works',
|
||||
description:
|
||||
"Full technical methodology behind Trump Alpha's live signal engines: Trump Truth Social AI scoring, BTC 2-of-3 macro-bottom confluence, KOL feed extraction, talks-vs-trades divergence, funding rate reversals, and the Hyperliquid auto-trader safety model.",
|
||||
keywords: [
|
||||
'crypto signal methodology',
|
||||
'AHR999 explained',
|
||||
'Pi Cycle Bottom',
|
||||
'200-week moving average Bitcoin',
|
||||
'Trump Truth Social AI scoring',
|
||||
'KOL signal extraction',
|
||||
'talks vs trades methodology',
|
||||
'funding rate reversal signal',
|
||||
'Hyperliquid isolated margin',
|
||||
],
|
||||
ogTitle: 'Signal Methodology | Trump Alpha',
|
||||
ogDescription:
|
||||
'How each Trump Alpha engine works: data sources, trigger logic, execution rules, and known limitations.',
|
||||
heroTitle: 'Signal Methodology',
|
||||
heroSubtitle: 'From raw data to trade decision — how each engine actually works.',
|
||||
intro:
|
||||
'Endorphin runs Trump Alpha as a research project, not a marketing funnel. It is not one monolithic strategy — it is a stack of six independent engines, each with its own data source, trigger logic, and failure mode. This page documents the live production logic, not a simplified pitch.',
|
||||
sections: [
|
||||
{
|
||||
tag: 'Signal 1 · Real-time event',
|
||||
title: 'Trump Truth Social Sentiment Engine',
|
||||
answer:
|
||||
'This engine watches Donald Trump’s Truth Social feed in real time and scores whether a new post is likely to create a short-term directional move in crypto.',
|
||||
paragraphs: [
|
||||
'Only text-bearing original posts and reposts are scored. Pure media reposts, link dumps, and non-interpretable content are filtered out because they generate too many false positives.',
|
||||
'Each post goes through a structured semantic classification step that returns direction, primary asset, and confidence. Auto-execution only proceeds when confidence clears the user threshold and all user-level trade constraints still allow a new position.',
|
||||
],
|
||||
formula: `if classification != NOISE
|
||||
AND confidence >= user_threshold
|
||||
AND current_time in active_window
|
||||
AND daily_spend < daily_cap
|
||||
=> open isolated-margin trade`,
|
||||
bullets: [
|
||||
'Direction labels: LONG / SHORT / NOISE',
|
||||
'Typical catalysts: policy comments, tariff escalation, regulation, fiscal expansion, dollar weakness',
|
||||
'Safety rails: isolated margin, TP/SL, daily budget cap, active hours, per-trade size cap',
|
||||
],
|
||||
limitation:
|
||||
'The model interprets post semantics, not full macro context. It is strong for event-driven reaction, but it does not guarantee the same edge during broad risk-off regimes.',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 2 · Daily · BTC',
|
||||
title: 'BTC Macro-Bottom 2-of-3 Confluence',
|
||||
answer:
|
||||
'The live BTC engine uses three classic bottom markers and only fires a low-frequency long-only signal when at least two of them agree.',
|
||||
paragraphs: [
|
||||
'The production system no longer depends on premium on-chain feeds. It now uses a more durable public-price framework that is easier to verify, easier to operate, and less brittle under vendor changes.',
|
||||
'This scanner runs once a day because it is solving a cycle-level problem, not an intraday one. The question is not whether BTC can bounce today, but whether the market is entering a region that deserves multi-month exposure.',
|
||||
],
|
||||
formula: `signal fires if count(
|
||||
AHR999 < 0.45,
|
||||
price <= 200-week MA * 1.05,
|
||||
Pi Cycle Bottom true
|
||||
) >= 2`,
|
||||
bullets: [
|
||||
'2-of-3 agreement carries more weight than any single indicator',
|
||||
'Long only by design; it does not try to fade uptrends with short signals',
|
||||
'Exit logic is built around capital protection and cycle capture, not fixed profit targets',
|
||||
],
|
||||
limitation:
|
||||
'This method is intentionally late relative to the exact wick low. It accepts that trade-off to reduce the chance of confusing a mid-cycle correction with a structural bottom.',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 3 · Daily · KOL',
|
||||
title: 'KOL Long-Form Thesis Extraction',
|
||||
answer:
|
||||
'The KOL engine ingests long-form writing, blogs, and podcast descriptions, then extracts explicit asset views and separates true trade calls from soft mentions.',
|
||||
paragraphs: [
|
||||
'Long-form sources tend to include fuller reasoning, clearer sizing language, and more precise timing than short social posts. That makes them better raw material for a retrieval-friendly signal archive.',
|
||||
'The output includes not only the ticker and action, but also a conviction score and the shortest supporting quote. That gives both the UI and downstream retrieval systems access to view plus evidence, not just a label.',
|
||||
],
|
||||
formula: `{
|
||||
"summary": "<thesis>",
|
||||
"tickers": [
|
||||
{
|
||||
"ticker": "BTC",
|
||||
"action": "buy | sell | bullish | bearish | mention",
|
||||
"conviction": 0.0-1.0,
|
||||
"quote": "<supporting sentence>"
|
||||
}
|
||||
]
|
||||
}`,
|
||||
bullets: [
|
||||
'buy / sell means the author explicitly states a trade action',
|
||||
'bullish / bearish means directional intent without an explicit trade statement',
|
||||
'mention means the asset appears but the text is not strong enough to treat as a call',
|
||||
],
|
||||
limitation:
|
||||
'Context is the hard part. Historical references, sponsor segments, irony, and vague thesis language all reduce extraction quality, so the filters are intentionally conservative.',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 4 · Daily · Cross-check',
|
||||
title: 'Talks-vs-Trades Divergence',
|
||||
answer:
|
||||
'When a KOL’s public stance and wallet behavior point in opposite directions on the same asset, the engine treats the wallet move as the higher-priority truth signal.',
|
||||
paragraphs: [
|
||||
'This module models “what was said” separately from “what was done.” Public narrative can move sentiment, but wallet changes are closer to actual risk exposure. When the two conflict, the on-chain action usually contains more information.',
|
||||
'The current implementation scans a ±7 day window around a KOL post and maps new positions or adds to long action, while reductions and exits map to short action.',
|
||||
],
|
||||
formula: `LONG_INTENT + SHORT_ACTION => DIVERGENCE (short)
|
||||
SHORT_INTENT + LONG_ACTION => DIVERGENCE (long)
|
||||
LONG_INTENT + LONG_ACTION => ALIGNMENT
|
||||
SHORT_INTENT + SHORT_ACTION => ALIGNMENT`,
|
||||
bullets: [
|
||||
'Publicly bullish while reducing the wallet position becomes a short-style divergence',
|
||||
'Publicly bearish while adding to the wallet position becomes a long-style divergence',
|
||||
'Alignment boosts confidence, but it is not automatically a contrarian trade',
|
||||
],
|
||||
limitation:
|
||||
'Coverage still depends on known wallets. A KOL can split risk across multiple addresses, exchanges, or unlabeled accounts, so divergence is high quality but not guaranteed full-balance visibility.',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 5 · Hourly · Derivatives',
|
||||
title: 'Funding Rate Extreme Reversal',
|
||||
answer:
|
||||
'The funding engine is not chasing price. It watches crowding and looks for mean reversion after leverage has become one-sided enough to create liquidation risk.',
|
||||
paragraphs: [
|
||||
'Perpetual funding rates are a direct lens into leverage tilt. If longs keep paying, the long side is crowded. If shorts keep paying, the short side is crowded. Extreme crowding often precedes violent squeezes in the opposite direction.',
|
||||
'The live UI emphasizes 30-day cumulative funding and current state, which makes crowding easier to interpret than isolated single-print readings.',
|
||||
],
|
||||
formula: `30d cumulative funding >= +3% and mean-reverting => SHORT bias
|
||||
30d cumulative funding <= -3% and mean-reverting => LONG bias`,
|
||||
bullets: [
|
||||
'Cumulative funding is more useful than single-point funding for persistent crowd detection',
|
||||
'The trade idea is to fade the crowd, not to join it',
|
||||
'Useful as a standalone crowding monitor or as confirmation for other systems',
|
||||
],
|
||||
limitation:
|
||||
'Funding extremes can persist longer than expected. The signal is a condition alert, not a guarantee of immediate reversal, so position sizing and stop logic still matter.',
|
||||
},
|
||||
{
|
||||
tag: 'Signal 6 · Execution layer',
|
||||
title: 'Hyperliquid Auto-Trader and Safety Model',
|
||||
answer:
|
||||
'The auto-trader exists to standardize execution and enforce risk constraints, not to manufacture edge out of a weak signal.',
|
||||
paragraphs: [
|
||||
'Trump Alpha connects to Hyperliquid through a trade-only API key class. The system can submit and manage trades, but it does not have withdrawal rights and does not touch wallet private keys.',
|
||||
'Today the auto-trader is wired to the Trump Truth Social engine only. BTC macro-bottom, KOL thesis extraction, and divergence remain research and decision-support layers by default.',
|
||||
],
|
||||
bullets: [
|
||||
'Minimum confidence threshold',
|
||||
'Isolated margin',
|
||||
'TP/SL attached at entry',
|
||||
'Daily budget cap',
|
||||
'Active trading window',
|
||||
'Per-trade position cap',
|
||||
],
|
||||
limitation:
|
||||
'Execution hygiene cannot turn a bad signal into a good trade. It reduces operational mistakes, but it cannot replace strategy edge.',
|
||||
},
|
||||
],
|
||||
footer:
|
||||
'Methodology last updated in May 2026. This page is revised whenever live logic changes.',
|
||||
footerLinks: {
|
||||
contact: 'Contact',
|
||||
glossary: 'Glossary',
|
||||
caseStudies: 'Case Studies',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
async function generateMetadata({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ locale: string }>
|
||||
}): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
|
||||
return {
|
||||
title: copy.title,
|
||||
description: copy.description,
|
||||
keywords: copy.keywords,
|
||||
openGraph: {
|
||||
title: copy.ogTitle,
|
||||
description: copy.ogDescription,
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/methodology`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/methodology`,
|
||||
'x-default': `${siteUrl}/en/methodology`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// TechArticle JSON-LD: tells Google (and AI crawlers) this is authoritative
|
||||
// technical documentation, not marketing copy. Improves likelihood of being
|
||||
// cited by Perplexity/ChatGPT when answering "how does X work" questions.
|
||||
const methodologyJsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'TechArticle',
|
||||
headline: 'Signal Methodology — How Each Engine Works',
|
||||
description:
|
||||
'Full technical documentation of all six Trump Alpha signal engines: Trump sentiment, BTC macro-bottom 2-of-3 confluence, KOL long-form extraction, talks-vs-trades divergence, funding rate reversal, and Hyperliquid auto-trader safety model.',
|
||||
url: `${siteUrl}/en/methodology`,
|
||||
datePublished: '2025-01-01',
|
||||
dateModified: new Date().toISOString().slice(0, 10),
|
||||
inLanguage: 'en',
|
||||
author: { '@type': 'Organization', name: 'Trump Alpha', url: siteUrl },
|
||||
publisher: { '@type': 'Organization', name: 'Trump Alpha', url: siteUrl },
|
||||
about: [
|
||||
{ '@type': 'Thing', name: 'Trump Truth Social crypto signals' },
|
||||
{ '@type': 'Thing', name: 'Bitcoin macro bottom indicators' },
|
||||
{ '@type': 'Thing', name: 'AHR999 indicator' },
|
||||
{ '@type': 'Thing', name: 'Pi Cycle Bottom' },
|
||||
{ '@type': 'Thing', name: 'KOL on-chain divergence' },
|
||||
{ '@type': 'Thing', name: 'Hyperliquid perpetual trading' },
|
||||
],
|
||||
isPartOf: { '@type': 'WebSite', name: 'Trump Alpha', url: siteUrl },
|
||||
}
|
||||
|
||||
const SECTION_STYLE = {
|
||||
borderTop: '1px solid var(--line)',
|
||||
paddingTop: 32,
|
||||
marginTop: 32,
|
||||
}
|
||||
|
||||
const H2 = { fontSize: 20, fontWeight: 700, color: 'var(--ink)', marginBottom: 12, lineHeight: 1.3 }
|
||||
const P = { fontSize: 14, color: 'var(--ink-2)', lineHeight: 1.75, marginBottom: 12 }
|
||||
const LI = { fontSize: 14, color: 'var(--ink-2)', lineHeight: 1.75, marginBottom: 6 }
|
||||
|
||||
function Tag({ children, color = 'var(--amber)' }: { children: string; color?: string }) {
|
||||
return (
|
||||
<span
|
||||
style={{
|
||||
display: 'inline-block',
|
||||
fontSize: 10,
|
||||
fontWeight: 700,
|
||||
letterSpacing: '0.07em',
|
||||
textTransform: 'uppercase',
|
||||
fontFamily: 'monospace',
|
||||
padding: '3px 8px',
|
||||
borderRadius: 4,
|
||||
background: `color-mix(in srgb, ${color} 12%, transparent)`,
|
||||
color,
|
||||
marginBottom: 12,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
function Formula({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
fontFamily: 'monospace',
|
||||
fontSize: 13,
|
||||
background: 'var(--bg-sunk)',
|
||||
border: '1px solid var(--line)',
|
||||
borderRadius: 8,
|
||||
padding: '14px 18px',
|
||||
color: 'var(--ink)',
|
||||
margin: '12px 0',
|
||||
overflowX: 'auto',
|
||||
whiteSpace: 'pre-wrap',
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default function MethodologyPage() {
|
||||
const locale = 'en'
|
||||
const copy = getCopy(locale)
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(methodologyJsonLd) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: copy.heroTitle, path: `/${locale}/methodology` }]} />
|
||||
<div className="page" style={{ maxWidth: 760 }}>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{copy.heroTitle}</h1>
|
||||
<p className="page-sub">{copy.heroSubtitle}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ padding: '28px 32px' }}>
|
||||
<p style={{ ...P, color: 'var(--ink-3)', fontStyle: 'italic' }}>{copy.intro}</p>
|
||||
|
||||
{copy.sections.map((section, index) => (
|
||||
<section key={section.title} style={SECTION_STYLE}>
|
||||
<Tag color={index % 2 === 0 ? 'var(--amber)' : 'var(--violet, #a78bfa)'}>
|
||||
{section.tag}
|
||||
</Tag>
|
||||
<h2 style={H2}>{section.title}</h2>
|
||||
|
||||
<p style={P}>
|
||||
<strong>{isZh ? '直接结论:' : 'Direct answer:'}</strong> {section.answer}
|
||||
</p>
|
||||
|
||||
{section.paragraphs.map((paragraph) => (
|
||||
<p key={paragraph} style={P}>
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
|
||||
{section.formula && <Formula>{section.formula}</Formula>}
|
||||
|
||||
{section.bullets && (
|
||||
<ul style={{ paddingLeft: 20 }}>
|
||||
{section.bullets.map((item) => (
|
||||
<li key={item} style={LI}>
|
||||
{item}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
<p style={{ ...P, color: 'var(--ink-3)' }}>
|
||||
<strong>{isZh ? '已知限制:' : 'Known limitation:'}</strong> {section.limitation}
|
||||
</p>
|
||||
</section>
|
||||
))}
|
||||
|
||||
<div style={{ ...SECTION_STYLE, borderTop: '1px solid var(--line)' }}>
|
||||
<p style={{ ...P, color: 'var(--ink-4)', fontSize: 12 }}>
|
||||
{copy.footer}{' '}
|
||||
<Link href={`/${locale}/contact`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerLinks.contact}
|
||||
</Link>
|
||||
. {isZh ? '另见:' : 'See also:'}{' '}
|
||||
<Link href={`/${locale}/glossary`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerLinks.glossary}
|
||||
</Link>{' '}
|
||||
·{' '}
|
||||
<Link href={`/${locale}/case-studies`} style={{ color: 'var(--amber)' }}>
|
||||
{copy.footerLinks.caseStudies}
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return {
|
||||
props: { ...{}, seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }) },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function Redirect() {
|
||||
return null
|
||||
}
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async ({ params }) =>
|
||||
params?.locale !== 'en'
|
||||
? { notFound: true }
|
||||
: { redirect: { destination: '/en/trump', permanent: true } }
|
||||
@@ -0,0 +1,114 @@
|
||||
import type { Metadata } from 'next'
|
||||
import Link from 'next/link'
|
||||
|
||||
const _base = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
const metadata: Metadata = {
|
||||
title: 'Privacy Policy',
|
||||
description:
|
||||
'Trump Alpha privacy policy: what data we collect, how your Hyperliquid API key is stored encrypted, and your rights.',
|
||||
alternates: { canonical: `${_base}/en/privacy` },
|
||||
robots: { index: true, follow: true },
|
||||
}
|
||||
|
||||
export default function PrivacyPage() {
|
||||
const locale = 'en'
|
||||
const intlLocale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
const sections = isZh
|
||||
? [
|
||||
{
|
||||
title: '1. 我们收集什么',
|
||||
body: '当你连接钱包时,我们会收集你的钱包地址,用于身份识别、订阅状态判断和机器人配置关联。除非你主动通过联系表单提供,我们不会收集姓名、邮箱等传统个人身份信息。',
|
||||
},
|
||||
{
|
||||
title: '2. Hyperliquid API Key',
|
||||
body: '如果你选择绑定 Hyperliquid API key,该密钥会以加密形式存储。明文不会被写入日志,也不会用于除 Hyperliquid 官方交易接口以外的用途。',
|
||||
},
|
||||
{
|
||||
title: '3. 数据如何使用',
|
||||
body: '钱包地址、订阅状态和交易配置只会用于执行你授权的机器人逻辑、展示个人交易表现,以及提供平台功能。我们不会出售、出租或用于广告投放。',
|
||||
},
|
||||
{
|
||||
title: '4. 分析与统计',
|
||||
body: '我们使用极简统计来理解页面访问、错误率和整体使用趋势。这些统计不会绑定你的真实身份,也不会用于跨站广告追踪。',
|
||||
},
|
||||
{
|
||||
title: '5. 数据保留',
|
||||
body: '只要你的账户仍在使用,相关订阅与配置数据会被保留。你可以联系我们请求删除。交易历史最多保留 24 个月,用于对账、争议处理和产品分析。',
|
||||
},
|
||||
{
|
||||
title: '6. 联系方式',
|
||||
body: '如果你有与隐私相关的问题,请使用联系页面与我们沟通。',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
title: '1. Information We Collect',
|
||||
body: 'When you connect a wallet, we collect the wallet address required to identify your account, check subscription status, and link bot settings. We do not collect names, email addresses, or similar personal identifiers unless you voluntarily provide them through the contact form.',
|
||||
},
|
||||
{
|
||||
title: '2. Hyperliquid API Keys',
|
||||
body: 'If you connect a Hyperliquid API key, the key is stored in encrypted form. Plaintext keys are not written to logs and are only used for calls to official Hyperliquid trading endpoints.',
|
||||
},
|
||||
{
|
||||
title: '3. How We Use Data',
|
||||
body: 'Wallet addresses, subscription status, and trading settings are used only to run the bot logic you authorize, show your personal trading analytics, and operate product features. We do not sell, rent, or repurpose this data for advertising.',
|
||||
},
|
||||
{
|
||||
title: '4. Analytics',
|
||||
body: 'We use minimal analytics to understand page usage, error rates, and aggregate product patterns. These analytics are not tied to your real-world identity and are not used for cross-site advertising.',
|
||||
},
|
||||
{
|
||||
title: '5. Data Retention',
|
||||
body: 'Subscription and configuration data is retained while your account remains active. You may request deletion by contacting us. Trade-history records are retained for up to 24 months for reconciliation, dispute handling, and product analysis.',
|
||||
},
|
||||
{
|
||||
title: '6. Contact',
|
||||
body: 'If you have a privacy-related question, please use the contact page.',
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="page" style={{ maxWidth: 720 }}>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{isZh ? '隐私政策' : 'Privacy Policy'}</h1>
|
||||
<p className="page-sub">{isZh ? '最后更新:2026 年 4 月' : 'Last updated: April 2026'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="card"
|
||||
style={{ padding: 32, lineHeight: 1.7, fontSize: 14, color: 'var(--ink-2)' }}
|
||||
>
|
||||
{sections.map((section, index) => (
|
||||
<div key={section.title} style={{ marginBottom: index === sections.length - 1 ? 0 : 20 }}>
|
||||
<h2 style={{ fontSize: 16, fontWeight: 600, color: 'var(--ink)', marginBottom: 8 }}>
|
||||
{section.title}
|
||||
</h2>
|
||||
<p style={{ marginBottom: 0 }}>
|
||||
{section.title.endsWith('Contact') || section.title.endsWith('联系方式') ? (
|
||||
<>
|
||||
{section.body}{' '}
|
||||
<Link href={`/${locale}/contact`} style={{ color: 'var(--amber)' }}>
|
||||
{isZh ? '联系页面' : 'contact page'}
|
||||
</Link>
|
||||
.
|
||||
</>
|
||||
) : (
|
||||
section.body
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: metadata } }
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { Metadata } from 'next'
|
||||
import SettingsClient from '@/screens/settings/SettingsClient'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
async function generateMetadata(): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
const title = isZh ? '机器人设置与订阅' : 'Bot Settings & Subscription'
|
||||
const description = isZh
|
||||
? '配置订阅状态、Hyperliquid API、风控参数、自动交易模式和提醒渠道。这里决定 Trump Alpha 如何代表你执行。'
|
||||
: 'Configure subscription state, Hyperliquid API access, risk controls, auto-trade mode, and alert channels. This page defines how Trump Alpha executes for you.'
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/settings`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/settings`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default function SettingsPage() {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
return (
|
||||
<div className="page">
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{isZh ? '设置' : 'Settings'}</h1>
|
||||
<p className="page-sub">
|
||||
{isZh
|
||||
? '订阅、交易所密钥、风险限制和运行时间安排,都会在这里配置。'
|
||||
: 'Subscription, exchange key, risk limits, and schedule — everything that decides how the bot trades.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<SettingsClient />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: await generateMetadata() } }
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
const _base = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
const metadata: Metadata = {
|
||||
title: 'Terms of Service',
|
||||
description:
|
||||
'Trump Alpha terms of service: non-investment-advice disclaimer, risk disclosure, and permitted use of the platform.',
|
||||
alternates: { canonical: `${_base}/en/terms` },
|
||||
robots: { index: true, follow: true },
|
||||
}
|
||||
|
||||
export default function TermsPage() {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
const sections = isZh
|
||||
? [
|
||||
{
|
||||
title: '1. 接受条款',
|
||||
body: '当你连接钱包或使用 Trump Alpha 时,就表示你接受这些服务条款。如果你不同意,请不要继续使用。',
|
||||
},
|
||||
{
|
||||
title: '2. 非投资建议',
|
||||
body: 'Trump Alpha 是研究与自动化工具,不是财务顾问。所有信号、AI 分析和自动交易能力都只提供信息与执行工具,不构成投资建议。',
|
||||
},
|
||||
{
|
||||
title: '3. 风险披露',
|
||||
body: '加密货币和杠杆交易都伴随显著风险,损失可能超过你的初始投入。开启自动交易前,你需要自行理解并接受这些风险。',
|
||||
},
|
||||
{
|
||||
title: '4. 允许用途',
|
||||
body: '你可以将 Trump Alpha 用于个人、非商业目的。未经许可,不得反向工程、批量抓取、转售或重新分发平台上的数据与信号。',
|
||||
},
|
||||
{
|
||||
title: '5. 服务可用性',
|
||||
body: '我们会尽量保持高可用,但不保证平台永远不中断。计划维护、基础设施故障或第三方 API 异常都可能影响服务。',
|
||||
},
|
||||
{
|
||||
title: '6. 条款更新',
|
||||
body: '我们可能会在未来更新这些条款。更新后继续使用服务,即视为你接受新版本条款。',
|
||||
},
|
||||
{
|
||||
title: '7. 责任限制',
|
||||
body: '在法律允许的最大范围内,Trump Alpha 及其运营方不对因使用本服务而产生的间接损失、附带损失或交易损失承担责任。',
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
title: '1. Acceptance',
|
||||
body: 'By connecting a wallet or using Trump Alpha, you accept these Terms of Service. If you do not agree, do not use the product.',
|
||||
},
|
||||
{
|
||||
title: '2. Not Financial Advice',
|
||||
body: 'Trump Alpha is a research and automation tool, not a financial advisor. All signals, AI analysis, and auto-trading capabilities are provided as information and execution tooling, not as investment advice.',
|
||||
},
|
||||
{
|
||||
title: '3. Risk Disclosure',
|
||||
body: 'Crypto trading and leverage both involve significant risk, including the possibility of losses greater than your initial capital. You are responsible for understanding and accepting those risks before enabling automation.',
|
||||
},
|
||||
{
|
||||
title: '4. Permitted Use',
|
||||
body: 'You may use Trump Alpha for personal, non-commercial purposes. You may not reverse-engineer, bulk scrape, resell, or redistribute platform data or signals without permission.',
|
||||
},
|
||||
{
|
||||
title: '5. Service Availability',
|
||||
body: 'We aim for high availability, but we do not guarantee uninterrupted service. Maintenance, infrastructure issues, or third-party API outages may affect the platform.',
|
||||
},
|
||||
{
|
||||
title: '6. Modifications',
|
||||
body: 'We may update these terms in the future. Continued use of the service after changes means you accept the updated version.',
|
||||
},
|
||||
{
|
||||
title: '7. Limitation of Liability',
|
||||
body: 'To the maximum extent permitted by law, Trump Alpha and its operators are not liable for indirect damages, incidental damages, or trading losses arising from use of the service.',
|
||||
},
|
||||
]
|
||||
|
||||
return (
|
||||
<div className="page" style={{ maxWidth: 720 }}>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">{isZh ? '服务条款' : 'Terms of Service'}</h1>
|
||||
<p className="page-sub">{isZh ? '最后更新:2026 年 4 月' : 'Last updated: April 2026'}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="card"
|
||||
style={{ padding: 32, lineHeight: 1.7, fontSize: 14, color: 'var(--ink-2)' }}
|
||||
>
|
||||
{sections.map((section, index) => (
|
||||
<div key={section.title} style={{ marginBottom: index === sections.length - 1 ? 0 : 20 }}>
|
||||
<h2 style={{ fontSize: 16, fontWeight: 600, color: 'var(--ink)', marginBottom: 8 }}>
|
||||
{section.title}
|
||||
</h2>
|
||||
<p style={{ marginBottom: 0 }}>
|
||||
{section.title.includes('Not Financial Advice') ||
|
||||
section.title.includes('非投资建议') ? (
|
||||
<>
|
||||
<strong style={{ color: 'var(--ink)' }}>{section.body}</strong>
|
||||
</>
|
||||
) : (
|
||||
section.body
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: metadata } }
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import type { Metadata } from 'next'
|
||||
import TradesPageClient from '@/screens/trades/TradesPageClient'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
async function generateMetadata(): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
const title = isZh ? '交易执行与持仓' : 'Trades & Open Positions'
|
||||
const description = isZh
|
||||
? '查看当前持仓、历史成交、按信号来源拆分的盈亏,以及机器人是否已经具备真实执行条件。'
|
||||
: 'Review open positions, historical executions, source-level P&L, and whether the bot is ready for live trading.'
|
||||
return {
|
||||
title,
|
||||
description,
|
||||
openGraph: { title, description },
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/${locale}/trades`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/trades`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GEO: the trade history is a dataset — every bot execution with entry/exit,
|
||||
// P&L, hold time, and the signal that triggered it. Cited for "track record"
|
||||
// and "does it work" queries.
|
||||
const tradesDataset = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Dataset',
|
||||
'@id': `${siteUrl}/en/trades#dataset`,
|
||||
name: 'Trump Alpha trade execution history',
|
||||
description:
|
||||
'Per-wallet record of signal-triggered trades: asset, direction, entry and exit price, realised P&L, hold time, and the triggering signal. Private to each wallet owner — wallet signature required to view.',
|
||||
url: `${siteUrl}/en/trades`,
|
||||
keywords: ['crypto trading track record', 'Hyperliquid', 'P&L', 'signal performance'],
|
||||
// Data is private (wallet-signed access), not freely accessible to the public
|
||||
isAccessibleForFree: false,
|
||||
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
|
||||
publisher: { '@id': `${siteUrl}/#org` },
|
||||
license: `${siteUrl}/en/terms`,
|
||||
temporalCoverage: '2025-01-01/..',
|
||||
}
|
||||
|
||||
export default function TradesPage() {
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(tradesDataset) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: 'Trades', path: '/en/trades' }]} />
|
||||
<TradesPageClient />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
return { props: { ...{}, seo: await generateMetadata() } }
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
import { type PostListResponse } from '@/lib/api'
|
||||
import type { Metadata } from 'next'
|
||||
import TrumpPageClient from '@/screens/trump/TrumpPageClient'
|
||||
import Breadcrumbs from '@/components/seo/Breadcrumbs'
|
||||
import { getInitialPostPage } from '@/lib/postPage'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
interface TrumpPageProps {
|
||||
params: Promise<{ locale: string }>
|
||||
}
|
||||
|
||||
async function generateMetadata({ params }: TrumpPageProps): Promise<Metadata> {
|
||||
const locale = 'en'
|
||||
const isZh = false // i18n shelved — Chinese branches kept as dead code for future revival; see messages/zh.json
|
||||
|
||||
return {
|
||||
title: isZh ? 'Trump Truth Social 实时信号' : 'Trump Truth Social Signals',
|
||||
description: isZh
|
||||
? '实时抓取并打分 Donald Trump 的 Truth Social 帖子,3 秒内判断是 LONG、SHORT 还是噪音,并可选择在 Hyperliquid 上以逐仓模式自动执行。'
|
||||
: 'Real-time AI scoring of every Trump Truth Social post. Classified as LONG, SHORT, or NOISE within 3 seconds. Optional auto-trade on Hyperliquid with isolated margin.',
|
||||
keywords: isZh
|
||||
? [
|
||||
'Trump 加密信号',
|
||||
'Truth Social 交易信号',
|
||||
'特朗普发帖行情',
|
||||
'Trump 自动交易',
|
||||
'Hyperliquid 机器人',
|
||||
'Trump 加密信号',
|
||||
]
|
||||
: [
|
||||
'Trump crypto signal',
|
||||
'Truth Social crypto',
|
||||
'Trump Truth Social trading bot',
|
||||
'Trump market signal',
|
||||
'crypto auto-trader',
|
||||
'Hyperliquid bot',
|
||||
],
|
||||
openGraph: {
|
||||
title: isZh
|
||||
? 'Trump Truth Social 实时信号 | Trump Alpha'
|
||||
: 'Trump Truth Social Signals | Trump Alpha',
|
||||
description: isZh
|
||||
? '每条 Trump 帖子都在 3 秒内完成 AI 分类,输出方向、信心分和是否可执行,并支持 Hyperliquid 自动交易。'
|
||||
: 'Every Trump post scored by AI in under 3 seconds. LONG, SHORT, or NOISE — with optional Hyperliquid auto-trade.',
|
||||
},
|
||||
alternates: {
|
||||
canonical: `${siteUrl}/en/trump`,
|
||||
languages: {
|
||||
en: `${siteUrl}/en/trump`,
|
||||
'x-default': `${siteUrl}/en/trump`,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// GEO: the live Trump signal feed is a dataset. schema.org/Dataset is highly
|
||||
// cited by AI answer engines for "data / history of X" queries. Endorphin is
|
||||
// the creator; the feed is free and continuously updated.
|
||||
const trumpDataset = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Dataset',
|
||||
'@id': `${siteUrl}/en/trump#dataset`,
|
||||
name: 'Trump Truth Social crypto-signal feed',
|
||||
description:
|
||||
'Time-stamped feed of Donald Trump Truth Social posts classified for crypto market impact (long / short / noise) with a confidence score and the realised short-term price move. Updated within seconds of each post.',
|
||||
url: `${siteUrl}/en/trump`,
|
||||
keywords: ['Trump', 'Truth Social', 'Bitcoin', 'crypto signal', 'sentiment'],
|
||||
isAccessibleForFree: true,
|
||||
creator: { '@type': 'Organization', name: 'Endorphin', url: siteUrl },
|
||||
publisher: { '@id': `${siteUrl}/#org` },
|
||||
license: `${siteUrl}/en/terms`,
|
||||
measurementTechnique: 'NLP sentiment classification with confidence scoring',
|
||||
temporalCoverage: '2025-01-01/..',
|
||||
}
|
||||
|
||||
export default function TrumpPage({ initialData }: Awaited<ReturnType<typeof loadData>>) {
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(trumpDataset) }}
|
||||
/>
|
||||
<Breadcrumbs items={[{ name: 'Trump signals', path: '/en/trump' }]} />
|
||||
<TrumpPageClient initialData={initialData} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
const initialData: PostListResponse | null = await getInitialPostPage(30, 1, {
|
||||
source: 'truth',
|
||||
legacyFallbackSource: 'truth',
|
||||
})
|
||||
|
||||
return { initialData }
|
||||
}
|
||||
|
||||
export const getServerSideProps: import('next').GetServerSideProps = async (context) => {
|
||||
if (context.params?.locale !== 'en') return { notFound: true }
|
||||
context.res.setHeader('Cache-Control', 'public, s-maxage=30, stale-while-revalidate=60')
|
||||
return {
|
||||
props: {
|
||||
...(await loadData()),
|
||||
seo: await generateMetadata({ params: Promise.resolve({ locale: 'en' }) }),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import type { AppProps } from 'next/app'
|
||||
import { NextIntlClientProvider } from 'next-intl'
|
||||
import Link from 'next/link'
|
||||
import Script from 'next/script'
|
||||
import Providers from '@/components/Providers'
|
||||
import Navbar from '@/components/nav/Navbar'
|
||||
import TradeAlertBanner from '@/components/ui/TradeAlertBanner'
|
||||
import { PageHead } from '@/components/PageHead'
|
||||
import { jsonLd } from '@/lib/structuredData'
|
||||
import messages from '@/messages/en.json'
|
||||
import '@rainbow-me/rainbowkit/styles.css'
|
||||
import '@/styles/globals.css'
|
||||
import '@/styles/landing.css'
|
||||
export default function App({ Component, pageProps, router }: AppProps) {
|
||||
const landing = router.pathname === '/'
|
||||
return (
|
||||
<NextIntlClientProvider locale="en" messages={messages} timeZone="UTC">
|
||||
<PageHead seo={pageProps.seo} />
|
||||
<Script
|
||||
src="https://stats.bitnews.day/script.js"
|
||||
data-website-id="708f06cc-3bd0-4b49-8e81-69289b7f1b42"
|
||||
strategy="afterInteractive"
|
||||
/>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd).replace(/</g, '\u003c') }}
|
||||
/>
|
||||
{landing ? (
|
||||
<Component {...pageProps} />
|
||||
) : (
|
||||
<Providers>
|
||||
<Navbar />
|
||||
<TradeAlertBanner />
|
||||
<main>
|
||||
<Component {...pageProps} />
|
||||
</main>
|
||||
<footer className="flex flex-wrap items-center gap-4 border-t p-8 text-xs text-muted-foreground">
|
||||
<span>© {new Date().getFullYear()} Trump Alpha — a research project by Endorphin</span>
|
||||
{['methodology', 'glossary', 'case-studies', 'privacy', 'terms', 'contact'].map(
|
||||
(path) => (
|
||||
<Link key={path} href={`/en/${path}`}>
|
||||
{path.replaceAll('-', ' ')}
|
||||
</Link>
|
||||
),
|
||||
)}
|
||||
</footer>
|
||||
</Providers>
|
||||
)}
|
||||
</NextIntlClientProvider>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Html, Head, Main, NextScript } from 'next/document'
|
||||
export default function Document() {
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head />
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Apple touch icon (180×180) — also used as the PWA icon source.
|
||||
*
|
||||
* iOS Safari grabs <link rel="apple-touch-icon"> when "Add to Home Screen"
|
||||
* is invoked. Next.js auto-wires this file to that link.
|
||||
*/
|
||||
import { ImageResponse } from 'next/og'
|
||||
|
||||
const size = { width: 180, height: 180 }
|
||||
const contentType = 'image/png'
|
||||
|
||||
function AppleIcon() {
|
||||
return new ImageResponse(
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
background: '#0a0907',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
fontSize: 132,
|
||||
fontWeight: 700,
|
||||
color: '#f5a524',
|
||||
fontFamily: 'system-ui, sans-serif',
|
||||
lineHeight: 1,
|
||||
borderRadius: 24,
|
||||
}}
|
||||
>
|
||||
α
|
||||
</div>,
|
||||
{ ...size },
|
||||
)
|
||||
}
|
||||
|
||||
export default async function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
const image = AppleIcon()
|
||||
res.setHeader('Content-Type', 'image/png')
|
||||
res.setHeader('Cache-Control', 'public, max-age=86400')
|
||||
res.send(Buffer.from(await image.arrayBuffer()))
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Dynamic favicon. Renders the brand mark (α) on the dark brand background.
|
||||
*
|
||||
* Next.js auto-discovers this file and wires it into the page <head> as
|
||||
* <link rel="icon"> for every route. No static asset needed in /public.
|
||||
*
|
||||
* For larger PWA install icons (192/512), see app/apple-icon.tsx and the
|
||||
* manifest.ts entries that reference them.
|
||||
*/
|
||||
import { ImageResponse } from 'next/og'
|
||||
|
||||
const size = { width: 64, height: 64 }
|
||||
const contentType = 'image/png'
|
||||
|
||||
function Icon() {
|
||||
return new ImageResponse(
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
background: '#0a0907',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
fontSize: 44,
|
||||
fontWeight: 700,
|
||||
color: '#f5a524',
|
||||
fontFamily: 'system-ui, sans-serif',
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
α
|
||||
</div>,
|
||||
{ ...size },
|
||||
)
|
||||
}
|
||||
|
||||
export default async function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
const image = Icon()
|
||||
res.setHeader('Content-Type', 'image/png')
|
||||
res.setHeader('Cache-Control', 'public, max-age=86400')
|
||||
res.send(Buffer.from(await image.arrayBuffer()))
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import type { MetadataRoute } from 'next'
|
||||
|
||||
function manifest(): MetadataRoute.Manifest {
|
||||
return {
|
||||
name: 'Trump Alpha',
|
||||
short_name: 'Trump Alpha',
|
||||
description:
|
||||
'Four crypto alpha feeds, one dashboard. Trump signals, BTC on-chain, KOL analysis, talks-vs-trades.',
|
||||
start_url: '/en',
|
||||
display: 'standalone',
|
||||
background_color: '#0a0907',
|
||||
theme_color: '#f5a524',
|
||||
orientation: 'portrait-primary',
|
||||
categories: ['finance', 'utilities'],
|
||||
// Icons sourced from Next's dynamic generators (app/icon.tsx,
|
||||
// app/apple-icon.tsx) — no static PNG asset required. `sizes: 'any'` lets
|
||||
// the install prompt accept whatever resolution the OS asks for since
|
||||
// ImageResponse renders at any size we declare in those files.
|
||||
icons: [
|
||||
{
|
||||
src: '/icon',
|
||||
sizes: 'any',
|
||||
type: 'image/png',
|
||||
purpose: 'any',
|
||||
},
|
||||
{
|
||||
src: '/apple-icon',
|
||||
sizes: '180x180',
|
||||
type: 'image/png',
|
||||
purpose: 'maskable',
|
||||
},
|
||||
],
|
||||
screenshots: [
|
||||
{
|
||||
src: '/opengraph-image',
|
||||
sizes: '1200x630',
|
||||
type: 'image/png',
|
||||
form_factor: 'wide',
|
||||
label: 'Trump Alpha dashboard',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
export default function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
res.setHeader('Content-Type', 'application/manifest+json')
|
||||
res.json(manifest())
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
import { ImageResponse } from 'next/og'
|
||||
|
||||
const alt = 'Trump Alpha — the crypto signals that move price before the crowd, by Endorphin'
|
||||
const size = { width: 1200, height: 630 }
|
||||
const contentType = 'image/png'
|
||||
|
||||
function OGImage() {
|
||||
return new ImageResponse(
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-start',
|
||||
justifyContent: 'flex-end',
|
||||
padding: '64px 72px',
|
||||
background: '#0a0907',
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
fontFamily: 'system-ui, sans-serif',
|
||||
}}
|
||||
>
|
||||
{/* Background grid */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
inset: 0,
|
||||
backgroundImage:
|
||||
'linear-gradient(rgba(245,165,36,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(245,165,36,0.04) 1px, transparent 1px)',
|
||||
backgroundSize: '48px 48px',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Ambient glow */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: -200,
|
||||
left: -200,
|
||||
width: 800,
|
||||
height: 800,
|
||||
borderRadius: '50%',
|
||||
background: 'radial-gradient(circle, rgba(245,165,36,0.12) 0%, transparent 70%)',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Top-right corner badge */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 48,
|
||||
right: 72,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 8,
|
||||
padding: '6px 14px',
|
||||
borderRadius: 999,
|
||||
background: 'rgba(245,165,36,0.12)',
|
||||
border: '1px solid rgba(245,165,36,0.3)',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
width: 8,
|
||||
height: 8,
|
||||
borderRadius: '50%',
|
||||
background: '#22c55e',
|
||||
}}
|
||||
/>
|
||||
<span style={{ fontSize: 14, color: '#f5a524', fontWeight: 700, letterSpacing: '0.06em' }}>
|
||||
LIVE
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Four signal pills */}
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
gap: 12,
|
||||
marginBottom: 40,
|
||||
flexWrap: 'wrap',
|
||||
}}
|
||||
>
|
||||
{[
|
||||
{ label: 'Trump · Truth Social', color: '#f5a524' },
|
||||
{ label: 'Macro Vibes', color: '#a78bfa' },
|
||||
{ label: 'KOL Signal', color: '#22c55e' },
|
||||
{ label: 'Talks vs Trades', color: '#ef4444' },
|
||||
].map((p) => (
|
||||
<div
|
||||
key={p.label}
|
||||
style={{
|
||||
display: 'flex',
|
||||
padding: '7px 16px',
|
||||
borderRadius: 6,
|
||||
background: 'rgba(255,255,255,0.05)',
|
||||
border: `1px solid ${p.color}40`,
|
||||
fontSize: 13,
|
||||
fontWeight: 600,
|
||||
color: p.color,
|
||||
letterSpacing: '0.02em',
|
||||
}}
|
||||
>
|
||||
{p.label}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Main title */}
|
||||
<div
|
||||
style={{
|
||||
fontSize: 72,
|
||||
fontWeight: 800,
|
||||
lineHeight: 1.05,
|
||||
color: '#f5f2ea',
|
||||
marginBottom: 24,
|
||||
letterSpacing: '-0.03em',
|
||||
}}
|
||||
>
|
||||
Trump Alpha
|
||||
</div>
|
||||
|
||||
{/* Sub */}
|
||||
<div
|
||||
style={{
|
||||
fontSize: 24,
|
||||
color: '#8a8578',
|
||||
fontWeight: 400,
|
||||
lineHeight: 1.5,
|
||||
maxWidth: 700,
|
||||
marginBottom: 0,
|
||||
}}
|
||||
>
|
||||
The crypto signals that move price before the crowd.
|
||||
<br />A research desk by Endorphin — public, live, timestamped.
|
||||
</div>
|
||||
|
||||
{/* Bottom right stat strip */}
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
bottom: 52,
|
||||
right: 72,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'flex-end',
|
||||
gap: 6,
|
||||
}}
|
||||
>
|
||||
{[
|
||||
{ v: '<3s', l: 'post → position' },
|
||||
{ v: '25', l: 'KOL feeds' },
|
||||
{ v: '$0', l: 'platform fee' },
|
||||
].map((s) => (
|
||||
<div key={s.l} style={{ display: 'flex', gap: 10, alignItems: 'baseline' }}>
|
||||
<span
|
||||
style={{ fontSize: 22, fontWeight: 700, color: '#f5a524', fontFamily: 'monospace' }}
|
||||
>
|
||||
{s.v}
|
||||
</span>
|
||||
<span style={{ fontSize: 13, color: '#5c584e' }}>{s.l}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>,
|
||||
{ ...size },
|
||||
)
|
||||
}
|
||||
|
||||
export default async function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
const image = OGImage()
|
||||
res.setHeader('Content-Type', 'image/png')
|
||||
res.setHeader('Cache-Control', 'public, max-age=86400')
|
||||
res.send(Buffer.from(await image.arrayBuffer()))
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
export const config = { api: { bodyParser: false, responseLimit: '8mb' } }
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const path = req.query.path
|
||||
if (!Array.isArray(path) || path.some((p) => p === '..' || p.includes('/') || p.includes('\\')))
|
||||
return res.status(400).json({ error: 'Invalid path' })
|
||||
const base = process.env.API_URL || process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'
|
||||
const target = new URL('/' + path.map(encodeURIComponent).join('/'), base)
|
||||
const incoming = new URL(req.url ?? '/', 'http://localhost')
|
||||
target.search = incoming.search
|
||||
const headers = new Headers()
|
||||
const hop = new Set([
|
||||
'host',
|
||||
'connection',
|
||||
'transfer-encoding',
|
||||
'content-length',
|
||||
'keep-alive',
|
||||
'upgrade',
|
||||
'x-forwarded-host',
|
||||
'x-forwarded-proto',
|
||||
])
|
||||
for (const [k, v] of Object.entries(req.headers))
|
||||
if (v && !hop.has(k)) headers.set(k, Array.isArray(v) ? v.join(',') : v)
|
||||
headers.set('accept-encoding', 'identity')
|
||||
try {
|
||||
const chunks: Buffer[] = []
|
||||
let bytes = 0
|
||||
for await (const chunk of req) {
|
||||
const b = Buffer.from(chunk)
|
||||
bytes += b.length
|
||||
if (bytes > 1024 * 1024) return res.status(413).end()
|
||||
chunks.push(b)
|
||||
}
|
||||
const body = req.method === 'GET' || req.method === 'HEAD' ? undefined : Buffer.concat(chunks)
|
||||
const upstream = await fetch(target, {
|
||||
method: req.method,
|
||||
headers,
|
||||
body,
|
||||
signal: AbortSignal.timeout(30_000),
|
||||
redirect: 'manual',
|
||||
})
|
||||
upstream.headers.forEach((v, k) => {
|
||||
if (!hop.has(k) && k !== 'content-encoding') res.setHeader(k, v)
|
||||
})
|
||||
res.status(upstream.status).send(Buffer.from(await upstream.arrayBuffer()))
|
||||
} catch {
|
||||
res.status(502).json({ error: 'Upstream request failed' })
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import type { MetadataRoute } from 'next'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://trumpsignal.com'
|
||||
|
||||
// Settings page is user-personalized (wallet address, HL keys, alert prefs).
|
||||
// Disallow under every locale prefix in case any /zh URLs survive in the wild
|
||||
// — i18n is shelved but the routes still resolve.
|
||||
const SETTINGS_DENY = ['/api/', '/_next/', '/en/settings', '/zh/settings']
|
||||
|
||||
function robots(): MetadataRoute.Robots {
|
||||
return {
|
||||
rules: [
|
||||
// Default: allow everything except private pages
|
||||
{
|
||||
userAgent: '*',
|
||||
allow: '/',
|
||||
disallow: SETTINGS_DENY,
|
||||
},
|
||||
|
||||
// ── Standard search crawlers ──────────────────────────────────────────
|
||||
{ userAgent: 'Googlebot', allow: '/' },
|
||||
{ userAgent: 'Bingbot', allow: '/' },
|
||||
{ userAgent: 'Slurp', allow: '/' }, // Yahoo
|
||||
{ userAgent: 'DuckDuckBot', allow: '/' },
|
||||
{ userAgent: 'YandexBot', allow: '/' },
|
||||
|
||||
// ── AI / LLM crawlers (GEO) ───────────────────────────────────────────
|
||||
// OpenAI — ChatGPT Browse + training
|
||||
{ userAgent: 'GPTBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
{ userAgent: 'ChatGPT-User', allow: '/', disallow: SETTINGS_DENY },
|
||||
{ userAgent: 'OAI-SearchBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Anthropic — Claude.ai + training (settings are already private so
|
||||
// we use a shorter deny list to let anthropic-ai see more content)
|
||||
{ userAgent: 'ClaudeBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
{ userAgent: 'anthropic-ai', allow: '/', disallow: ['/api/', '/_next/'] },
|
||||
// Perplexity AI
|
||||
{ userAgent: 'PerplexityBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Google — Gemini / AI Overviews / Bard training
|
||||
{ userAgent: 'Google-Extended', allow: '/', disallow: SETTINGS_DENY },
|
||||
{ userAgent: 'Googlebot-Extended', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Meta AI (Llama, Meta AI assistant)
|
||||
{ userAgent: 'meta-externalagent', allow: '/', disallow: SETTINGS_DENY },
|
||||
{ userAgent: 'FacebookBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Apple (Siri, AI features in Safari)
|
||||
{ userAgent: 'Applebot', allow: '/' },
|
||||
{ userAgent: 'Applebot-Extended', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Cohere — Command R, enterprise LLMs
|
||||
{ userAgent: 'cohere-ai', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Mistral / Le Chat
|
||||
{ userAgent: 'MistralAI-User', allow: '/', disallow: SETTINGS_DENY },
|
||||
// You.com AI search
|
||||
{ userAgent: 'YouBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
// Brave AI (Leo assistant)
|
||||
{ userAgent: 'Brave', allow: '/' },
|
||||
// Common Crawl — feeds many open-source LLM training datasets
|
||||
{ userAgent: 'CCBot', allow: '/', disallow: SETTINGS_DENY },
|
||||
],
|
||||
sitemap: `${siteUrl}/sitemap.xml`,
|
||||
host: siteUrl,
|
||||
}
|
||||
}
|
||||
|
||||
export default function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
const data = robots()
|
||||
const rules = Array.isArray(data.rules) ? data.rules : [data.rules]
|
||||
res.send(
|
||||
rules
|
||||
.map(
|
||||
(r) =>
|
||||
'User-agent: ' +
|
||||
(r.userAgent ?? '*') +
|
||||
'\n' +
|
||||
[r.allow]
|
||||
.flat()
|
||||
.filter(Boolean)
|
||||
.map((p) => 'Allow: ' + p)
|
||||
.join('\n') +
|
||||
'\n' +
|
||||
[r.disallow]
|
||||
.flat()
|
||||
.filter(Boolean)
|
||||
.map((p) => 'Disallow: ' + p)
|
||||
.join('\n'),
|
||||
)
|
||||
.join('\n') +
|
||||
'\nSitemap: ' +
|
||||
data.sitemap,
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import type { MetadataRoute } from 'next'
|
||||
|
||||
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL
|
||||
|
||||
// In production, warn loudly but don't crash — the sitemap will use the
|
||||
// fallback URL. Set NEXT_PUBLIC_SITE_URL in your deployment env to get the
|
||||
// correct absolute URLs in sitemap.xml.
|
||||
if (!siteUrl && process.env.NODE_ENV === 'production') {
|
||||
console.warn(
|
||||
'[sitemap] NEXT_PUBLIC_SITE_URL is not set — sitemap will use https://trumpsignal.com as fallback. ' +
|
||||
'Set this env var in your deployment to avoid incorrect sitemap URLs.',
|
||||
)
|
||||
}
|
||||
|
||||
const base = (siteUrl || 'https://trumpsignal.com').replace(/\/$/, '')
|
||||
|
||||
const routes: Array<{
|
||||
path: string
|
||||
priority: number
|
||||
freq: MetadataRoute.Sitemap[number]['changeFrequency']
|
||||
}> = [
|
||||
{ path: '', priority: 1.0, freq: 'hourly' },
|
||||
{ path: '/trump', priority: 0.9, freq: 'hourly' },
|
||||
{ path: '/macro', priority: 0.9, freq: 'daily' },
|
||||
{ path: '/kol', priority: 0.9, freq: 'daily' },
|
||||
{ path: '/trades', priority: 0.8, freq: 'daily' },
|
||||
{ path: '/analytics', priority: 0.7, freq: 'daily' },
|
||||
{ path: '/methodology', priority: 0.8, freq: 'monthly' },
|
||||
{ path: '/glossary', priority: 0.8, freq: 'monthly' },
|
||||
{ path: '/case-studies', priority: 0.8, freq: 'monthly' },
|
||||
// NOTE: /settings is intentionally NOT listed — it's user-personalized and
|
||||
// robots.ts disallows it. Listing it here while disallowing in robots is a
|
||||
// self-contradicting signal to crawlers. Keep private pages out of both.
|
||||
{ path: '/privacy', priority: 0.3, freq: 'yearly' },
|
||||
{ path: '/terms', priority: 0.3, freq: 'yearly' },
|
||||
{ path: '/contact', priority: 0.4, freq: 'monthly' },
|
||||
]
|
||||
|
||||
// i18n shelved — only emit English routes. Add 'zh' back when content is
|
||||
// actually translated (otherwise Google flags duplicate content under hreflang).
|
||||
const locales = ['en']
|
||||
|
||||
function sitemap(): MetadataRoute.Sitemap {
|
||||
const now = new Date()
|
||||
const entries: MetadataRoute.Sitemap = []
|
||||
|
||||
// Root landing (not locale-scoped)
|
||||
entries.push({
|
||||
url: base,
|
||||
lastModified: now,
|
||||
changeFrequency: 'hourly',
|
||||
priority: 1.0,
|
||||
})
|
||||
|
||||
for (const locale of locales) {
|
||||
for (const r of routes) {
|
||||
entries.push({
|
||||
url: `${base}/${locale}${r.path}`,
|
||||
lastModified: now,
|
||||
changeFrequency: r.freq,
|
||||
priority: r.priority,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return entries
|
||||
}
|
||||
|
||||
export default function handler(
|
||||
_req: import('next').NextApiRequest,
|
||||
res: import('next').NextApiResponse,
|
||||
) {
|
||||
res.setHeader('Content-Type', 'application/xml')
|
||||
res.send(
|
||||
'<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' +
|
||||
sitemap()
|
||||
.map(
|
||||
(x) =>
|
||||
'<url><loc>' +
|
||||
String(x.url).replaceAll('&', '&').replaceAll('<', '<') +
|
||||
'</loc>' +
|
||||
(x.lastModified
|
||||
? '<lastmod>' +
|
||||
(x.lastModified instanceof Date
|
||||
? x.lastModified.toISOString()
|
||||
: String(x.lastModified)) +
|
||||
'</lastmod>'
|
||||
: '') +
|
||||
(x.changeFrequency ? '<changefreq>' + x.changeFrequency + '</changefreq>' : '') +
|
||||
(x.priority != null ? '<priority>' + x.priority + '</priority>' : '') +
|
||||
'</url>',
|
||||
)
|
||||
.join('') +
|
||||
'</urlset>',
|
||||
)
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user