https://github.com/objectstack-ai/spec
The Universal Architecture Standard. Shared JSON Schemas and TypeScript Interfaces for the ObjectStack ecosystem (Data, Control, View).
https://github.com/objectstack-ai/spec
json-schema protocol standard typescript-interfaces
Last synced: about 16 hours ago
JSON representation
The Universal Architecture Standard. Shared JSON Schemas and TypeScript Interfaces for the ObjectStack ecosystem (Data, Control, View).
- Host: GitHub
- URL: https://github.com/objectstack-ai/spec
- Owner: objectstack-ai
- License: apache-2.0
- Created: 2026-01-18T06:47:54.000Z (25 days ago)
- Default Branch: main
- Last Pushed: 2026-02-05T14:54:32.000Z (7 days ago)
- Last Synced: 2026-02-05T14:59:38.311Z (7 days ago)
- Topics: json-schema, protocol, standard, typescript-interfaces
- Language: TypeScript
- Homepage: https://protocol.objectstack.ai
- Size: 7.98 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 60
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ObjectStack Protocol

[](https://www.typescriptlang.org/)
[](https://opensource.org/licenses/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.
## π― What is ObjectStack?
ObjectStack is a metadata-driven platform built on three foundational protocols:
- **ObjectQL** (Data Layer) β Define data structure and queries
- **ObjectOS** (Control Layer) β Runtime, permissions, and workflows
- **ObjectUI** (View Layer) β Presentation and user interaction
**Learn more:**
- [Three-Layer Stack](./content/docs/introduction/architecture.mdx) β How ObjectQL, ObjectOS, and ObjectUI work together
- [Architecture Guide](./ARCHITECTURE.md) β Complete microkernel architecture documentation
## π Documentation
π **[Read the Full Documentation](https://objectstack.dev/docs)** or run locally with `pnpm docs:dev`
### Quick Links
- **Getting Started:**
- [Introduction](./content/docs/introduction/) β Core concepts and architecture
- [CLI Guide](./content/docs/framework/cli.mdx) β `init`, `dev`, `serve`, `studio`, `compile`, `validate`
- [Quick Reference](./content/docs/references/quick-reference.mdx) β Fast protocol lookup
- **Protocol References:**
- [Protocol Reference](./content/docs/references/) β All protocol specifications (139 Zod schemas)
- [ObjectQL](./content/docs/objectql/) β Data layer documentation
- [ObjectUI](./content/docs/objectui/) β UI layer documentation
- [ObjectOS](./content/docs/objectos/) β System layer documentation
- **Development:**
- [Developer Guide](./content/docs/developer/) β Tutorials and best practices
- [Package Reference](./content/docs/framework/packages.mdx) β All 15 packages
- [Contributing Guide](./CONTRIBUTING.md) β How to contribute
## π Quick Start
### For Application Developers
```bash
# Create a new project
npx @objectstack/cli init my-app
cd my-app
# Start development server
os dev
# Start with Console UI (Object Explorer, Schema Inspector)
os studio
# β API: http://localhost:3000/api/v1/
# β Console: http://localhost:3000/_studio/
```
### For Protocol Developers
```bash
# 1. Clone and install
git clone https://github.com/nicecui/spec.git
cd spec
pnpm install
# 2. Build all packages
pnpm build
# 3. Check environment health
pnpm doctor
# 4. Start Documentation Site
pnpm docs:dev
# β http://localhost:3000/docs
# 5. Launch Console UI + dev server
pnpm studio
```
### Monorepo Scripts
| Script | Description |
| :--- | :--- |
| `pnpm build` | Build all packages (excludes docs) |
| `pnpm dev` | Start app-host example dev server |
| `pnpm studio` | Launch Console UI with dev server |
| `pnpm dev:console` | Start Console standalone (MSW mode) |
| `pnpm test` | Run spec tests |
| `pnpm doctor` | Check environment health |
| `pnpm docs:dev` | Start documentation site |
| `pnpm docs:build` | Build documentation for production |
### CLI Commands
```bash
os init [name] # Scaffold a new project
os dev # Start dev server (hot-reload)
os dev --ui # Dev server + Console UI
os studio # Alias for dev --ui (one command)
os serve # Start production server
os compile # Build deployable JSON artifact
os validate # Check configuration against protocol
os info # Display metadata summary
os generate # Scaffold objects, views, flows
os doctor # Check environment health
```
## π¦ Monorepo Structure
### Core Packages
| Package | Description | Status |
| :--- | :--- | :--- |
| [`@objectstack/spec`](packages/spec) | Protocol definitions (Zod schemas, Types, JSON Schemas) | π’ Active |
| [`@objectstack/core`](packages/core) | Microkernel runtime (Plugin system, DI, Event Bus, Logger) | π’ Active |
| [`@objectstack/types`](packages/types) | Shared runtime type definitions | π’ Active |
### Engine Packages
| Package | Description | Status |
| :--- | :--- | :--- |
| [`@objectstack/objectql`](packages/objectql) | ObjectQL query engine and schema registry | π’ Active |
| [`@objectstack/runtime`](packages/runtime) | Runtime utilities, DriverPlugin, AppPlugin | π’ Active |
| [`@objectstack/metadata`](packages/metadata) | Metadata loading and persistence | π’ Active |
### Client Packages
| Package | Description | Status |
| :--- | :--- | :--- |
| [`@objectstack/client`](packages/client) | Official Client SDK (CRUD, Batch API, Error handling) | π’ Active |
| [`@objectstack/client-react`](packages/client-react) | React hooks (useQuery, useMutation, usePagination) | π’ Active |
### Plugin Packages
| Package | Description | Status |
| :--- | :--- | :--- |
| [`@objectstack/driver-memory`](packages/plugins/driver-memory) | In-memory driver (reference implementation, zero deps) | π’ Active |
| [`@objectstack/plugin-hono-server`](packages/plugins/plugin-hono-server) | HTTP server plugin (Hono-based, auto-discovery) | π’ Active |
| [`@objectstack/plugin-msw`](packages/plugins/plugin-msw) | Mock Service Worker plugin for browser testing | π’ Active |
| [`@objectstack/plugin-auth`](packages/plugins/plugin-auth) | Authentication & identity plugin (structure implemented) | π‘ In Development |
### Tools & Apps
| Package | Description | Status |
| :--- | :--- | :--- |
| [`@objectstack/cli`](packages/cli) | CLI: init, dev, serve, studio, compile, validate, generate | π’ Active |
| [`@objectstack/studio`](apps/studio) | Studio UI (Object Explorer, Schema Inspector) | π’ Active |
| [`@objectstack/docs`](apps/docs) | Documentation site (Fumadocs + Next.js) | π’ Active |
### Examples
| Example | Description | Level |
| :--- | :--- | :--- |
| [`@example/app-todo`](examples/app-todo) | Task management app β objects, views, dashboards, flows | π’ Beginner |
| [`@example/app-crm`](examples/app-crm) | Enterprise CRM β accounts, contacts, opportunities, leads | π‘ Intermediate |
| [`@example/app-host`](examples/app-host) | Server host β multi-app orchestration with plugins | π΄ Advanced |
| [`@example/plugin-bi`](examples/plugin-bi) | BI plugin β analytics objects and reports | π‘ Intermediate |
## πΊοΈ Roadmap
See **[ROADMAP.md](./ROADMAP.md)** for the next-phase optimization and improvement plan (Phases 5β11), covering:
- Spec test coverage completion (100% schema coverage)
- Runtime package hardening (resolve all TODOs)
- Framework adapter implementations (Hono, Next.js, NestJS)
- Deprecation cleanup & v3.0 preparation
- Developer experience & tooling improvements
- Performance optimization & security hardening
Studio-specific roadmap: **[apps/studio/ROADMAP.md](./apps/studio/ROADMAP.md)**
## π€ Contributing
We welcome contributions! Please read our **[Contributing Guide](./CONTRIBUTING.md)** for:
- Development workflow and setup
- Coding standards (Zod-first, camelCase config, snake_case data)
- Testing requirements
- Documentation guidelines
**Key Standards:**
- All schemas defined using **Zod** with runtime validation
- Configuration keys: `camelCase` (e.g., `maxLength`)
- Machine names: `snake_case` (e.g., `project_task`)
- Comprehensive JSDoc comments
## π License
Apache 2.0 Β© ObjectStack