|
1 | | -# ObjectOS (The Runtime Platform) |
| 1 | +# ObjectOS |
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | 4 |
|
5 | | -**The Metadata-Driven Low-Code Engine.** |
6 | | -*Build Salesforce-class Enterprise Applications in minutes, not months.* |
| 5 | +**Open-source alternative to Salesforce & Airtable.** |
| 6 | +*A full-stack low-code platform with metadata-driven backend and auto-generated React UI.* |
7 | 7 |
|
8 | | -[Documentation](https://www.google.com/search?q=https://objectos.org) · [ObjectQL Protocol](https://www.google.com/search?q=https://github.com/objectql/objectql) · [Discussions](https://www.google.com/search?q=https://github.com/objectql/objectos/discussions) |
| 8 | +[Documentation](https://objectos.org) · [Protocol Specs](https://github.com/objectql/objectql) · [Live Demo](https://demo.objectos.org) |
9 | 9 |
|
10 | 10 | </div> |
11 | 11 |
|
12 | 12 | --- |
13 | 13 |
|
14 | 14 | ## 📖 Introduction |
15 | 15 |
|
16 | | -**ObjectOS** is the high-performance application runtime built on top of the [ObjectQL Protocol](https://www.google.com/search?q=https://github.com/objectql/objectql). |
| 16 | +**ObjectOS** is the unified low-code platform for the AI era. |
17 | 17 |
|
18 | | -While ObjectQL defines *how to describe data* (the Protocol & Drivers), **ObjectOS** defines *how to run the business* (the Platform). It provides a modular **Kernel**, a production-ready **HTTP Server**, and a rich ecosystem of **Plugins** to handle Authentication, Workflows, and Permissions. |
| 18 | +Most platforms force you to choose: flexibility (like **Airtable**) or structure (like **Salesforce**). ObjectOS gives you both in a single, open-source package. |
19 | 19 |
|
20 | | -**Think of it as:** |
| 20 | +By defining your business logic in standard `*.object.yml` files (powered by [ObjectQL](https://github.com/objectql/objectql)), ObjectOS instantly generates: |
21 | 21 |
|
22 | | -* **ObjectQL** is HTML (Standard). |
23 | | -* **ObjectOS** is Chrome (Engine). |
| 22 | +1. **A Powerful Backend:** Node.js kernel with built-in Auth, Permissions (RBAC/RLS), and Workflow. |
| 23 | +2. **A Unified Frontend:** A React application that combines high-performance Data Grids with enterprise-grade Detail Forms. |
24 | 24 |
|
25 | 25 | ## ✨ Key Features |
26 | 26 |
|
27 | | -* **🧠 Modular Micro-Kernel:** A pure logic engine that handles metadata loading, lifecycle hooks, and dependency injection. Framework agnostic. |
28 | | -* **🔌 Protocol Driven:** Natively understands `*.object.yml` files. Zero boilerplate for CRUD. |
29 | | -* **🛡️ Enterprise Security:** Built-in Row-Level Security (RLS) and Field-Level Security (FLS) powered by RBAC. |
30 | | -* **🧩 Preset System:** Instantly transform the engine into a CRM, ERP, or PM tool using pre-packaged metadata bundles (Presets). |
31 | | -* **⚡ High Performance:** Optimized for Node.js, supporting massive concurrency and serverless deployment. |
| 27 | +### 🖥️ The Unified UI (Hybrid Experience) |
| 28 | + |
| 29 | +Stop building separate "Admin Panels" and "Dashboards". |
| 30 | + |
| 31 | +* **Grid View (Airtable-like):** Powered by **TanStack Table**. Supports resizing, sorting, and inline editing for mass data entry. |
| 32 | +* **Detail Drawer (Salesforce-like):** Click any row to slide out a structured form with related lists and activity feeds. |
| 33 | +* **Auto-Generated:** Zero frontend code required. Rendered dynamically from metadata. |
| 34 | + |
| 35 | +### ⚙️ The Metadata Engine |
| 36 | + |
| 37 | +* **Protocol Driven:** Describes data, validation, and layout in pure YAML. |
| 38 | +* **Database Agnostic:** Runs on PostgreSQL, MongoDB, or SQLite. |
| 39 | +* **Enterprise Security:** Field-level security and record-level sharing rules out of the box. |
| 40 | + |
| 41 | +### 🤖 AI-First Architecture |
| 42 | + |
| 43 | +ObjectOS is designed to be the "Execution Layer" for AI. |
| 44 | + |
| 45 | +* Don't write boilerplate. Let AI generate your `object.yml` and complex formulas. |
| 46 | +* The runtime handles the heavy lifting (CRUD, Validation, State Management). |
32 | 47 |
|
33 | 48 | --- |
34 | 49 |
|
35 | 50 | ## 🏗 Architecture |
36 | 51 |
|
37 | | -ObjectOS follows a strict **Onion Architecture**. The Kernel is the core, surrounded by Interface adapters (Server) and Infrastructure (Drivers/Plugins). |
| 52 | +ObjectOS is a Monorepo that bridges the gap between Protocol and User Experience. |
38 | 53 |
|
39 | 54 | ```mermaid |
40 | 55 | graph TD |
41 | | - User((Client)) -->|REST / GraphQL| Server[@objectos/server] |
| 56 | + subgraph "The Definition (ObjectQL)" |
| 57 | + YAML[contact.object.yml] -->|Parses| Metadata |
| 58 | + end |
42 | 59 | |
43 | | - subgraph "ObjectOS Runtime" |
44 | | - Server -->|Context| Kernel[@objectos/kernel] |
45 | | - |
46 | | - Kernel -->|Auth Logic| PluginAuth[@objectos/plugin-auth] |
47 | | - Kernel -->|Workflow| PluginFlow[@objectos/plugin-workflow] |
48 | | - |
49 | | - Kernel -->|Load Metadata| Preset[@objectos/preset-steedos] |
| 60 | + subgraph "The Engine (@objectos/kernel)" |
| 61 | + Metadata --> Kernel |
| 62 | + Kernel -->|Auth & Logic| Plugins |
| 63 | + Kernel -->|SQL/NoSQL| DB[(Database)] |
50 | 64 | end |
51 | 65 | |
52 | | - subgraph "ObjectQL Data Layer (External Repo)" |
53 | | - Kernel -->|Dispatch Query| DriverPG[@objectql/driver-pg] |
54 | | - Kernel -->|Dispatch Query| DriverMongo[@objectql/driver-mongo] |
| 66 | + subgraph "The Interface (apps/platform)" |
| 67 | + Kernel <-->|API| SDK[@objectos/sdk] |
| 68 | + SDK --> Renderer[@objectos/renderer] |
| 69 | + Renderer --> UI[Unified React UI] |
55 | 70 | end |
56 | 71 | |
57 | | - DriverPG --> DB[(PostgreSQL)] |
| 72 | + style UI fill:#f9f,stroke:#333,stroke-width:2px |
58 | 73 |
|
59 | 74 | ``` |
60 | 75 |
|
61 | 76 | --- |
62 | 77 |
|
63 | | -## 📦 Packages Overview |
64 | | - |
65 | | -This repository is a **Monorepo** managed by Turborepo. |
66 | | - |
67 | | -### 1. The Core |
68 | | - |
69 | | -| Package | Description | |
70 | | -| --- | --- | |
71 | | -| **`@objectos/kernel`** | The brain. Manages object registry, triggers, and query dispatching. | |
72 | | -| **`@objectos/server`** | The gateway. A NestJS-based HTTP server exposing standard API endpoints. | |
73 | | - |
74 | | -### 2. The Plugins |
75 | | - |
76 | | -| Package | Description | |
77 | | -| --- | --- | |
78 | | -| **`@objectos/plugin-auth`** | Integration with **Better-Auth**. Handles Session, SSO, and 2FA. | |
79 | | -| **`@objectos/plugin-workflow`** | A BPMN-compatible workflow engine for approval processes. | |
80 | | -| **`@objectos/plugin-storage`** | File upload adapters for S3, OSS, and MinIO. | |
81 | | -| **`@objectos/plugin-script`** | Sandbox for running custom server-side scripts safely. | |
82 | | - |
83 | | -### 3. The Presets |
84 | | - |
85 | | -| Package | Description | |
86 | | -| --- | --- | |
87 | | -| **`@objectos/preset-base`** | Minimal system objects (Users, Roles, Permissions). | |
88 | | -| **`@objectos/preset-steedos`** | **Steedos Compatible.** Full CRM metadata (Spaces, Orgs, Accounts). | |
89 | | -| **`@objectos/preset-iot`** | IoT specific objects (Devices, Telemetry, Alerts). | |
90 | | - |
91 | | ---- |
92 | | - |
93 | 78 | ## 🚀 Quick Start |
94 | 79 |
|
95 | | -Build a CRM in 30 seconds. |
| 80 | +Build a CRM in less than a minute. |
96 | 81 |
|
97 | | -### 1. Install Dependencies |
98 | | - |
99 | | -Note: We install the **Runtime** from here, and the **Driver** from the ObjectQL repo. |
| 82 | +### 1. Create a Project |
100 | 83 |
|
101 | 84 | ```bash |
102 | | -npm install @objectos/kernel @objectos/server @objectql/driver-pg |
| 85 | +npx create-objectos-app my-company |
| 86 | +cd my-company |
| 87 | +npm install |
103 | 88 |
|
104 | 89 | ``` |
105 | 90 |
|
106 | | -### 2. Create the Application (`main.ts`) |
107 | | - |
108 | | -```typescript |
109 | | -import { ObjectOS } from '@objectos/kernel'; |
110 | | -import { ObjectServer } from '@objectos/server'; |
111 | | -// The Driver comes from the Protocol layer |
112 | | -import { PostgresDriver } from '@objectql/driver-pg'; |
113 | | - |
114 | | -async function bootstrap() { |
115 | | - // 1. Initialize the Kernel |
116 | | - const kernel = new ObjectOS(); |
117 | | - |
118 | | - // 2. Mount the Driver (Kernel is database agnostic) |
119 | | - const driver = new PostgresDriver({ |
120 | | - connection: process.env.DATABASE_URL |
121 | | - }); |
122 | | - await driver.connect(); |
123 | | - kernel.useDriver(driver); |
124 | | - |
125 | | - // 3. Load Business Logic (Presets & Local Files) |
126 | | - // This loads standard CRM objects like 'accounts', 'contacts' |
127 | | - await kernel.loadPreset('@objectos/preset-steedos'); |
128 | | - |
129 | | - // Load your custom objects |
130 | | - await kernel.loadFromDirectory('./my-objects'); |
131 | | - |
132 | | - // 4. Start the HTTP Server |
133 | | - const server = new ObjectServer(kernel); |
134 | | - await server.listen(3000); |
135 | | - |
136 | | - console.log('🚀 ObjectOS is running on http://localhost:3000'); |
137 | | -} |
138 | | - |
139 | | -bootstrap(); |
| 91 | +### 2. Define an Object |
| 92 | + |
| 93 | +Create `objects/deal.object.yml`: |
| 94 | + |
| 95 | +```yaml |
| 96 | +name: deals |
| 97 | +label: Sales Deal |
| 98 | +icon: dollar-sign |
| 99 | +fields: |
| 100 | + title: |
| 101 | + type: text |
| 102 | + required: true |
| 103 | + amount: |
| 104 | + type: currency |
| 105 | + scale: 2 |
| 106 | + stage: |
| 107 | + type: select |
| 108 | + options: ["New", "Negotiation", "Won", "Lost"] |
| 109 | + close_date: |
| 110 | + type: date |
140 | 111 |
|
141 | 112 | ``` |
142 | 113 |
|
143 | | -### 3. Consume the API |
144 | | - |
145 | | -You now have a full CRUD API with filtering, sorting, and permissions. |
| 114 | +### 3. Run the Platform |
146 | 115 |
|
147 | 116 | ```bash |
148 | | -curl -X POST http://localhost:3000/api/v4/accounts/query \ |
149 | | - -H "Content-Type: application/json" \ |
150 | | - -d '{ |
151 | | - "filters": [["annual_revenue", ">", 1000000]], |
152 | | - "fields": ["name", "owner.name", "created_at"] |
153 | | - }' |
| 117 | +npm run dev |
154 | 118 |
|
155 | 119 | ``` |
156 | 120 |
|
157 | | ---- |
158 | | - |
159 | | -## 🤖 AI Strategy |
| 121 | +Visit `http://localhost:3000`. |
| 122 | +You will see a **Data Grid** for Deals. Click "New" to see the **Form**. All CRUD operations work instantly. |
160 | 123 |
|
161 | | -ObjectOS is designed to be the **Execution Target** for AI. |
| 124 | +--- |
162 | 125 |
|
163 | | -Do not write boilerplate code. Use our **AI Context** (in `objectql` repo) to instruct LLMs (Cursor, Copilot) to: |
| 126 | +## 📦 Ecosystem |
164 | 127 |
|
165 | | -1. Generate `*.object.yml` files from business requirements. |
166 | | -2. Write complex Formulas and Automation Rules. |
167 | | -3. Generate frontend code that consumes ObjectOS APIs. |
| 128 | +| Package | Description | |
| 129 | +| --- | --- | |
| 130 | +| **`apps/platform`** | The unified frontend application (React + Shadcn UI). | |
| 131 | +| **`@objectos/kernel`** | The backend logic engine. | |
| 132 | +| **`@objectos/server`** | The NestJS API gateway. | |
| 133 | +| **`@objectos/plugin-auth`** | Authentication via Better-Auth. | |
168 | 134 |
|
169 | 135 | --- |
170 | 136 |
|
171 | 137 | ## 🤝 Contributing |
172 | 138 |
|
173 | | -We welcome contributions! Please see our [Contributing Guide](https://www.google.com/search?q=CONTRIBUTING.md). |
| 139 | +We are building the future of open-source business software. |
174 | 140 |
|
175 | | -* **Bug Reports:** Open an issue here. |
176 | | -* **Protocol Changes:** Please go to [objectql/objectql](https://www.google.com/search?q=https://github.com/objectql/objectql). |
| 141 | +* **Core Protocol:** Contribute to [objectql/objectql](https://github.com/objectql/objectql). |
| 142 | +* **Runtime & UI:** Submit PRs to this repository. |
177 | 143 |
|
178 | 144 | ## 📄 License |
179 | 145 |
|
180 | | -MIT © [ObjectOS Team](https://www.google.com/search?q=https://objectos.org) |
| 146 | +MIT © [ObjectOS Team](https://objectos.org) |
0 commit comments