Skip to content

Commit 175e480

Browse files
Copilothotlong
andcommitted
docs: add plugin-auth to documentation (packages, services, kernel-services)
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 2fe78ae commit 175e480

3 files changed

Lines changed: 42 additions & 5 deletions

File tree

content/docs/concepts/core/services.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ The core ecosystem defines several standard service contracts:
7676
| :--- | :--- | :--- |
7777
| `http-server` | `IHttpServer` | `plugin-hono-server`, `adapter-nextjs` |
7878
| `database` | `IDatabaseDriver` | `driver-postgres`, `driver-sqlite`, `driver-mongo` |
79+
| `auth` | `IAuthService` | `plugin-auth` |
7980
| `protocol` | `IProtocolEngine` | `@objectstack/objectql` |
8081
| `api-registry` | `IApiRegistry` | `@objectstack/core` |
8182
| `cache` | `ICacheProvider` | Redis, Memcached, or in-memory |

content/docs/concepts/packages.mdx

Lines changed: 38 additions & 3 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 **15 packages** organized into core packages, adapters, and plugins.
8+
ObjectStack is distributed as a monorepo containing **16 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
@@ -15,9 +15,9 @@ ObjectStack is distributed as a monorepo containing **15 packages** organized in
1515
| :--- | :---: | :--- |
1616
| [Core Packages](#core-packages) | 9 | Essential runtime, protocols, client SDKs, and CLI |
1717
| [Adapter Packages](#adapter-packages) | 3 | Framework adapters (Hono, NestJS, Next.js) |
18-
| [Plugin Packages](#plugin-packages) | 3 | Drivers and server plugins |
18+
| [Plugin Packages](#plugin-packages) | 4 | Drivers, server, and authentication plugins |
1919

20-
**Total: 15 packages**
20+
**Total: 16 packages**
2121

2222
---
2323

@@ -424,6 +424,41 @@ Framework adapters that bridge ObjectStack's unified `HttpDispatcher` to specifi
424424

425425
---
426426

427+
### @objectstack/plugin-auth
428+
429+
**Description:** Authentication & Identity Plugin for ObjectStack
430+
431+
**Purpose:** Provides authentication and identity management services for ObjectStack applications with plugin structure ready for better-auth integration.
432+
433+
**Key Features:**
434+
- **Plugin Lifecycle**: Full init/start/destroy lifecycle implementation
435+
- **Service Registration**: Registers `auth` service in ObjectKernel
436+
- **HTTP Route Scaffolding**: `/api/v1/auth/*` endpoints via IHttpServer
437+
- **Configuration Support**: Uses `AuthConfig` schema from `@objectstack/spec/system`
438+
- **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)
441+
442+
**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
447+
448+
**Use Cases:**
449+
- Adding authentication to ObjectStack applications
450+
- Multi-tenant applications with organization support
451+
- OAuth social login integration
452+
- Secure session management
453+
454+
**Status:** 🟡 **IN DEVELOPMENT** - Structure complete, authentication logic planned
455+
456+
**Implementation Status:** ⚠️ **PARTIALLY IMPLEMENTED** - Plugin structure and routes scaffolded, authentication logic to be added with better-auth integration
457+
458+
**Learn more:** [Auth Config Reference](/docs/references/system/auth-config)
459+
460+
---
461+
427462
## Package Dependencies
428463

429464
### Dependency Graph

content/docs/guides/kernel-services.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ The ObjectStack protocol defines **17 kernel services** registered via the `Core
1414

1515
- ✅ Implemented — 18 protocol methods (kernel-provided)
1616
- ⚠️ Framework — metadata (in-memory registry, DB persistence pending)
17-
- ❌ Plugin Required — 39 protocol methods (to be delivered by plugins)
17+
- 🟡 In Development — auth (plugin structure complete, logic planned)
18+
- ❌ Plugin Required — 38 protocol methods (to be delivered by plugins)
1819
</Callout>
1920

2021
---
@@ -50,7 +51,7 @@ The ObjectStack protocol defines **17 kernel services** registered via the `Core
5051
| 1 | **metadata** | `required` | 7 | ⚠️ Framework | Kernel (in-memory) |
5152
| 2 | **data** | `required` | 9 | ✅ Implemented | `@objectstack/objectql` |
5253
| 3 | **analytics** | `optional` | 2 | ✅ Implemented | `@objectstack/objectql` |
53-
| 4 | **auth** | `required` || ❌ Plugin Required | TBD plugin |
54+
| 4 | **auth** | `required` || 🟡 In Development | `@objectstack/plugin-auth` |
5455
| 5 | **ui** | `optional` | 5 | ❌ Plugin Required | TBD plugin |
5556
| 6 | **workflow** | `optional` | 5 | ❌ Plugin Required | TBD plugin |
5657
| 7 | **automation** | `optional` | 1 | ❌ Plugin Required | TBD plugin |

0 commit comments

Comments
 (0)