Skip to content

Commit 0d6cb72

Browse files
committed
Revert "Add baseUrl config and update docs routing logic"
This reverts commit ddbcea9.
1 parent ddbcea9 commit 0d6cb72

File tree

10 files changed

+357
-131
lines changed

10 files changed

+357
-131
lines changed

content/docs.site.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"baseUrl": "/",
32
"meta": {
43
"title": "ObjectStack Docs",
54
"description": "Enterprise-grade low-code platform documentation",

content/docs/index.cn.mdx

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: 导读
3+
description: 为什么世界需要一个通用的企业级全栈协议标准?从代码驱动转向协议驱动的架构变革。
4+
---
5+
6+
# 导读:协议驱动范式 (The Protocol-Driven Paradigm)
7+
8+
> "Code rots. Protocols endure."
9+
> (代码会腐烂,协议永存。)
10+
11+
在过去的一二十年里,企业软件开发陷入了一个西西弗斯式的循环:
12+
13+
我们用 JSP 写了一遍 CRM,五年后用 Angular 重写,再过五年用 React 重写。后端也从 PHP 换到 Node.js,再到 Go。每一次技术栈的迭代,我们都在**重新实现完全相同的业务逻辑**——相同的表单验证、相同的权限判断、相同的审批流程。
14+
15+
这种**“代码驱动(Code-Driven)”**的开发模式带来了巨大的隐性成本:**业务逻辑与技术实现紧密耦合**。当技术框架过时,业务资产也随之贬值,甚至成为技术债。
16+
17+
**ObjectStack 的诞生,旨在终结这一循环。**
18+
19+
## 什么是 ObjectStack?
20+
21+
ObjectStack 不是一个简单的框架或库,它是一套**全栈应用开发协议标准(Standard Protocols)**
22+
23+
它主张将应用的**“意图(Intent)”****“实现(Implementation)”**彻底分离。通过标准化的 JSON 协议来定义数据、界面和流程,从而使业务逻辑独立于具体的编程语言和数据库技术。
24+
25+
ObjectStack 的核心架构由三大支柱构成:
26+
27+
1. **ObjectQL (The Data Protocol):** 数据库无关的通用数据协议。
28+
2. **ObjectUI (The View Protocol):** 声明式的通用界面协议。
29+
3. **ObjectOS (The Runtime Protocol):** 负责编排与治理的业务操作系统。
30+
31+
32+
33+
## 核心哲学
34+
35+
### 1. 协议驱动开发 (Protocol-Driven Development)
36+
37+
在传统开发中,业务逻辑被硬编码在函数中:
38+
39+
```javascript
40+
// The Old Way: Imperative & Coupled
41+
function createOrder(data) {
42+
if (data.amount > 1000 && !user.isManager) {
43+
throw new Error("Need approval");
44+
}
45+
db.query("INSERT INTO orders ...");
46+
}
47+
48+
```
49+
50+
在 ObjectStack 中,业务逻辑被定义为**数据(Metadata/Protocol)**
51+
52+
```yaml
53+
# The ObjectStack Way: Declarative & Decoupled
54+
object: order
55+
fields:
56+
amount: { type: currency }
57+
validation:
58+
- rule: "amount > 1000"
59+
guard: "!user.isManager"
60+
message: "Need approval"
61+
62+
```
63+
64+
* **差异:** 上述 YAML 配置不依赖任何语言。它可以被 Node.js 后端执行,可以被 Python 脚本分析,甚至可以直接传输给前端进行即时校验。
65+
* **价值:** 你的业务逻辑成为了**可移植、可分析、可进化的数字资产**,而不仅仅是一堆即将过时的代码。
66+
67+
### 2. 本地优先 (Local-First & Data Sovereignty)
68+
69+
云原生(Cloud-Native)带来了便捷,但也剥夺了用户的数据主权。SaaS 厂商的数据孤岛让企业失去了对自己数据的物理控制权。
70+
71+
ObjectStack 拥抱 **Local-First** 架构:
72+
73+
* 应用首先在本地数据库(如 SQLite, RxDB)读写数据。
74+
* 操作即时响应,无需等待网络往返。
75+
* **ObjectOS** 负责在后台处理复杂的数据同步和冲突解决(CRDTs/LWW)。
76+
77+
这意味着:**即便断网,你的企业软件依然可用;即便云服务商倒闭,你的数据依然在你手中。**
78+
79+
### 3. 跨数据库 (Database-Agnostic)
80+
81+
企业不应被数据库厂商锁定。
82+
83+
**ObjectQL** 充当了一个**数据库编译器**的角色。你编写标准的 ObjectQL Schema 和 Query AST,引擎负责将其编译为:
84+
85+
* **PostgreSQL** (用于生产环境)
86+
* **SQLite** (用于边缘设备或本地开发)
87+
* **MySQL / Oracle / SQL Server** (用于遗留系统集成)
88+
89+
这种能力让架构师可以在不同的场景下选择最优的存储引擎,而无需重写任何业务代码。
90+
91+
## 为什么是现在?
92+
93+
AI 正在重塑软件工程。
94+
95+
当 AI 辅助编程(Copilot)日益普及,我们发现 AI 生成**结构化的协议(JSON/YAML)**比生成**过程式的代码(JavaScript/Python)**要准确得多、安全得多。
96+
97+
* AI 生成代码容易产生幻觉(Hallucinations)和 Bug。
98+
* AI 生成符合 Schema 的 JSON 配置则是确定性的、可校验的。
99+
100+
ObjectStack 是**为 AI 时代设计的架构**。它提供了一套 AI 能够完美理解和操作的标准语义层,使得“通过对话生成软件”成为可能。
101+
102+
## 概览
103+
104+
在接下来的章节中,我们将深入探讨这套协议的细节:
105+
106+
* 前往 **[架构全景](https://www.google.com/search?q=./03-architecture.md)** 查看各组件如何协作。
107+
* 前往 **[核心价值](https://www.google.com/search?q=./02-core-values.md)** 了解更多关于本地优先的思考。
108+
* 前往 **[企业级模式](https://www.google.com/search?q=./04-enterprise-patterns.md)** 了解如何处理复杂的 ERP 场景。
109+
110+
:::tip 记住
111+
ObjectStack 的目标不是让你写代码写得更快,而是让你写的代码**活得更久**
112+
:::

content/docs/index.mdx

Lines changed: 77 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,111 @@
11
---
2-
title: Introduction
3-
description: The Standard Protocol for AI Software Generation.
2+
title: "Introduction"
3+
description: Why the world needs a universal enterprise full-stack protocol standard. Shifting from Code-Driven to Protocol-Driven architecture.
44
---
55

6-
# ObjectStack Protocol
6+
# Introduction: The Protocol-Driven Paradigm
77

8-
**The Standard Protocol for AI Software Generation.**
8+
> "Code rots. Protocols endure."
99
10-
ObjectStack is a set of open specifications that define how Enterprise Applications should be structured, stored, and rendered using declarative data (JSON/YAML) instead of imperative code.
10+
For the past two decades, enterprise software development has been trapped in a Sisyphean cycle:
1111

12-
It transforms the role of a developer from a **Code Writer** (handling boilerplate, wiring, and glue code) to a **System Architect** (defining schemas, rules, and flows).
12+
We built CRMs with JSP, then rewrote them in Angular five years later, and rewrote them again in React five years after that. Backends shifted from PHP to Node.js, and then to Go. With every iteration of the tech stack, we are **re-implementing the exact same business logic**—the same form validations, the same permission checks, the same approval workflows.
1313

14+
This **"Code-Driven"** development model carries a massive hidden cost: **Business logic is tightly coupled with technical implementation.** When the framework becomes obsolete, your business assets depreciate with it, eventually turning into technical debt.
1415

16+
**ObjectStack was born to end this cycle.**
1517

16-
## Why a New Standard?
18+
## What is ObjectStack?
1719

18-
We are entering the era of **AI-Generated Software**.
19-
Current frameworks (React, NestJS, Spring Boot) are designed for *humans* to write. They are full of implicit context, complex syntax, and fragile dependencies.
20+
ObjectStack is not just a framework or a library; it is a **Universal Full-Stack Application Protocol Standard**.
2021

21-
ObjectStack is designed for **AI (and Humans)** to write.
22-
* **Structured:** Business logic is strictly typed metadata, not free-form code.
23-
* **Deterministic:** A Schema always compiles to the exact same SQL and UI.
24-
* **Hallucination-Free:** The Protocol constraints prevent invalid logic.
22+
It advocates for the complete separation of **"Intent"** from **"Implementation"**. By defining data, interfaces, and processes through standardized JSON protocols, business logic becomes independent of specific programming languages and database technologies.
2523

26-
## The Trinity Architecture
24+
The core architecture of ObjectStack consists of three pillars:
2725

28-
ObjectStack is composed of three decoupled protocols that work together to form a complete Application Kernel.
26+
1. **ObjectQL (The Data Protocol):** A database-agnostic universal data protocol.
27+
2. **ObjectUI (The View Protocol):** A declarative universal interface protocol.
28+
3. **ObjectOS (The Runtime Protocol):** A business operating system responsible for orchestration and governance.
2929

30-
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
3130

32-
<div class="card">
33-
<h3>1. ObjectQL</h3>
34-
<p><strong>The Data Protocol</strong></p>
35-
<p>A Database Compiler that translates universal Schema definitions into optimized SQL for PostgreSQL, SQLite, or MySQL.</p>
36-
<a href="/specifications/objectql/overview">Explore Data Layer →</a>
37-
</div>
3831

39-
<div class="card">
40-
<h3>2. ObjectUI</h3>
41-
<p><strong>The View Protocol</strong></p>
42-
<p>A Server-Driven UI standard that renders pixel-perfect, interactive interfaces from JSON, powered by React & Tailwind.</p>
43-
<a href="/specifications/objectui/overview">Explore View Layer →</a>
44-
</div>
32+
## Core Philosophy
4533

46-
<div class="card">
47-
<h3>3. ObjectOS</h3>
48-
<p><strong>The Runtime Protocol</strong></p>
49-
<p>The Business Kernel responsible for Identity, Workflow Orchestration, and Local-First Synchronization.</p>
50-
<a href="/specifications/objectos/overview">Explore Runtime →</a>
51-
</div>
34+
### 1. Protocol-Driven Development
5235

53-
</div>
36+
In traditional development, business logic is hard-coded into functions:
5437

55-
## The "Protocol-First" Difference
38+
```javascript
39+
// The Old Way: Imperative & Coupled
40+
function createOrder(data) {
41+
if (data.amount > 1000 && !user.isManager) {
42+
throw new Error("Need approval");
43+
}
44+
db.query("INSERT INTO orders ...");
45+
}
5646

57-
How does developing with ObjectStack compare to the traditional way?
58-
59-
### The Old Way (Code-Driven)
60-
To add a "Status" field to a Project entity, you typically touch 4-5 files:
61-
1. `ALTER TABLE` (SQL Migration)
62-
2. `Project.entity.ts` (ORM Definition)
63-
3. `CreateProject.dto.ts` (API Validation)
64-
4. `ProjectForm.tsx` (Frontend Component)
65-
5. `ProjectList.tsx` (Frontend Table)
47+
```
6648

67-
### The ObjectStack Way (Protocol-Driven)
68-
You edit **1 file**:
49+
In ObjectStack, business logic is defined as **Data (Metadata/Protocol)**:
6950

7051
```yaml
71-
# objects/project.object.yml
52+
# The ObjectStack Way: Declarative & Decoupled
53+
object: order
7254
fields:
73-
status:
74-
type: select
75-
options: [planning, active, completed]
76-
default: planning
77-
searchable: true
55+
amount: { type: currency }
56+
validation:
57+
- rule: "amount > 1000"
58+
guard: "!user.isManager"
59+
message: "Need approval"
7860

7961
```
8062

81-
* **ObjectQL** automatically migrates the database and updates the API.
82-
* **ObjectUI** automatically renders the Dropdown in the Form and the Badge in the Grid.
83-
* **ObjectOS** automatically enforces the allowed values validation.
63+
* **The Difference:** The YAML configuration above relies on no specific language. It can be executed by a Node.js backend, analyzed by a Python script, or even transmitted to the frontend for immediate client-side validation.
64+
* **The Value:** Your business logic becomes a **portable, analyzable, and evolvable digital asset**, rather than a pile of code destined for obsolescence.
65+
66+
### 2. Local-First & Data Sovereignty
67+
68+
Cloud-Native brings convenience, but it also strips users of data sovereignty. Data silos created by SaaS vendors leave enterprises without physical control over their own data.
69+
70+
ObjectStack embraces a **Local-First** architecture:
71+
72+
* Applications read and write data primarily to a local database (e.g., SQLite, RxDB).
73+
* Interactions are instantaneous, requiring no network round-trips.
74+
* **ObjectOS** handles complex data synchronization and conflict resolution (CRDTs/LWW) in the background.
75+
76+
This means: **Even if the network goes down, your enterprise software remains usable. Even if the cloud provider goes bankrupt, your data remains in your hands.**
77+
78+
### 3. Database-Agnostic
79+
80+
Enterprises should not be locked into a specific database vendor.
81+
82+
**ObjectQL** acts as a **Database Compiler**. You write standard ObjectQL Schema and Query ASTs, and the engine compiles them into:
83+
84+
* **PostgreSQL** (For production environments)
85+
* **SQLite** (For edge devices or local development)
86+
* **MySQL / Oracle / SQL Server** (For legacy system integration)
87+
88+
This capability allows architects to choose the optimal storage engine for different scenarios without rewriting a single line of business code.
89+
90+
## Why Now?
91+
92+
AI is reshaping software engineering.
93+
94+
As AI-assisted programming (Copilot) becomes ubiquitous, we are discovering that AI generates **Structured Protocols (JSON/YAML)** far more accurately and safely than it generates **Imperative Code (JavaScript/Python)**.
8495

85-
## Key Features
96+
* AI-generated code is prone to hallucinations and bugs.
97+
* AI-generated JSON configuration, validated against a Schema, is deterministic and verifiable.
8698

87-
* **⚡ Local-First:** Built for the edge. Applications run on a local SQLite database and sync to the cloud in the background. Zero latency, offline-ready.
88-
* **🔒 Security by Design:** RBAC and Field-Level Security are injected into the database query compiler. You cannot "forget" to check permissions.
89-
* **🧩 Enterprise Patterns:** Native support for Master-Detail relationships, Currency math, Workflow State Machines, and Audit Logging.
90-
* **🔌 Database Agnostic:** Switch from SQLite (Dev) to PostgreSQL (Prod) to Oracle (Legacy) without changing a single line of business logic.
99+
ObjectStack is an **architecture designed for the AI Era**. It provides a standard semantic layer that AI can perfectly understand and manipulate, making "Software Generation via Conversation" a reality.
91100

92-
## Getting Started
101+
## Overview
93102

94-
Ready to stop writing boilerplate and start architecting?
103+
In the following sections, we will explore the details of these protocols:
95104

96-
* **[Core Concepts](https://www.google.com/search?q=/concepts/introduction)**: Understand the philosophy behind the protocol.
97-
* **[Installation](https://www.google.com/search?q=/getting-started/installation)**: Get the ObjectOS Kernel running in 5 minutes.
98-
* **[Specifications](https://www.google.com/search?q=/specifications/intro)**: Dive deep into the wire protocols.
105+
* Go to **[Architecture Overview](https://www.google.com/search?q=./03-architecture.md)** to see how the components collaborate.
106+
* Go to **[Core Values](https://www.google.com/search?q=./02-core-values.md)** to learn more about Local-First thinking.
107+
* Go to **[Enterprise Patterns](https://www.google.com/search?q=./04-enterprise-patterns.md)** to understand how to handle complex ERP scenarios.
99108

100-
:::tip Designed for the Future
101-
ObjectStack is not just a tool for today; it is a foundation for the autonomous software agents of tomorrow.
109+
:::tip Remember
110+
The goal of ObjectStack is not just to make you write code faster, but to make the code you write **live longer**.
102111
:::

0 commit comments

Comments
 (0)