Skip to content

Commit d8708de

Browse files
committed
feat: Introduce ObjectStack schema for full stack project definition and update system exports
1 parent 042950d commit d8708de

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed

packages/spec/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
// and establish clear boundaries between different protocol layers.
4545
export * as Shared from './shared';
4646
export * as Data from './data';
47-
// Driver moved to System
48-
// export * as Driver from './driver';
4947
export * as Permission from './permission';
5048
export * as UI from './ui';
5149
export * as System from './system';

packages/spec/src/system/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from './translation.zod';
1212
export * from './events.zod';
1313
export * from './job.zod';
1414
export * from './feature.zod';
15+
export * from './stack.zod';
1516
export * from './types';
1617

1718
// Re-export Core System Definitions
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { z } from 'zod';
2+
3+
import { ManifestSchema } from './manifest.zod';
4+
5+
// Data Protocol
6+
import { ObjectSchema } from '../data/object.zod';
7+
import { FieldSchema } from '../data/field.zod';
8+
9+
// UI Protocol
10+
import { AppSchema } from '../ui/app.zod';
11+
import { ViewSchema } from '../ui/view.zod';
12+
import { PageSchema } from '../ui/page.zod';
13+
import { DashboardSchema } from '../ui/dashboard.zod';
14+
15+
// Automation Protocol
16+
import { ApprovalProcessSchema } from '../automation/approval.zod';
17+
import { WorkflowSchema } from '../automation/workflow.zod';
18+
19+
// Security Protocol (Future expansion)
20+
// import { RoleSchema } from '../auth/role.zod';
21+
22+
/**
23+
* ObjectStack Ecosystem Definition
24+
*
25+
* This schema represents the "Full Stack" definition of a project or environment.
26+
* It is used for:
27+
* 1. Project Export/Import (YAML/JSON dumps)
28+
* 2. IDE Validation (IntelliSense)
29+
* 3. Runtime Bootstrapping (In-memory loading)
30+
*/
31+
export const ObjectStackSchema = z.object({
32+
/** System Configuration */
33+
manifest: ManifestSchema.describe('Project Package Configuration'),
34+
35+
/**
36+
* ObjectQL: Data Layer
37+
* All business objects and entities.
38+
*/
39+
objects: z.array(ObjectSchema).optional().describe('Business Objects definition'),
40+
41+
/**
42+
* ObjectUI: User Interface Layer
43+
* Apps, Menus, Pages, and Visualizations.
44+
*/
45+
apps: z.array(AppSchema).optional().describe('Applications'),
46+
views: z.array(ViewSchema).optional().describe('List Views'),
47+
pages: z.array(PageSchema).optional().describe('Custom Pages'),
48+
dashboards: z.array(DashboardSchema).optional().describe('Dashboards'),
49+
50+
/**
51+
* ObjectFlow: Automation Layer
52+
* Business logic, approvals, and workflows.
53+
*/
54+
workflows: z.array(WorkflowSchema).optional().describe('Event-driven workflows'),
55+
approvals: z.array(ApprovalProcessSchema).optional().describe('Approval processes'),
56+
57+
/**
58+
* ObjectGuard: Security Layer
59+
*/
60+
// roles: z.array(RoleSchema).optional(),
61+
});
62+
63+
export type ObjectStack = z.infer<typeof ObjectStackSchema>;

0 commit comments

Comments
 (0)