Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,44 +93,44 @@ pnpm dev
以下是开发过程中的常用脚本。数据库与缓存管理的运维脚本单独列在下方。
部分脚本可能需要额外的配置或环境变量。

| 脚本 | 说明 |
| --------------------------- | ------------------------------------------ |
| `pnpm dev` | 启动开发服务器(Turbopack) |
| `pnpm build` | 生产构建 |
| `pnpm start` | 启动生产服务器 |
| `pnpm preview` | 本地构建并启动生产服务器 |
| `pnpm typecheck` | TypeScript 类型检查(所有包) |
| `pnpm lint` | 使用 oxlint 进行 lint |
| `pnpm lint:fix` | 自动修复 lint 问题 |
| `pnpm fmt` | 使用 oxfmt 检查格式 |
| `pnpm fmt:fix` | 自动修复格式 |
| `pnpm security` | 安全审计(pnpm audit + audit-ci) |
| `pnpm test` | 运行所有测试(单元 + E2E) |
| `pnpm test:unit` | Vitest 单元测试 |
| `pnpm test:unit:coverage` | Vitest 单元测试(含覆盖率) |
| `pnpm test:e2e` | Cypress E2E 测试 |
| `pnpm test:e2e:component` | 仅 Cypress 组件测试 |
| `pnpm test:e2e:integration` | 仅 Cypress 集成测试 |
| `pnpm clean` | 清除构建产物 |
| `pnpm clean:all` | 清除构建产物 + node_modules |
| 脚本 | 说明 |
| --------------------------- | --------------------------------- |
| `pnpm dev` | 启动开发服务器(Turbopack) |
| `pnpm build` | 生产构建 |
| `pnpm start` | 启动生产服务器 |
| `pnpm preview` | 本地构建并启动生产服务器 |
| `pnpm typecheck` | TypeScript 类型检查(所有包) |
| `pnpm lint` | 使用 oxlint 进行 lint |
| `pnpm lint:fix` | 自动修复 lint 问题 |
| `pnpm fmt` | 使用 oxfmt 检查格式 |
| `pnpm fmt:fix` | 自动修复格式 |
| `pnpm security` | 安全审计(pnpm audit + audit-ci) |
| `pnpm test` | 运行所有测试(单元 + E2E) |
| `pnpm test:unit` | Vitest 单元测试 |
| `pnpm test:unit:coverage` | Vitest 单元测试(含覆盖率) |
| `pnpm test:e2e` | Cypress E2E 测试 |
| `pnpm test:e2e:component` | 仅 Cypress 组件测试 |
| `pnpm test:e2e:integration` | 仅 Cypress 集成测试 |
| `pnpm clean` | 清除构建产物 |
| `pnpm clean:all` | 清除构建产物 + node_modules |

### 运维脚本

以下脚本用于数据库与缓存的管理维护,常规开发中一般不需要。
不过在改动数据库或 API 路由后,将 `pnpm admin:cache:invalidate` 指向本地开发服务器进行测试会很有用。

| 脚本 | 说明 |
| ----------------------------------- | -------------------------------------- |
| `pnpm admin:db:migrate` | 运行数据库迁移 |
| `pnpm admin:db:ingest:run` | 从 GitHub 运行摄取基准测试数据 |
| `pnpm admin:db:ingest:ci` | 摄取基准测试数据(CI 模式) |
| `pnpm admin:db:ingest:gcs` | 从 GCS 摄取基准测试数据 |
| `pnpm admin:db:ingest:supplemental` | 摄取补充数据 |
| `pnpm admin:db:apply-overrides` | 应用数据覆盖 |
| `pnpm admin:db:reset` | 重置数据库 |
| `pnpm admin:db:verify` | 校验数据库完整性 |
| `pnpm admin:cache:invalidate` | 失效 API 缓存 |
| `pnpm admin:cache:warmup` | 预热 API 缓存 |
| 脚本 | 说明 |
| ----------------------------------- | ------------------------------ |
| `pnpm admin:db:migrate` | 运行数据库迁移 |
| `pnpm admin:db:ingest:run` | 从 GitHub 运行摄取基准测试数据 |
| `pnpm admin:db:ingest:ci` | 摄取基准测试数据(CI 模式) |
| `pnpm admin:db:ingest:gcs` | 从 GCS 摄取基准测试数据 |
| `pnpm admin:db:ingest:supplemental` | 摄取补充数据 |
| `pnpm admin:db:apply-overrides` | 应用数据覆盖 |
| `pnpm admin:db:reset` | 重置数据库 |
| `pnpm admin:db:verify` | 校验数据库完整性 |
| `pnpm admin:cache:invalidate` | 失效 API 缓存 |
| `pnpm admin:cache:warmup` | 预热 API 缓存 |

