Skip to content

Latest commit

 

History

History
213 lines (145 loc) · 7.91 KB

File metadata and controls

213 lines (145 loc) · 7.91 KB

ObjectOS

The Enterprise Low-Code Runtime Engine.

Instant Backend. Security Kernel. Workflow Automation.

Built on ObjectQL & NestJS.

License Stack


🏢 Introduction

ObjectOS is a production-ready, metadata-driven runtime platform.

While ObjectQL defines how data looks, ObjectOS defines how business runs. It acts as the "Operating System" for your enterprise data, instantly turning static YAML schemas into secure, scalable, and compliant APIs.

The Role of ObjectOS:

  • The Enforcer: Intercepts every request to enforce RBAC (Role-Based Access Control) and Record-Level Security (RLS).
  • The Server: Automatically serves REST, GraphQL, and JSON-RPC APIs for Object UI.
  • The Automator: Runs server-side triggers, workflows, and scheduled jobs.

🚀 Key Features

🛡️ Enterprise Security Kernel

ObjectOS doesn't just read data; it protects it.

  • Authentication: Integrated OIDC, SAML, and LDAP support (via Better-Auth).
  • Fine-Grained Permission: Field-level and record-level sharing rules defined in YAML.
  • Audit Logging: Built-in tracking of who did what and when.

🔌 Instant API Gateway

Stop writing boilerplate controllers.

  • Auto-generated REST API: GET /api/v1/data/{object} works out-of-the-box.
  • Auto-generated GraphQL: Instant schema stitching based on your ObjectQL definitions.
  • Metadata API: Serves UI configuration to frontend clients like Object UI.

⚙️ Workflow & Automation

  • Triggers: Run code beforeInsert, afterUpdate, beforeDelete.
  • Flow Engine: Visual workflow execution (compatible with BPMN-style logic).
  • Job Queue: Background task processing based on Redis.

📦 Architecture

ObjectOS is built as a modular Monorepo using NestJS and follows the @objectstack/spec protocol.

Micro-Kernel Architecture

ObjectOS implements a micro-kernel plugin architecture where core functionality is minimal and all features are loaded as plugins:

┌─────────────────────────────────────────────────────────┐
│               @objectstack/runtime (Core)                │
│  • Plugin Lifecycle Manager (init/start/destroy)        │
│  • Service Registry (DI Container)                      │
│  • Event Bus (Hook System)                              │
│  • Dependency Resolver (Topological Sort)               │
└──────────────┬──────────────────────────────────────────┘
               │
       ┌───────┴────────┬────────────┬──────────┐
       │                │            │          │
  ┌────▼─────┐   ┌─────▼─────┐  ┌──▼───┐  ┌───▼────┐
  │ ObjectQL │   │  Driver   │  │Server│  │ Custom │
  │  Plugin  │   │  Plugin   │  │Plugin│  │ Plugin │
  └──────────┘   └───────────┘  └──────┘  └────────┘

See @objectstack/runtime for details on the plugin system.

Protocol Compliance

ObjectOS adheres to the @objectstack/spec protocol, which defines:

  • Kernel Protocol: Plugin lifecycle, manifest structure, and context interfaces
  • Data Protocol: Object schemas, field types, queries, and hooks
  • System Protocol: Audit logging, events, and job scheduling
  • UI Protocol: App configurations, views, and dashboards

This ensures interoperability across the ObjectStack ecosystem (ObjectQL, ObjectOS, ObjectUI).

Package Role Description
@objectstack/runtime The Kernel Micro-kernel with plugin lifecycle and service registry.
@objectos/kernel The Brain The core logic engine. Wraps ObjectQL, manages plugins, and handles the event bus.
@objectos/server The Gateway NestJS application layer. Handles HTTP/WS traffic, Middlewares, and Guards.
@objectos/plugin-auth Auth Authentication strategies (Local, OAuth2, Enterprise SSO).
@objectos/plugin-workflow Logic Workflow engine and trigger runner.
@objectos/presets Config Standard system objects (_users, _roles, _audit_log).

⚡ Getting Started

Prerequisites

  • Node.js 18+
  • PostgreSQL or MongoDB
  • Redis (for Queues/Caching)

Installation

# Clone the repository
git clone https://github.com/objectstack-ai/objectos.git

# Install dependencies
pnpm install

# Configure environment
cp .env.example .env

Running the Server

ObjectOS runs as a standard NestJS application.

# Start in development mode
pnpm dev

# The API is now available at http://localhost:3000
# The Metadata API is at http://localhost:3000/api/v1/metadata

🧩 Usage Example

ObjectOS is designed to be injected into your application.

// main.ts (Your NestJS App)
import { NestFactory } from '@nestjs/core';
import { ObjectOSModule } from '@objectos/server';
import { SqlDriver } from '@objectql/driver-sql';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  // Initialize ObjectOS
  await app.get(ObjectOSModule).boot({
    // 1. Define Data Source (ObjectQL Driver)
    driver: new SqlDriver({
      connection: process.env.DATABASE_URL
    }),
    
    // 2. Load Plugins
    plugins: [
      AuthPlugin({ secret: '...' }),
      WorkflowPlugin()
    ],
    
    // 3. Load Metadata
    metadata: ['./src/objects/*.yml']
  });

  await app.listen(3000);
}
bootstrap();

📋 Development & Roadmap

Want to contribute or see what's coming next?

Key Q1 2026 Goals:

  • 🔐 Production-grade permission system (Object/Field/Record-level)
  • 🪝 Complete lifecycle hooks system
  • 🔗 Full relationship support (Lookup, Master-Detail, Many-to-Many)
  • 🧪 Test coverage (90% Kernel, 80% Server, 70% UI)

⚖️ License & Commercial Usage

ObjectOS is open-source software licensed under the GNU Affero General Public License v3.0 (AGPLv3).

What this means:

  • Free for internal use: You can use ObjectOS internally within your company for free.
  • Free for open source: You can use ObjectOS in AGPL-licensed open-source projects.
  • ⚠️ Copyleft: If you modify ObjectOS or link it into your application and convey it to users (e.g., as a SaaS), you must open-source your entire application under AGPL.

Commercial License

If you wish to build proprietary/closed-source SaaS applications using ObjectOS, or cannot comply with the AGPL, you must purchase a Commercial License.

👉 Contact us for Enterprise Licensing: GitHub Issues


Part of the Object Ecosystem.

ObjectQL (Data)ObjectOS (System)Object UI (View)