From de0ec53d158d2304cdc2247050be3e941951033b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 03:03:06 +0000 Subject: [PATCH 1/4] Initial plan From c508bb2639196de358fedcbd9c518c52c7002108 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 03:09:40 +0000 Subject: [PATCH 2/4] Implement homepage internationalization for English and Chinese Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- apps/docs/app/[lang]/page.tsx | 68 +++++----- apps/docs/lib/homepage-i18n.ts | 236 +++++++++++++++++++++++++++++++++ 2 files changed, 274 insertions(+), 30 deletions(-) create mode 100644 apps/docs/lib/homepage-i18n.ts diff --git a/apps/docs/app/[lang]/page.tsx b/apps/docs/app/[lang]/page.tsx index fc3c996fd..48b42fa28 100644 --- a/apps/docs/app/[lang]/page.tsx +++ b/apps/docs/app/[lang]/page.tsx @@ -2,8 +2,16 @@ import Link from 'next/link'; import { Database, FileJson, Layers, ShieldCheck, Zap, Globe, Cpu, LayoutTemplate, Bot } from 'lucide-react'; import { HomeLayout } from 'fumadocs-ui/layouts/home'; import { baseOptions } from '@/app/layout.config'; +import { getHomepageTranslations } from '@/lib/homepage-i18n'; + +export default async function HomePage({ + params, +}: { + params: Promise<{ lang: string }>; +}) { + const { lang } = await params; + const t = getHomepageTranslations(lang); -export default function HomePage() { return (
@@ -12,17 +20,17 @@ export default function HomePage() {
- Protocol Specification v1.0 + {t.badge.status} {t.badge.version}

- The ObjectStack
Protocol + {t.hero.title.line1}
{t.hero.title.line2}

- The Open Standard for Metadata-Driven Enterprise Software. + {t.hero.subtitle.line1}
- Validatable. Database-Agnostic. AI-Native. + {t.hero.subtitle.line2}

@@ -30,13 +38,13 @@ export default function HomePage() { href="/docs/guides/getting-started" className="inline-flex h-12 items-center justify-center rounded-lg bg-fd-primary px-8 text-sm font-medium text-fd-primary-foreground shadow-lg shadow-fd-primary/20 transition-all hover:bg-fd-primary/90 hover:scale-105 hover:shadow-fd-primary/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring disabled:pointer-events-none disabled:opacity-50" > - Start Building + {t.hero.cta.primary} - Read Specification + {t.hero.cta.secondary}
@@ -48,7 +56,7 @@ export default function HomePage() {
- contract.zod.ts + {t.codePreview.filename}
@@ -78,68 +86,68 @@ export default function HomePage() {
} - title="ObjectQL Data Layer" + title={t.features.objectql.title} href="/docs/specifications/data/architecture" - description="Strict JSON schemas for entities, fields, and relationships. It is the SQL you can send over the wire." + description={t.features.objectql.description} /> } - title="ObjectUI View Layer" + title={t.features.objectui.title} href="/docs/specifications/ui/sdui-protocol" - description="Server-Driven UI protocol defining forms, grids, and dashboards. Decouples logic from the frontend implementation." + description={t.features.objectui.description} /> } - title="ObjectOS Kernel" + title={t.features.objectos.title} href="/docs/specifications/server/kernel-architecture" - description="The runtime contract for permissions, workflows, and automation. Stateless business logic execution." + description={t.features.objectos.description} /> } - title="Zero-Trust Security" + title={t.features.security.title} href="/docs/specifications/server/permission-governance" - description="Policy-as-Code. ACLs and Field Level Security are compiled into the database query engine." + description={t.features.security.description} /> } - title="Zod-First Definition" + title={t.features.zodFirst.title} href="/docs/specifications/data/schema-definition" - description="The entire protocol is defined in Zod. Runtime validation and static type inference come for free." + description={t.features.zodFirst.description} /> } - title="Universal Backend" + title={t.features.universal.title} href="/docs/concepts/architecture" - description="Protocol adapters for Postgres, MongoDB, REST and GraphQL. Write once, run on any infrastructure." + description={t.features.universal.description} />
{/* Personas Section */}

- Built for Builders + {t.personas.heading}

} - title="Platform Architects" - description="Design scalable Internal Developer Platforms (IDP) that unify your data silos." + title={t.personas.architect.title} + description={t.personas.architect.description} href="/docs/concepts/enterprise-patterns" - action="Explore Patterns" + action={t.personas.architect.action} /> } - title="AI Engineers" - description="Feed LLMs with perfectly structured, deterministic JSON schemas they can actually understand." + title={t.personas.aiEngineer.title} + description={t.personas.aiEngineer.description} href="/docs/concepts/ai-codex" - action="View Codex" + action={t.personas.aiEngineer.action} /> } - title="Framework Builders" - description="Implement the protocol in your language. Write drivers for React, Vue, Flutter, or Go." + title={t.personas.frameworkBuilder.title} + description={t.personas.frameworkBuilder.description} href="/docs/specifications/data/architecture" - action="Read Spec" + action={t.personas.frameworkBuilder.action} />
diff --git a/apps/docs/lib/homepage-i18n.ts b/apps/docs/lib/homepage-i18n.ts new file mode 100644 index 000000000..36727e7bc --- /dev/null +++ b/apps/docs/lib/homepage-i18n.ts @@ -0,0 +1,236 @@ +/** + * Homepage Internationalization + * + * Translations for the ObjectStack homepage + * Supports: en (English), cn (Chinese/中文) + */ + +export interface HomepageTranslations { + // Hero Section + badge: { + status: string; + version: string; + }; + hero: { + title: { + line1: string; + line2: string; + }; + subtitle: { + line1: string; + line2: string; + }; + cta: { + primary: string; + secondary: string; + }; + }; + + // Code Preview + codePreview: { + filename: string; + }; + + // Features Section + features: { + objectql: { + title: string; + description: string; + }; + objectui: { + title: string; + description: string; + }; + objectos: { + title: string; + description: string; + }; + security: { + title: string; + description: string; + }; + zodFirst: { + title: string; + description: string; + }; + universal: { + title: string; + description: string; + }; + }; + + // Personas Section + personas: { + heading: string; + architect: { + title: string; + description: string; + action: string; + }; + aiEngineer: { + title: string; + description: string; + action: string; + }; + frameworkBuilder: { + title: string; + description: string; + action: string; + }; + }; +} + +/** + * English Translations + */ +export const en: HomepageTranslations = { + badge: { + status: 'Protocol Specification', + version: 'v1.0', + }, + hero: { + title: { + line1: 'The ObjectStack', + line2: 'Protocol', + }, + subtitle: { + line1: 'The Open Standard for Metadata-Driven Enterprise Software.', + line2: 'Validatable. Database-Agnostic. AI-Native.', + }, + cta: { + primary: 'Start Building', + secondary: 'Read Specification', + }, + }, + codePreview: { + filename: 'contract.zod.ts', + }, + features: { + objectql: { + title: 'ObjectQL Data Layer', + description: 'Strict JSON schemas for entities, fields, and relationships. It is the SQL you can send over the wire.', + }, + objectui: { + title: 'ObjectUI View Layer', + description: 'Server-Driven UI protocol defining forms, grids, and dashboards. Decouples logic from the frontend implementation.', + }, + objectos: { + title: 'ObjectOS Kernel', + description: 'The runtime contract for permissions, workflows, and automation. Stateless business logic execution.', + }, + security: { + title: 'Zero-Trust Security', + description: 'Policy-as-Code. ACLs and Field Level Security are compiled into the database query engine.', + }, + zodFirst: { + title: 'Zod-First Definition', + description: 'The entire protocol is defined in Zod. Runtime validation and static type inference come for free.', + }, + universal: { + title: 'Universal Backend', + description: 'Protocol adapters for Postgres, MongoDB, REST and GraphQL. Write once, run on any infrastructure.', + }, + }, + personas: { + heading: 'Built for Builders', + architect: { + title: 'Platform Architects', + description: 'Design scalable Internal Developer Platforms (IDP) that unify your data silos.', + action: 'Explore Patterns', + }, + aiEngineer: { + title: 'AI Engineers', + description: 'Feed LLMs with perfectly structured, deterministic JSON schemas they can actually understand.', + action: 'View Codex', + }, + frameworkBuilder: { + title: 'Framework Builders', + description: 'Implement the protocol in your language. Write drivers for React, Vue, Flutter, or Go.', + action: 'Read Spec', + }, + }, +}; + +/** + * Chinese Translations (中文翻译) + */ +export const cn: HomepageTranslations = { + badge: { + status: '协议规范', + version: 'v1.0', + }, + hero: { + title: { + line1: 'ObjectStack', + line2: '协议', + }, + subtitle: { + line1: '元数据驱动企业软件的开放标准。', + line2: '可验证。数据库无关。AI 原生。', + }, + cta: { + primary: '开始构建', + secondary: '阅读规范', + }, + }, + codePreview: { + filename: 'contract.zod.ts', + }, + features: { + objectql: { + title: 'ObjectQL 数据层', + description: '严格的 JSON 模式定义实体、字段和关系。这是可以在网络上传输的 SQL。', + }, + objectui: { + title: 'ObjectUI 视图层', + description: '定义表单、网格和仪表板的服务器驱动 UI 协议。将逻辑与前端实现解耦。', + }, + objectos: { + title: 'ObjectOS 内核', + description: '权限、工作流和自动化的运行时契约。无状态业务逻辑执行。', + }, + security: { + title: '零信任安全', + description: '策略即代码。ACL 和字段级安全被编译到数据库查询引擎中。', + }, + zodFirst: { + title: 'Zod 优先定义', + description: '整个协议都用 Zod 定义。运行时验证和静态类型推断免费获得。', + }, + universal: { + title: '通用后端', + description: 'Postgres、MongoDB、REST 和 GraphQL 的协议适配器。一次编写,在任何基础设施上运行。', + }, + }, + personas: { + heading: '为构建者而建', + architect: { + title: '平台架构师', + description: '设计可扩展的内部开发者平台(IDP),统一你的数据孤岛。', + action: '探索模式', + }, + aiEngineer: { + title: 'AI 工程师', + description: '为 LLM 提供结构完美、确定性强的 JSON 模式,让它们能够真正理解。', + action: '查看代码库', + }, + frameworkBuilder: { + title: '框架构建者', + description: '用你的语言实现协议。为 React、Vue、Flutter 或 Go 编写驱动程序。', + action: '阅读规范', + }, + }, +}; + +/** + * Get translations for a specific language + */ +export function getHomepageTranslations(lang: string): HomepageTranslations { + switch (lang) { + case 'cn': + return cn; + case 'en': + default: + return en; + } +} From 8be3dcc382ecd6c405a5efb37d5f23cd94c9fce4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 03:31:32 +0000 Subject: [PATCH 3/4] Initial plan From 6f94ae0a79184cf4e22cd6973847795ad5ee9946 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 20 Jan 2026 03:37:33 +0000 Subject: [PATCH 4/4] Fix test failures: remove extra brace and undefined MenuItem tests Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com> --- packages/spec/src/data/field.test.ts | 1 - packages/spec/src/system/manifest.test.ts | 28 +---------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/packages/spec/src/data/field.test.ts b/packages/spec/src/data/field.test.ts index e75593bfe..b08c9f90b 100644 --- a/packages/spec/src/data/field.test.ts +++ b/packages/spec/src/data/field.test.ts @@ -148,7 +148,6 @@ describe('FieldSchema', () => { expect(() => FieldSchema.parse(selectField)).not.toThrow(); }); - }); }); describe('Relationship Fields', () => { diff --git a/packages/spec/src/system/manifest.test.ts b/packages/spec/src/system/manifest.test.ts index b286487a3..0512bc64b 100644 --- a/packages/spec/src/system/manifest.test.ts +++ b/packages/spec/src/system/manifest.test.ts @@ -1,31 +1,5 @@ import { describe, it, expect } from 'vitest'; -import { ManifestSchema, MenuItemSchema, type ObjectStackManifest, type MenuItem } from './manifest.zod'; - -describe('MenuItemSchema', () => { - it('should accept minimal menu item', () => { - const menuItem: MenuItem = { - label: 'Dashboard', - path: '/dashboard', - }; - - expect(() => MenuItemSchema.parse(menuItem)).not.toThrow(); - }); - - it('should accept menu item with icon', () => { - const menuItem: MenuItem = { - label: 'Settings', - path: '/settings', - icon: 'settings', - }; - - expect(() => MenuItemSchema.parse(menuItem)).not.toThrow(); - }); - - it('should reject menu item without required fields', () => { - expect(() => MenuItemSchema.parse({ label: 'Test' })).toThrow(); - expect(() => MenuItemSchema.parse({ path: '/test' })).toThrow(); - }); -}); +import { ManifestSchema, type ObjectStackManifest } from './manifest.zod'; describe('ManifestSchema', () => { describe('Basic Properties', () => {