|
1 | 1 | --- |
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. |
4 | 4 | --- |
5 | 5 |
|
6 | | -# ObjectStack Protocol |
| 6 | +# Introduction: The Protocol-Driven Paradigm |
7 | 7 |
|
8 | | -**The Standard Protocol for AI Software Generation.** |
| 8 | +> "Code rots. Protocols endure." |
9 | 9 |
|
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: |
11 | 11 |
|
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. |
13 | 13 |
|
| 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. |
14 | 15 |
|
| 16 | +**ObjectStack was born to end this cycle.** |
15 | 17 |
|
16 | | -## Why a New Standard? |
| 18 | +## What is ObjectStack? |
17 | 19 |
|
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**. |
20 | 21 |
|
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. |
25 | 23 |
|
26 | | -## The Trinity Architecture |
| 24 | +The core architecture of ObjectStack consists of three pillars: |
27 | 25 |
|
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. |
29 | 29 |
|
30 | | -<div class="grid grid-cols-1 md:grid-cols-3 gap-4"> |
31 | 30 |
|
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> |
38 | 31 |
|
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 |
45 | 33 |
|
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 |
52 | 35 |
|
53 | | -</div> |
| 36 | +In traditional development, business logic is hard-coded into functions: |
54 | 37 |
|
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 | +} |
56 | 46 |
|
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 | +``` |
66 | 48 |
|
67 | | -### The ObjectStack Way (Protocol-Driven) |
68 | | -You edit **1 file**: |
| 49 | +In ObjectStack, business logic is defined as **Data (Metadata/Protocol)**: |
69 | 50 |
|
70 | 51 | ```yaml |
71 | | -# objects/project.object.yml |
| 52 | +# The ObjectStack Way: Declarative & Decoupled |
| 53 | +object: order |
72 | 54 | 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" |
78 | 60 |
|
79 | 61 | ``` |
80 | 62 |
|
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)**. |
84 | 95 |
|
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. |
86 | 98 |
|
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. |
91 | 100 |
|
92 | | -## Getting Started |
| 101 | +## Overview |
93 | 102 |
|
94 | | -Ready to stop writing boilerplate and start architecting? |
| 103 | +In the following sections, we will explore the details of these protocols: |
95 | 104 |
|
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. |
99 | 108 |
|
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**. |
102 | 111 | ::: |
0 commit comments