## 部署

Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/app/quotes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { SITE_URL } from '@semianalysisai/inferencex-constants';
export const metadata: Metadata = {
title: 'Supporters',
description:
'InferenceX initiative is supported by major buyers of compute and prominent members of the ML community including those from OpenAI, Microsoft, PyTorch Foundation, and more.',
'InferenceX initiative is supported by major buyers of compute and prominent members of the ML community including those from MiniMax, Moonshot Kimi, Alibaba Qwen, OpenAI, Microsoft, vLLM, PyTorch Foundation, Oracle and more.',
alternates: { canonical: `${SITE_URL}/quotes` },
openGraph: {
title: 'Supporters | InferenceX by SemiAnalysis',
description:
'Supported by OpenAI, Microsoft, PyTorch Foundation, and prominent members of the ML community.',
'Supported by MiniMax, Moonshot Kimi, Alibaba Qwen, OpenAI, Microsoft, vLLM, PyTorch Foundation, Oracle, and prominent members of the ML community.',
url: `${SITE_URL}/quotes`,
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/components/intro-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { MinecraftSplash } from '@/components/minecraft/minecraft-splash';
import { QuoteCarousel } from '@/components/quote-carousel';
import { QUOTES, CAROUSEL_ORGS, CAROUSEL_LABELS } from '@/components/quotes/quotes-data';

// Carousel order follows QUOTES order — carousel orgs are listed first there.
const carouselQuotes = QUOTES.filter((q) => (CAROUSEL_ORGS as readonly string[]).includes(q.org));

const CAROUSEL_OVERRIDES = {
order: [...CAROUSEL_ORGS] as string[],
labels: CAROUSEL_LABELS,
};

Expand Down
20 changes: 5 additions & 15 deletions packages/app/src/components/quote-carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface CarouselQuote {
export interface QuoteCarouselProps {
quotes: CarouselQuote[];
overrides?: {
/** Companies pinned to the front in this order; rest are shuffled after */
order?: string[];
/** Override display names in the org strip */
labels?: Record<string, string>;
};
Expand All @@ -35,26 +33,18 @@ interface CompanyEntry {
quote: CarouselQuote;
}

function buildCompanyQuotes(quotes: CarouselQuote[], order?: string[]): CompanyEntry[] {
// One entry per org, first quote wins; entries keep the order of the quotes array.
function buildCompanyQuotes(quotes: CarouselQuote[]): CompanyEntry[] {
const byCompany = new Map<string, CarouselQuote[]>();
for (const q of quotes) {
const list = byCompany.get(q.org);
if (list) list.push(q);
else byCompany.set(q.org, [q]);
}
const entries = [...byCompany.entries()].map(([org, pool]) => ({
return [...byCompany.entries()].map(([org, pool]) => ({
org,
quote: pool[0],
}));
if (order?.length) {
const orderSet = new Set(order);
const pinned = order
.map((c) => entries.find((e) => e.org === c))
.filter(Boolean) as CompanyEntry[];
const rest = entries.filter((e) => !orderSet.has(e.org));
return [...pinned, ...rest];
}
return entries;
}

// Warm a logo into the browser cache so it paints instantly when its quote
Expand Down Expand Up @@ -106,10 +96,10 @@ export function QuoteCarousel({
moreHref,
intervalMs = 8_000,
}: QuoteCarouselProps) {
const { order, labels = {} } = overrides;
const { labels = {} } = overrides;

// Keep the first render deterministic so SSR reserves the carousel's full height before hydration.
const entries = useMemo(() => buildCompanyQuotes(quotes, order), [quotes, order]);
const entries = useMemo(() => buildCompanyQuotes(quotes), [quotes]);
const [activeIndex, setActiveIndex] = useState(0);
const [fading, setFading] = useState(false);
const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/components/quotes/quotes-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export function QuotesContent() {
</h2>
<p className="mt-3 text-base lg:text-lg text-muted-foreground">
InferenceX&trade; initiative is supported by many major buyers of compute and
prominent members of the ML community including those from OpenAI, Microsoft, vLLM,
PyTorch Foundation, Oracle and more.
prominent members of the ML community including those from MiniMax, Moonshot Kimi,
Alibaba Qwen, OpenAI, Microsoft, vLLM, PyTorch Foundation, Oracle and more.
</p>
<div className="mt-6 flex flex-wrap items-center justify-center gap-2">
{orgLogos.map(({ org, logo }) => (
Expand Down
Loading
Loading