Skip to content

Commit bab646d

Browse files
authored
Merge pull request #217 from objectstack-ai/copilot/update-objectstack-metadata-app
2 parents 1369595 + c63d610 commit bab646d

File tree

6 files changed

+548
-432
lines changed

6 files changed

+548
-432
lines changed

ARCHITECTURE.md

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ All ObjectOS plugins must conform to this lifecycle for consistency and predicta
5959
- **Purpose**: Implements the runtime engine and plugin ecosystem
6060
- **Key Packages**:
6161
- `@objectstack/runtime` - Microkernel with plugin lifecycle management
62-
- `@objectos/plugin-server` - NestJS HTTP server plugin
62+
- `@objectstack/plugin-hono-server` - Hono HTTP server plugin
6363
- `@objectos/plugin-better-auth` - Authentication plugin
6464
- `@objectos/plugin-audit-log` - Audit logging plugin
6565
- `@objectos/kernel` - **DEPRECATED** (use @objectstack/runtime)
@@ -288,22 +288,27 @@ export class ObjectDataController {
288288
}
289289
```
290290

291-
### Why NestJS?
291+
### Why Hono?
292292

293-
1. **Dependency Injection**: Built-in IoC container
294-
2. **Decorators**: Clean syntax for routes and guards
295-
3. **OpenAPI**: Automatic API documentation
296-
4. **Middleware**: Easy to add logging, rate limiting, etc.
293+
1. **Edge-Ready**: Works in Node.js, Cloudflare Workers, Vercel, Deno
294+
2. **Lightweight**: Minimal overhead, fast routing
295+
3. **Middleware**: Easy to add CORS, auth, logging, rate limiting
296+
4. **TypeScript-First**: Full type inference for routes and context
297297

298298
### REST API Endpoints
299299

300300
| Method | Path | Description |
301301
|--------|------|-------------|
302-
| POST | `/api/data/:object/query` | Query records |
303-
| POST | `/api/data/:object` | Create record |
304-
| PATCH | `/api/data/:object/:id` | Update record |
305-
| DELETE | `/api/data/:object/:id` | Delete record |
306-
| GET | `/api/metadata/:object` | Get object metadata |
302+
| POST | `/api/v1/data/:object/query` | Query records |
303+
| POST | `/api/v1/data/:object` | Create record |
304+
| PATCH | `/api/v1/data/:object/:id` | Update record |
305+
| DELETE | `/api/v1/data/:object/:id` | Delete record |
306+
| GET | `/api/v1/meta/:object` | Get object metadata |
307+
| ALL | `/api/v1/auth/*` | Authentication (BetterAuth) |
308+
| GET | `/api/v1/audit/events` | Audit log events |
309+
| GET | `/api/v1/jobs` | Job queue status |
310+
| GET | `/api/v1/metrics/prometheus` | Prometheus metrics |
311+
| GET | `/api/v1/permissions/sets` | Permission sets |
307312

308313
## Layer 5: UI Layer
309314

@@ -359,12 +364,12 @@ class RedisDriver implements ObjectQLDriver {
359364
Let's trace a request to create a contact:
360365

361366
```
362-
1. Client sends POST /api/data/contacts
367+
1. Client sends POST /api/v1/data/contacts
363368
└─> Body: { first_name: "John", last_name: "Doe" }
364369
365-
2. NestJS Controller receives request
366-
└─> Extracts user from JWT
367-
└─> Calls kernel.insert('contacts', data)
370+
2. Hono HTTP handler receives request
371+
└─> Extracts user from session (BetterAuth)
372+
└─> Calls kernel broker insert('contacts', data)
368373
369374
3. Kernel processes the request
370375
└─> Loads contact metadata from registry
@@ -501,19 +506,24 @@ describe('Contact Management', () => {
501506
### Development
502507

503508
```
504-
┌─────────────────┐
505-
│ Vite Dev Server │ :5173
506-
└────────┬────────┘
507-
508-
509-
┌─────────────────┐
510-
│ NestJS Server │ :3000
511-
└────────┬────────┘
512-
513-
514-
┌─────────────────┐
515-
│ PostgreSQL │ :5432
516-
└─────────────────┘
509+
┌──────────────────────┐ ┌──────────────────────┐
510+
│ Vite Dev (apps/web) │ │ Fumadocs (apps/site) │
511+
│ :5321 │ │ :3002 │
512+
└──────────┬───────────┘ └──────────┬───────────┘
513+
│ proxy /api/v1 │
514+
▼ │
515+
┌──────────────────────┐ │
516+
│ ObjectStack Hono │◀────────────────┘
517+
│ :5320 │
518+
│ ├── /api/v1/*
519+
│ ├── /.well-known │
520+
│ └── Kernel + Plugins │
521+
└──────────┬───────────┘
522+
523+
524+
┌──────────────────────┐
525+
│ PostgreSQL / SQLite │
526+
└──────────────────────┘
517527
```
518528
519529
### Production

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Thank you for your interest in contributing to ObjectOS! This guide will help yo
77
ObjectOS is the **runtime engine** that executes metadata defined in the ObjectQL format. It's part of a two-repository ecosystem:
88

99
- **[objectql/objectql](https://github.com/objectstack-ai/objectql)**: The protocol definition and core drivers
10-
- **objectql/objectos** (this repo): The runtime implementation
10+
- **objectstack-ai/objectos** (this repo): The runtime implementation
1111

1212
## Project Structure
1313

@@ -174,7 +174,7 @@ describe('ObjectOS.insert', () => {
174174

175175
```bash
176176
# Clone the repository
177-
git clone https://github.com/objectql/objectos.git
177+
git clone https://github.com/objectstack-ai/objectos.git
178178
cd objectos
179179

180180
# Install dependencies
@@ -221,7 +221,7 @@ pnpm run lint # (TODO: Add lint script)
221221

222222
### 1. Find an Issue
223223

224-
- Check [GitHub Issues](https://github.com/objectql/objectos/issues)
224+
- Check [GitHub Issues](https://github.com/objectstack-ai/objectos/issues)
225225
- Look for labels: `good first issue`, `help wanted`
226226
- Comment on the issue to claim it
227227

0 commit comments

Comments
 (0)