Skip to content

Latest commit

 

History

History
156 lines (119 loc) · 7.42 KB

File metadata and controls

156 lines (119 loc) · 7.42 KB

ObjectStack Protocol

ObjectStack Protocol TypeScript License: MIT

The "Constitution" of the Post-SaaS Operating System.

This repository contains the core specifications, schemas, and protocols that power the ObjectStack ecosystem. It defines how data, UI, and system configurations are expressed as code.

📚 Documentation

Quick Start

Architecture & Design

Standards & Best Practices

Documentation Site

The official documentation is built with Fumadocs and Next.js.

Planning & Internal Docs

📦 Monorepo Structure

Package Description Status
@objectstack/spec THE PROTOCOL. Contains all Zod definitions, Types, and JSON Schemas. 🟢 Active
@objectstack/docs Documentation site built with Fumadocs and Next.js. 🟢 Active
content/docs/ Documentation content (MDX files). Shared resource. 🟢 Active
Examples Reference implementations demonstrating protocol features
└─ examples/crm Full-featured CRM - 6 objects, workflows, validations, views, dashboards, reports 🟢 Complete
└─ examples/todo Quick-start - Simple task management with 7 field types 🟢 Active
└─ examples/host Server runtime with kernel/plugin loading pattern 🟡 Experimental
└─ examples/plugin-bi Business Intelligence plugin example 🟡 Experimental
Other packages Legacy/Migration in progress 🟡 Legacy

🛠️ The Protocol Architecture

The ObjectStack Protocol (@objectstack/spec) is divided into five core modules:

1. Data Protocol (ObjectQL)

Defines the "Shape of Data" and business logic.

  • Schema: Objects, Fields (23+ types including text, number, select, lookup, formula, autonumber, etc.)
  • Logic: Workflows, Triggers, Validation Rules, Formulas
  • Security: Permissions, Sharing Rules
  • Query: Abstract Syntax Tree (AST) for unified data access across drivers
  • Automation: Flow definitions, Dataset mappings

2. UI Protocol (ObjectUI)

Defines the "Shape of Interaction" for rendering interfaces.

  • Views: Grid, Kanban, Calendar, Gantt, List configurations
  • Pages: FlexiPage layouts with regions and components
  • Navigation: App menus and navigation structures
  • Analytics: Reports (Tabular, Summary, Matrix), Dashboards with widgets
  • Actions: Script, URL, Modal, Flow-triggered actions
  • Theming: Color palettes, typography, breakpoints, animations

3. System Protocol (ObjectOS)

Defines the "Runtime Environment" and platform capabilities.

  • Manifest: Application packaging (objectstack.config.ts)
  • Identity: Authentication, Roles, Territories, Licenses
  • Integration: Webhooks, API contracts, ETL Mappings
  • Datasource: Driver definitions for SQL, NoSQL, SaaS connectors
  • Discovery: Plugin discovery and loading mechanisms
  • I18n: Translation and internationalization support

4. AI Protocol

Defines AI agent integration capabilities.

  • Agent: AI agent definitions and configurations
  • Tools: AI tool integrations
  • Knowledge: Knowledge base structures
  • Models: AI model configurations

5. API Protocol

Defines standardized API contracts.

  • Envelopes: Response structures (BaseResponse, ListRecordResponse, etc.)
  • Requests: Request payloads (CreateRequest, UpdateRequest, BulkRequest, etc.)
  • Contracts: API endpoint definitions and specifications

🚀 Development

This project uses PNPM workspaces.

Prerequisites

  • Node.js >= 18
  • PNPM >= 8

Quick Start

# 1. Install dependencies
pnpm install

# 2. Build the Protocol (Generates Schemas & Docs)
pnpm --filter @objectstack/spec build
# Output:
# - packages/spec/dist/        (Compiled TS)
# - packages/spec/json-schema/ (JSON Schemas)

# 3. Start Documentation Site
pnpm docs:dev
# Visit http://localhost:3000/docs

🤝 Contributing

We welcome contributions! Please read our Contributing Guide for detailed guidelines.

Quick Start for Contributors

  1. Read the Docs: Review CONTRIBUTING.md for complete guidelines
  2. Check Priorities: See PRIORITIES.md for what to work on next
  3. Understand Architecture: Read ARCHITECTURE.md for system overview
  4. Follow Standards: Review content/docs/standards/ for coding standards

Key Standards

PR Checklist

  • Zod schema follows naming conventions
  • Comprehensive JSDoc comments with @description
  • Unit tests with 80%+ coverage
  • Documentation with examples
  • JSON schema generated successfully
  • All existing tests pass

See CONTRIBUTING.md for complete details.

📄 License

Apach2 2.0 © ObjectStack