From fa82c7856d94235ec17afbc1c0405b177e6f36f4 Mon Sep 17 00:00:00 2001
From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Date: Fri, 5 Jun 2026 09:33:55 +0800
Subject: [PATCH] docs: make docs site the homepage
---
apps/docs/components/code-preview.tsx | 90 ---------
apps/docs/components/feature-card.tsx | 40 ----
apps/docs/components/hero-section.tsx | 96 ----------
apps/docs/components/persona-card.tsx | 38 ----
apps/docs/lib/homepage-i18n.ts | 253 --------------------------
apps/docs/lib/layout.shared.tsx | 5 -
content/docs/index.mdx | 185 +++----------------
7 files changed, 24 insertions(+), 683 deletions(-)
delete mode 100644 apps/docs/components/code-preview.tsx
delete mode 100644 apps/docs/components/feature-card.tsx
delete mode 100644 apps/docs/components/hero-section.tsx
delete mode 100644 apps/docs/components/persona-card.tsx
delete mode 100644 apps/docs/lib/homepage-i18n.ts
diff --git a/apps/docs/components/code-preview.tsx b/apps/docs/components/code-preview.tsx
deleted file mode 100644
index f3454dbbf..000000000
--- a/apps/docs/components/code-preview.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-import { cn } from '@/lib/utils';
-
-interface CodePreviewProps {
- className?: string;
-}
-
-export function CodePreview({ className }: CodePreviewProps) {
- const kw = 'text-purple-600 dark:text-purple-400 font-semibold';
- const str = 'text-green-600 dark:text-green-300';
- const fn = 'text-blue-600 dark:text-blue-300';
- const typ = 'text-amber-600 dark:text-yellow-300';
- const prop = 'text-cyan-600 dark:text-sky-300';
- const bool = 'text-red-600 dark:text-red-300';
- const fg = 'text-foreground';
- const cm = 'text-foreground/40 italic';
-
- return (
-
-
- {/* Window Controls */}
-
-
-
-
-
- src/objects/task.object.ts
-
-
-
- {/* Code Content — real ObjectStack API */}
-
-
-
- import{' '}
- {'{'}{' '}
- Data{' '}
- {'}'}{' '}
- from{' '}
- '@objectstack/spec';
-
- const{' '}
- task:{' '}
- Data.Object{' '}
- ={' '}
- {'{'}
-
- {' '}name:{' '}'task',
-
- {' '}label:{' '}'Task',
-
- {' '}fields:{' '}{'{'}
-
- {' '}subject:{' '}{'{'}{' '}
- type:{' '}'text',{' '}
- required:{' '}true{' '}
- {'}'},
-
- {' '}status:{' '}{'{'}
-
- {' '}type:{' '}'select',
-
- {' '}options:{' '}['draft', 'active', 'done'],
-
- {' '}{'}'},
-
- {' '}assignee:{' '}{'{'}{' '}
- type:{' '}'lookup',{' '}
- reference:{' '}'user'{' '}
- {'}'},
-
- {' '}{'}'},
-
- {'}'};
-
- {'// → REST API at /api/v1/task'}
-
- {'// → Console UI at /_studio/'}
-
-
-
-
-
- {/* Glow Effect */}
-
-
- );
-}
diff --git a/apps/docs/components/feature-card.tsx b/apps/docs/components/feature-card.tsx
deleted file mode 100644
index a98fb9e49..000000000
--- a/apps/docs/components/feature-card.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import Link from 'next/link';
-import { Card, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-
-interface FeatureCardProps {
- icon: React.ReactNode;
- title: string;
- description: string;
- href?: string;
- className?: string;
-}
-
-export function FeatureCard({ icon, title, description, href, className }: FeatureCardProps) {
- const CardContent = (
-
-
- {icon}
-
-
- {title}
-
-
- {description}
-
-
- );
-
- if (href) {
- return (
-
- {CardContent}
-
- );
- }
-
- return CardContent;
-}
diff --git a/apps/docs/components/hero-section.tsx b/apps/docs/components/hero-section.tsx
deleted file mode 100644
index d2876e5d2..000000000
--- a/apps/docs/components/hero-section.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import Link from 'next/link';
-import { cn } from '@/lib/utils';
-
-interface HeroSectionProps {
- badge: {
- status: string;
- version: string;
- };
- title: {
- line1: string;
- line2: string;
- };
- subtitle: {
- line1: string;
- line2: string;
- };
- cta: {
- primary: string;
- primaryHref: string;
- secondary: string;
- secondaryHref: string;
- };
- quickStart?: {
- label: string;
- commands: string[];
- };
- className?: string;
-}
-
-export function HeroSection({ badge, title, subtitle, cta, quickStart, className }: HeroSectionProps) {
- return (
-
- {/* Badge */}
-
-
- {badge.status}
- •
- {badge.version}
-
-
- {/* Title */}
-
- {title.line1}
-
- {title.line2}
-
-
- {/* Subtitle */}
-
- {subtitle.line1}
-
-
- {subtitle.line2}
-
-
-
- {/* Quick Start Terminal */}
- {quickStart && (
-
-
-
-
-
-
-
{quickStart.label}
-
-
- {quickStart.commands.map((cmd, i) => (
-
- $
- {cmd}
-
- ))}
-
-
-
- )}
-
- {/* CTA Buttons */}
-
-
- {cta.primary}
-
-
- {cta.secondary}
-
-
-
- );
-}
diff --git a/apps/docs/components/persona-card.tsx b/apps/docs/components/persona-card.tsx
deleted file mode 100644
index 39e54a0e4..000000000
--- a/apps/docs/components/persona-card.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import Link from 'next/link';
-import { ArrowRight } from 'lucide-react';
-import { Card } from '@/components/ui/card';
-import { cn } from '@/lib/utils';
-
-interface PersonaCardProps {
- icon: React.ReactNode;
- title: string;
- description: string;
- href: string;
- action: string;
- className?: string;
-}
-
-export function PersonaCard({ icon, title, description, href, action, className }: PersonaCardProps) {
- return (
-
-
-
- {icon}
-
-
- {title}
-
-
- {description}
-
-
-
-
- );
-}
diff --git a/apps/docs/lib/homepage-i18n.ts b/apps/docs/lib/homepage-i18n.ts
deleted file mode 100644
index 52bd54b30..000000000
--- a/apps/docs/lib/homepage-i18n.ts
+++ /dev/null
@@ -1,253 +0,0 @@
-/**
- * Homepage Internationalization
- *
- * Translations for the ObjectStack homepage
- * Supports: en (English), cn (Chinese/中文)
- */
-
-import { SPEC_VERSION } from './version';
-
-export interface HomepageTranslations {
- // Hero Section
- badge: {
- status: string;
- version: string;
- };
- hero: {
- title: {
- line1: string;
- line2: string;
- };
- subtitle: {
- line1: string;
- line2: string;
- };
- cta: {
- primary: string;
- primaryHref: string;
- secondary: string;
- secondaryHref: string;
- };
- quickStart: {
- label: string;
- commands: string[];
- };
- };
-
- // Features Section
- features: {
- restApi: {
- title: string;
- description: string;
- };
- studio: {
- title: string;
- description: string;
- };
- multiDb: {
- title: string;
- description: string;
- };
- typeSafety: {
- title: string;
- description: string;
- };
- namespace: {
- title: string;
- description: string;
- };
- plugins: {
- title: string;
- description: string;
- };
- };
-
- // Personas Section
- personas: {
- heading: string;
- fullStack: {
- title: string;
- description: string;
- action: string;
- };
- platformTeam: {
- title: string;
- description: string;
- action: string;
- };
- lowCode: {
- title: string;
- description: string;
- action: string;
- };
- };
-}
-
-/**
- * English Translations
- */
-export const en: HomepageTranslations = {
- badge: {
- status: 'Open Source',
- version: SPEC_VERSION,
- },
- hero: {
- title: {
- line1: 'Define Once,',
- line2: 'Run Everywhere',
- },
- subtitle: {
- line1: 'A metadata-driven framework that turns object definitions into REST APIs, admin consoles, and database schemas.',
- line2: 'No boilerplate. No code generation.',
- },
- cta: {
- primary: 'Get Started',
- primaryHref: '/docs/getting-started/quick-start',
- secondary: 'Live Demo',
- secondaryHref: 'https://play.objectstack.ai',
- },
- quickStart: {
- label: 'Terminal',
- commands: [
- 'npx @objectstack/cli init my-app',
- 'cd my-app',
- 'npx os studio',
- ],
- },
- },
- features: {
- restApi: {
- title: 'Object → REST API',
- description: 'Define your data objects and get fully typed CRUD endpoints automatically. No route files, no controllers.',
- },
- studio: {
- title: 'Built-in Console',
- description: 'Run `os studio` to get a visual admin panel for browsing data, editing records, and inspecting your schema.',
- },
- multiDb: {
- title: 'Multi-Database',
- description: 'PostgreSQL, MongoDB, SQLite — same object schema, any backend. Switch databases without changing a single line of code.',
- },
- typeSafety: {
- title: 'Full Type Safety',
- description: 'Zod-first schema definitions with complete TypeScript inference. Catch errors at compile time, validate at runtime.',
- },
- namespace: {
- title: 'Namespace Isolation',
- description: 'Multi-tenant by design. Each plugin gets its own namespace — no field collisions, clean data boundaries.',
- },
- plugins: {
- title: 'Plugin System',
- description: 'Compose applications from reusable plugins. CRM, BI, Auth — mix and match building blocks for your stack.',
- },
- },
- personas: {
- heading: 'Who Is It For?',
- fullStack: {
- title: 'Full-Stack Developers',
- description: 'Build internal tools, admin dashboards, and CRUD apps in minutes with just object definitions.',
- action: 'Developer Guide',
- },
- platformTeam: {
- title: 'Platform Teams',
- description: 'Standardize data models and APIs across microservices with a shared metadata protocol.',
- action: 'Read Architecture',
- },
- lowCode: {
- title: 'Low-Code Builders',
- description: 'Visual schema design via Console UI, with full code extensibility when you need it.',
- action: 'Try Examples',
- },
- },
-};
-
-/**
- * Chinese Translations (中文翻译)
- */
-export const cn: HomepageTranslations = {
- badge: {
- status: '开源项目',
- version: SPEC_VERSION,
- },
- hero: {
- title: {
- line1: '定义一次,',
- line2: '随处运行',
- },
- subtitle: {
- line1: '元数据驱动框架,将对象定义自动转换为 REST API、管理控制台和数据库表结构。',
- line2: '无模板代码。无代码生成。',
- },
- cta: {
- primary: '快速开始',
- primaryHref: '/docs/getting-started/quick-start',
- secondary: '在线演示',
- secondaryHref: 'https://playground.objectstack.ai',
- },
- quickStart: {
- label: '终端',
- commands: [
- 'npx @objectstack/cli init my-app',
- 'cd my-app',
- 'npx os studio',
- ],
- },
- },
- features: {
- restApi: {
- title: '对象 → REST API',
- description: '定义数据对象,自动获得完整的 CRUD 接口。无需路由文件,无需控制器。',
- },
- studio: {
- title: '内置管理控制台',
- description: '运行 `os studio` 即可获得可视化管理面板,浏览数据、编辑记录、查看 Schema。',
- },
- multiDb: {
- title: '多数据库支持',
- description: 'PostgreSQL、MongoDB、SQLite — 同一套对象定义,任意数据库后端。切换数据库无需改一行代码。',
- },
- typeSafety: {
- title: '完整类型安全',
- description: 'Zod 优先的 Schema 定义,完整的 TypeScript 类型推断。编译时捕获错误,运行时验证数据。',
- },
- namespace: {
- title: '命名空间隔离',
- description: '原生多租户设计。每个插件拥有独立命名空间 — 无字段冲突,干净的数据边界。',
- },
- plugins: {
- title: '插件系统',
- description: '用可复用插件组合应用。CRM、BI、认证 — 像积木一样自由搭建你的技术栈。',
- },
- },
- personas: {
- heading: '适合谁使用?',
- fullStack: {
- title: '全栈开发者',
- description: '只需定义对象,几分钟内构建内部工具、管理面板和 CRUD 应用。',
- action: '开发者指南',
- },
- platformTeam: {
- title: '平台团队',
- description: '使用统一的元数据协议标准化微服务间的数据模型和 API。',
- action: '阅读架构',
- },
- lowCode: {
- title: '低代码构建者',
- description: '通过 Console UI 可视化设计 Schema,需要时可完全用代码扩展。',
- action: '试用示例',
- },
- },
-};
-
-/**
- * Get translations for a specific language
- */
-export function getHomepageTranslations(lang: string): HomepageTranslations {
- switch (lang) {
- case 'cn':
- return cn;
- case 'en':
- default:
- return en;
- }
-}
diff --git a/apps/docs/lib/layout.shared.tsx b/apps/docs/lib/layout.shared.tsx
index 9ac983088..742c502e8 100644
--- a/apps/docs/lib/layout.shared.tsx
+++ b/apps/docs/lib/layout.shared.tsx
@@ -21,7 +21,6 @@ export function baseOptions(): BaseLayoutProps {
ObjectStack
),
- transparentMode: 'top',
},
links: [
{
@@ -29,10 +28,6 @@ export function baseOptions(): BaseLayoutProps {
url: '/docs/',
active: 'nested-url',
},
- {
- text: 'Website',
- url: 'https://www.objectstack.ai',
- },
],
githubUrl: `https://github.com/${gitConfig.user}/${gitConfig.repo}`,
};
diff --git a/content/docs/index.mdx b/content/docs/index.mdx
index 6766bce2f..31980f06b 100644
--- a/content/docs/index.mdx
+++ b/content/docs/index.mdx
@@ -1,174 +1,37 @@
---
-title: ObjectStack Protocol
-description: The AI-native business backend protocol for structured, auditable agent execution.
+title: Documentation
+description: Technical documentation for ObjectStack.
---
-import { Rocket, BookOpen, FileCode, Layers, Database, Layout, Cpu, Bot, Workflow, Shield, Globe, Terminal, FolderOpen, Lightbulb, Wrench, BookMarked, Brain } from 'lucide-react';
+# ObjectStack Documentation
-**ObjectStack** is the **AI-native business backend** for building enterprise applications that agents can understand, operate, and audit safely.
-Define business objects, permissions, workflows, APIs, UI metadata, and agent tools once as structured Zod metadata — ObjectStack handles the runtime surface.
+ObjectStack is an AI-native business backend protocol for structured, auditable business applications.
+These docs cover the protocol, runtime, metadata model, API surface, and implementation guides.
-> ObjectStack is **not another low-code UI builder**. It is the **structured execution layer** for AI-native business software: agent-ready, permission-aware, versioned, and auditable.
+## Start Here
-> **Built for AI, not retrofitted.** A typical enterprise application is tens of thousands of lines of CRUD, forms, queries, permissions, and API glue. ObjectStack collapses the same surface into a few hundred lines of typed metadata — **roughly two orders of magnitude less code to read, write, and maintain.** The point isn't lines of code; the point is **fit in an agent's context window**, so an AI agent can reason about the whole system end-to-end and safely refactor across data, API, UI, and permissions in a single change.
-
-```bash
-npx create-objectstack my-app && cd my-app && pnpm dev
-```
-
-Open [http://localhost:3000/_studio/](http://localhost:3000/_studio/) to browse objects, test APIs, inspect metadata, and review the agent-ready tool surface.
-
----
-
-## Learn
-
-New to ObjectStack? Start here.
-
-
- }
- title="Quick Start"
- href="/docs/getting-started/quick-start"
- description="Create a project, define objects, launch the Studio — in 5 minutes."
- />
- }
- title="Core Concepts"
- href="/docs/getting-started/core-concepts"
- description="AI-native metadata, design principles, and naming conventions."
- />
- }
- title="Architecture"
- href="/docs/getting-started/architecture"
- description="The three-layer protocol stack: ObjectQL, ObjectOS, ObjectUI."
- />
- }
- title="Example Apps"
- href="/docs/getting-started/examples"
- description="Run the Todo, CRM, and BI examples to learn hands-on."
- />
- }
- title="Package Overview"
- href="/docs/guides/packages"
- description="Complete guide to all 51 packages: core, services, drivers, plugins, and adapters."
- />
-
+- [Quick Start](/docs/getting-started/quick-start): create an ObjectStack app and run Studio locally.
+- [What is ObjectStack?](/docs/getting-started): understand the protocol model and runtime layers.
+- [Core Concepts](/docs/getting-started/core-concepts): learn the key terms used across the docs.
+- [Architecture](/docs/getting-started/architecture): see how ObjectQL, ObjectOS, and ObjectUI fit together.
## Build
-Task-oriented guides for building real applications.
+- [Data Modeling](/docs/guides/data-modeling): define objects, fields, relationships, and validation rules.
+- [Business Logic](/docs/guides/business-logic): model workflows, approvals, triggers, hooks, and formulas.
+- [Security](/docs/guides/security): configure permissions, sharing rules, RBAC, RLS, and field-level access.
+- [API Reference](/docs/guides/api-reference): work with generated REST, GraphQL, realtime, and SDK surfaces.
+- [Plugin Development](/docs/guides/plugin-development): build and register runtime plugins.
-
- }
- title="Data Modeling"
- href="/docs/guides/data-modeling"
- description="Design objects, fields, relationships, and validation rules."
- />
- }
- title="Business Logic"
- href="/docs/guides/business-logic"
- description="Workflows, approval flows, triggers, and formulas."
- />
- }
- title="Security"
- href="/docs/guides/security"
- description="Profiles, permissions, sharing rules, and row-level security."
- />
- }
- title="AI Capabilities"
- href="/docs/guides/ai-capabilities"
- description="AI agents, generated tools, RAG pipelines, and natural language queries."
- />
- }
- title="AI Skills System"
- href="/docs/guides/skills"
- description="Structured knowledge modules for intelligent code generation."
- />
- }
- title="Plugin Development"
- href="/docs/guides/plugin-development"
- description="Build, test, and publish custom plugins."
- />
- }
- title="API & Client SDK"
- href="/docs/guides/api-reference"
- description="REST, GraphQL, WebSocket APIs, and frontend integration."
- />
-
+## Protocol
-## Understand
-
-Deep protocol specifications for implementers and architects.
-
-
- }
- title="ObjectQL — Data"
- href="/docs/protocol/objectql"
- description="Schema, state machines, query syntax, and security."
- />
- }
- title="ObjectUI — Interface"
- href="/docs/protocol/objectui"
- description="Layout DSL, widget contracts, and actions."
- />
- }
- title="ObjectOS — System"
- href="/docs/protocol/objectos"
- description="Lifecycle, HTTP/realtime, plugins, and config."
- />
-
-
-## Look Up
-
-Auto-generated schema reference and quick-lookup cheatsheets.
-
-
- }
- title="Schema Reference"
- href="/docs/references"
- description="Auto-generated docs for every Zod schema in the protocol."
- />
- }
- title="Cheatsheets"
- href="/docs/guides/cheatsheets"
- description="Field types, query syntax, error codes, and permissions at a glance."
- />
- }
- title="CLI Reference"
- href="/docs/getting-started/cli"
- description="All commands: init, generate, serve, studio, compile, validate."
- />
- }
- title="Glossary"
- href="/docs/getting-started/glossary"
- description="Key terminology across all 15 protocol namespaces."
- />
-
-
----
+- [ObjectQL](/docs/protocol/objectql): data schemas, queries, filters, indexes, and object contracts.
+- [ObjectOS](/docs/protocol/objectos): kernel runtime, plugins, HTTP protocol, capabilities, and configuration.
+- [ObjectUI](/docs/protocol/objectui): UI metadata for apps, views, pages, dashboards, and actions.
-## Who is this for?
+## Reference
-| Audience | Use Case |
-| :--- | :--- |
-| **AI Agent Developers** | Give agents a structured, permission-aware backend for real business actions |
-| **Platform Architects** | Build internal developer platforms (IDP) that expose safe business capabilities |
-| **Protocol Implementers** | Write new Drivers for ObjectQL or Renderers for ObjectUI |
-| **Internal Tool Builders** | Ship CRUD-heavy business apps with generated APIs, UI metadata, and workflows |
+- [Schema Reference](/docs/references): generated Zod schema reference for ObjectStack metadata.
+- [Cheatsheets](/docs/guides/cheatsheets/quick-reference): quick lookup tables for common protocol decisions.
+- [CLI Reference](/docs/getting-started/cli): commands for creating, building, and validating projects.
+- [Glossary](/docs/getting-started/glossary): shared vocabulary across ObjectStack docs.