Skip to content

Commit ef29eb6

Browse files
authored
Merge pull request #672 from objectstack-ai/copilot/update-readme-and-docs
2 parents 86fdaa9 + 4761989 commit ef29eb6

6 files changed

Lines changed: 339 additions & 33 deletions

File tree

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![ObjectStack Protocol](https://img.shields.io/badge/ObjectStack-Protocol-black)
44
[![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
5-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
66

77
> **The "Constitution" of the Post-SaaS Operating System.**
88
@@ -32,14 +32,14 @@ ObjectStack is a metadata-driven platform built on three foundational protocols:
3232
- [Quick Reference](./content/docs/references/quick-reference.mdx) — Fast protocol lookup
3333

3434
- **Protocol References:**
35-
- [Protocol Reference](./content/docs/references/) — All protocol specifications (139 Zod schemas)
35+
- [Protocol Reference](./content/docs/references/) — All protocol specifications (175 Zod schemas)
3636
- [ObjectQL](./content/docs/objectql/) — Data layer documentation
3737
- [ObjectUI](./content/docs/objectui/) — UI layer documentation
3838
- [ObjectOS](./content/docs/objectos/) — System layer documentation
3939

4040
- **Development:**
4141
- [Developer Guide](./content/docs/developer/) — Tutorials and best practices
42-
- [Package Reference](./content/docs/framework/packages.mdx) — All 15 packages
42+
- [Package Reference](./content/docs/concepts/packages.mdx) — All 25 packages
4343
- [Contributing Guide](./CONTRIBUTING.md) — How to contribute
4444

4545
## 🚀 Quick Start
@@ -64,7 +64,7 @@ os studio
6464

6565
```bash
6666
# 1. Clone and install
67-
git clone https://github.com/nicecui/spec.git
67+
git clone https://github.com/objectstack-ai/spec.git
6868
cd spec
6969
pnpm install
7070

@@ -127,6 +127,7 @@ os doctor # Check environment health
127127
| [`@objectstack/objectql`](packages/objectql) | ObjectQL query engine and schema registry | 🟢 Active |
128128
| [`@objectstack/runtime`](packages/runtime) | Runtime utilities, DriverPlugin, AppPlugin | 🟢 Active |
129129
| [`@objectstack/metadata`](packages/metadata) | Metadata loading and persistence | 🟢 Active |
130+
| [`@objectstack/rest`](packages/rest) | REST API Server — auto-generated endpoints from protocol | 🟢 Active |
130131

131132
### Client Packages
132133

@@ -142,13 +143,29 @@ os doctor # Check environment health
142143
| [`@objectstack/driver-memory`](packages/plugins/driver-memory) | In-memory driver (reference implementation, zero deps) | 🟢 Active |
143144
| [`@objectstack/plugin-hono-server`](packages/plugins/plugin-hono-server) | HTTP server plugin (Hono-based, auto-discovery) | 🟢 Active |
144145
| [`@objectstack/plugin-msw`](packages/plugins/plugin-msw) | Mock Service Worker plugin for browser testing | 🟢 Active |
145-
| [`@objectstack/plugin-auth`](packages/plugins/plugin-auth) | Authentication & identity plugin (structure implemented) | 🟡 In Development |
146+
| [`@objectstack/plugin-auth`](packages/plugins/plugin-auth) | Authentication & identity plugin (better-auth based) | 🟡 In Development |
147+
| [`@objectstack/plugin-security`](packages/plugins/plugin-security) | RBAC, Row-Level Security, and Field-Level Security | 🟢 Active |
148+
| [`@objectstack/plugin-dev`](packages/plugins/plugin-dev) | Dev mode — auto-enables all services with in-memory stubs | 🟢 Active |
149+
150+
### Framework Adapters
151+
152+
| Package | Description | Status |
153+
| :--- | :--- | :--- |
154+
| [`@objectstack/express`](packages/adapters/express) | Express adapter | 🟢 Active |
155+
| [`@objectstack/fastify`](packages/adapters/fastify) | Fastify adapter | 🟢 Active |
156+
| [`@objectstack/hono`](packages/adapters/hono) | Hono adapter (Node.js, Bun, Deno, Cloudflare Workers) | 🟢 Active |
157+
| [`@objectstack/nestjs`](packages/adapters/nestjs) | NestJS module integration | 🟢 Active |
158+
| [`@objectstack/nextjs`](packages/adapters/nextjs) | Next.js App Router adapter | 🟢 Active |
159+
| [`@objectstack/nuxt`](packages/adapters/nuxt) | Nuxt adapter (h3-based) | 🟢 Active |
160+
| [`@objectstack/sveltekit`](packages/adapters/sveltekit) | SvelteKit adapter | 🟢 Active |
146161

147162
### Tools & Apps
148163

149164
| Package | Description | Status |
150165
| :--- | :--- | :--- |
151166
| [`@objectstack/cli`](packages/cli) | CLI: init, dev, serve, studio, compile, validate, generate | 🟢 Active |
167+
| [`create-objectstack`](packages/create-objectstack) | Project scaffolder (`npx create-objectstack`) | 🟢 Active |
168+
| [`objectstack-vscode`](packages/vscode-objectstack) | VSCode extension — autocomplete, validation, diagnostics | 🟢 Active |
152169
| [`@objectstack/studio`](apps/studio) | Studio UI (Object Explorer, Schema Inspector) | 🟢 Active |
153170
| [`@objectstack/docs`](apps/docs) | Documentation site (Fumadocs + Next.js) | 🟢 Active |
154171

content/docs/concepts/packages.mdx

Lines changed: 207 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Complete reference of all ObjectStack packages in the monorepo
55

66
# Package Reference
77

8-
ObjectStack is distributed as a monorepo containing **16 packages** organized into core packages, adapters, and plugins.
8+
ObjectStack is distributed as a monorepo containing **25 packages** organized into core packages, adapters, and plugins.
99

1010
> **Note for AI Agents**: Each package's `README.md` contains a specific "AI Development Context" section describing its architectural role and usage rules.
1111
@@ -14,10 +14,11 @@ ObjectStack is distributed as a monorepo containing **16 packages** organized in
1414
| Category | Count | Description |
1515
| :--- | :---: | :--- |
1616
| [Core Packages](#core-packages) | 9 | Essential runtime, protocols, client SDKs, and CLI |
17-
| [Adapter Packages](#adapter-packages) | 3 | Framework adapters (Hono, NestJS, Next.js) |
18-
| [Plugin Packages](#plugin-packages) | 4 | Drivers, server, and authentication plugins |
17+
| [Framework Adapters](#framework-adapters) | 7 | Express, Fastify, Hono, NestJS, Next.js, Nuxt, SvelteKit |
18+
| [Plugin Packages](#plugin-packages) | 6 | Drivers, server, auth, security, dev, and MSW plugins |
19+
| [Tools](#tools) | 3 | Project scaffolder, VSCode extension, REST API server |
1920

20-
**Total: 16 packages**
21+
**Total: 25 packages**
2122

2223
---
2324

@@ -42,7 +43,7 @@ ObjectStack is distributed as a monorepo containing **16 packages** organized in
4243
- `Integration` - Integration protocol schemas
4344
- `Shared` - Shared utilities and identifiers
4445

45-
**Protocol Count:** 139 Zod schemas
46+
**Protocol Count:** 175 Zod schemas
4647

4748
**Learn more:** [Protocol Reference](/docs/references)
4849

@@ -291,10 +292,40 @@ ObjectStack is distributed as a monorepo containing **16 packages** organized in
291292

292293
---
293294

294-
## Adapter Packages
295+
## Framework Adapters
295296

296297
Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specific HTTP frameworks.
297298

299+
### @objectstack/express
300+
301+
**Description:** Express Framework Adapter
302+
303+
**Purpose:** Converts ObjectStack's standard HTTP dispatch interface to Express routes.
304+
305+
**Key Features:**
306+
- Maps standard routes to Express handlers
307+
- Supports Express v5 middleware chain
308+
- Bearer token authentication via AuthPlugin
309+
310+
**Implementation Status:****FULLY IMPLEMENTED**
311+
312+
---
313+
314+
### @objectstack/fastify
315+
316+
**Description:** Fastify Framework Adapter
317+
318+
**Purpose:** Converts ObjectStack's standard HTTP dispatch interface to Fastify routes.
319+
320+
**Key Features:**
321+
- Maps standard routes to Fastify handlers
322+
- Supports Fastify v5 plugin system
323+
- Bearer token authentication via AuthPlugin
324+
325+
**Implementation Status:****FULLY IMPLEMENTED**
326+
327+
---
328+
298329
### @objectstack/hono
299330

300331
**Description:** Hono Framework Adapter
@@ -334,9 +365,39 @@ Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specifi
334365
**Key Features:**
335366
- App Router integration
336367
- API route handlers
337-
- Server-side data access
368+
- Server-side data access and server actions
338369

339-
**Implementation Status:** 🔄 **IN PROGRESS**
370+
**Implementation Status:****FULLY IMPLEMENTED**
371+
372+
---
373+
374+
### @objectstack/nuxt
375+
376+
**Description:** Nuxt Framework Adapter
377+
378+
**Purpose:** Integrates ObjectStack with Nuxt server routes via h3.
379+
380+
**Key Features:**
381+
- h3 event handler integration
382+
- Nitro server route support
383+
- Bearer token authentication via AuthPlugin
384+
385+
**Implementation Status:****FULLY IMPLEMENTED**
386+
387+
---
388+
389+
### @objectstack/sveltekit
390+
391+
**Description:** SvelteKit Framework Adapter
392+
393+
**Purpose:** Integrates ObjectStack with SvelteKit hooks and server routes.
394+
395+
**Key Features:**
396+
- SvelteKit handle hook integration
397+
- Server route handlers
398+
- Bearer token authentication via AuthPlugin
399+
400+
**Implementation Status:****FULLY IMPLEMENTED**
340401

341402
---
342403

@@ -428,22 +489,22 @@ Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specifi
428489

429490
**Description:** Authentication & Identity Plugin for ObjectStack
430491

431-
**Purpose:** Provides authentication and identity management services for ObjectStack applications with plugin structure ready for better-auth integration.
492+
**Purpose:** Provides authentication and identity management services for ObjectStack applications with better-auth integration.
432493

433494
**Key Features:**
434495
- **Plugin Lifecycle**: Full init/start/destroy lifecycle implementation
435496
- **Service Registration**: Registers `auth` service in ObjectKernel
436497
- **HTTP Route Scaffolding**: `/api/v1/auth/*` endpoints via IHttpServer
437498
- **Configuration Support**: Uses `AuthConfig` schema from `@objectstack/spec/system`
438499
- **OAuth Provider Support**: Configuration for Google, GitHub, Microsoft, etc.
439-
- **Advanced Features**: Organization/team support, 2FA, passkeys, magic links (planned)
440-
- **Session Management**: Configurable session expiry and refresh (planned)
500+
- **ObjectQL Database**: Uses ObjectQL for data persistence (no ORM required)
501+
- **Advanced Features**: Organization/team support, 2FA, passkeys, magic links
441502

442503
**API Routes:**
443-
- `POST /api/v1/auth/login` - User login
444-
- `POST /api/v1/auth/register` - User registration
445-
- `POST /api/v1/auth/logout` - User logout
446-
- `GET /api/v1/auth/session` - Get current session
504+
- `POST /api/v1/auth/sign-in/email` - Sign in with email and password
505+
- `POST /api/v1/auth/sign-up/email` - Register new user
506+
- `POST /api/v1/auth/sign-out` - Sign out
507+
- `GET /api/v1/auth/get-session` - Get current session
447508

448509
**Use Cases:**
449510
- Adding authentication to ObjectStack applications
@@ -459,6 +520,122 @@ Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specifi
459520

460521
---
461522

523+
### @objectstack/plugin-security
524+
525+
**Description:** Security Plugin for ObjectStack — RBAC, RLS, and Field-Level Security Runtime
526+
527+
**Purpose:** Provides runtime security enforcement for ObjectStack applications, including role-based access control, row-level security, and field-level masking.
528+
529+
**Key Features:**
530+
- **RBAC Permission Evaluator**: Checks object-level CRUD permissions per user role
531+
- **Row-Level Security (RLS)**: Compiles policy expressions into ObjectQL query filters
532+
- **Field-Level Masking**: Strips non-readable fields from query results
533+
- **ObjectQL Middleware Integration**: Transparent security enforcement on every operation
534+
- **Most-Permissive Merging**: If any role grants access, the operation is allowed
535+
536+
**Security Chain (4 steps):**
537+
1. Resolve permission sets from user roles
538+
2. Check CRUD permissions on objects
539+
3. Inject RLS filters into queries
540+
4. Mask restricted fields in results
541+
542+
**Use Cases:**
543+
- Multi-tenant applications with role-based access
544+
- Data isolation between teams/organizations
545+
- Compliance requirements (field masking for sensitive data)
546+
547+
**Implementation Status:****FULLY IMPLEMENTED** - Production ready
548+
549+
---
550+
551+
### @objectstack/plugin-dev
552+
553+
**Description:** Development Mode Plugin for ObjectStack
554+
555+
**Purpose:** Auto-enables all 17+ kernel services with in-memory implementations for a full-featured API development environment.
556+
557+
**Key Features:**
558+
- **Zero Configuration**: Single plugin enables entire development stack
559+
- **In-Memory Services**: All services use in-memory implementations
560+
- **Full Protocol Support**: Auth, Data, Metadata, Storage, Analytics, and more
561+
- **Hot Reload Compatible**: Works with `os dev` for hot-reload workflows
562+
563+
**Use Cases:**
564+
- Rapid prototyping without database setup
565+
- Local development and testing
566+
- CI/CD pipeline testing
567+
568+
**Implementation Status:****FULLY IMPLEMENTED** - Development ready
569+
570+
---
571+
572+
## Tools
573+
574+
### @objectstack/rest
575+
576+
**Description:** ObjectStack REST API Server — automatic REST endpoint generation from protocol
577+
578+
**Purpose:** Turns ObjectStack schema definitions into fully functional CRUD endpoints with zero boilerplate.
579+
580+
**Key Features:**
581+
- **Auto-Generated Endpoints**: CRUD routes from object schemas
582+
- **Batch Operations**: `/createMany`, `/updateMany`, `/deleteMany`, `/batch` endpoints
583+
- **Metadata API**: `/meta`, `/meta/{type}`, `/meta/{type}/{name}` for runtime introspection
584+
- **Discovery Endpoint**: `/api/v1` for API self-documentation
585+
- **Route Manager**: Centralized route registration, grouping, and middleware chain
586+
- **HTTP Caching**: ETag and Last-Modified header support
587+
- **Configurable Paths**: Plural, kebab-case, and camelCase path transformations
588+
589+
**Use Cases:**
590+
- Auto-generating REST APIs from metadata
591+
- Building production API servers
592+
- Custom route management
593+
594+
**Implementation Status:****FULLY IMPLEMENTED** - Production ready
595+
596+
---
597+
598+
### create-objectstack
599+
600+
**Description:** Create a new ObjectStack project — `npx create-objectstack`
601+
602+
**Purpose:** Interactive project scaffolder for quickly creating new ObjectStack projects.
603+
604+
**Key Features:**
605+
- **Interactive Mode**: Guided project setup with prompts
606+
- **Template Support**: `full-stack`, `api-only`, `plugin` templates
607+
- **Dependency Installation**: Automatic `pnpm install` (skippable)
608+
- **Zero Config**: Works out-of-the-box with sensible defaults
609+
610+
**Use Cases:**
611+
- Starting new ObjectStack projects
612+
- Creating plugin packages
613+
- Scaffolding from templates
614+
615+
**Implementation Status:****FULLY IMPLEMENTED** - Production ready
616+
617+
---
618+
619+
### objectstack-vscode
620+
621+
**Description:** ObjectStack Protocol — Autocomplete, validation, and inline diagnostics for `.object.ts`, `.view.ts`, and `objectstack.config.ts` files
622+
623+
**Purpose:** VSCode extension providing IDE support for ObjectStack protocol development.
624+
625+
**Key Features:**
626+
- **Autocomplete**: IntelliSense for ObjectStack schemas
627+
- **Validation**: Real-time schema validation with error diagnostics
628+
- **Protocol Awareness**: Understands `.object.ts`, `.view.ts`, and config files
629+
630+
**Use Cases:**
631+
- ObjectStack development in VSCode
632+
- Real-time feedback on schema definitions
633+
- Productivity improvement
634+
635+
**Implementation Status:****FULLY IMPLEMENTED**
636+
637+
---
638+
462639
## Package Dependencies
463640

464641
### Dependency Graph
@@ -473,19 +650,31 @@ Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specifi
473650
│ ↓
474651
│ └─→ @objectstack/runtime (uses objectql engine)
475652
│ ↓
653+
│ ├─→ @objectstack/rest (REST API generation)
476654
│ ├─→ @objectstack/client (consumes runtime APIs)
477655
│ │ ↓
478656
│ │ └─→ @objectstack/client-react (wraps client)
479657
│ └─→ Adapters:
658+
│ ├─→ @objectstack/express (Express routes)
659+
│ ├─→ @objectstack/fastify (Fastify routes)
480660
│ ├─→ @objectstack/hono (Hono routes)
481661
│ ├─→ @objectstack/nestjs (NestJS modules)
482-
│ └─→ @objectstack/nextjs (Next.js routes)
662+
│ ├─→ @objectstack/nextjs (Next.js routes)
663+
│ ├─→ @objectstack/nuxt (Nuxt/h3 routes)
664+
│ └─→ @objectstack/sveltekit (SvelteKit hooks)
483665
└─→ @objectstack/cli (validates against spec schemas)
484666
485667
Plugins (depend on core packages):
486668
├─→ @objectstack/driver-memory (implements driver interface)
487669
├─→ @objectstack/plugin-hono-server (HTTP server via @objectstack/hono)
488-
└─→ @objectstack/plugin-msw (mocks for testing via runtime)
670+
├─→ @objectstack/plugin-msw (mocks for testing via runtime)
671+
├─→ @objectstack/plugin-auth (authentication via better-auth)
672+
├─→ @objectstack/plugin-security (RBAC, RLS, field masking)
673+
└─→ @objectstack/plugin-dev (dev mode, all services in-memory)
674+
675+
Tools:
676+
├─→ create-objectstack (project scaffolder)
677+
└─→ objectstack-vscode (VSCode extension)
489678
```
490679

491680
### Installation
@@ -534,7 +723,7 @@ All packages in the monorepo are versioned together and released simultaneously
534723
<Card
535724
href="/docs/references"
536725
title="Protocol Reference"
537-
description="Explore the 139 protocol schemas"
726+
description="Explore the 175 protocol schemas"
538727
/>
539728
<Card
540729
href="/docs/developers"

content/docs/guides/cheatsheets/quick-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Fast lookup table for all ObjectStack protocols
66

77
# Quick Reference Guide
88

9-
Fast lookup for all 139 ObjectStack protocols organized by category.
9+
Fast lookup for all 175 ObjectStack protocols organized by category.
1010

1111
<Callout type="info">
1212
Click on any protocol name to view its complete API reference.

0 commit comments

Comments
 (0)