Skip to content

Commit ac98523

Browse files
authored
Merge pull request #630 from objectstack-ai/copilot/update-website-documentation-again
2 parents 88358ed + 7f7a048 commit ac98523

14 files changed

Lines changed: 3041 additions & 5 deletions

File tree

content/docs/guides/index.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ The `@objectstack/cli` provides a complete development workflow:
3737

3838
## Documentation Structure
3939

40-
- **[Example Apps](./examples)**: Run the built-in Todo, CRM, and BI examples to learn hands-on.
41-
- **[CLI](./cli)**: Command-line interface usage guide with all 11 commands.
42-
- **[Core (Microkernel)](./core)**: Architecture, plugins, services, and events.
43-
- **[Packages](./packages)**: Detailed reference of all packages in the monorepo.
40+
- **[Metadata Types](./metadata)**: Comprehensive guide to every metadata type used in application development — Object, Field, View, Page, App, Dashboard, Flow, Workflow, Validation, and Permission.
41+
- **[Data Modeling](./data-modeling)**: Best practices for designing robust data models.
42+
- **[Business Logic](./business-logic)**: Automation, workflows, and custom logic.
43+
- **[Plugins](./plugins)**: Building and extending the platform with plugins.
44+
- **[Authentication](./authentication)**: Authentication and identity management.
45+
- **[Security](./security)**: Access control, permissions, and row-level security.
46+
- **[AI Capabilities](./ai-capabilities)**: AI agents, RAG pipelines, and model integration.
47+
- **[API Reference](./api-reference)**: REST, GraphQL, and WebSocket APIs.
4448
- **[Client SDK](./client-sdk)**: TypeScript client and React hooks documentation.
4549
- **[Driver Configuration](./driver-configuration)**: Database driver setup and configuration.
50+
- **[Kernel Services](./kernel-services)**: Core microkernel architecture and services.

content/docs/guides/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"title": "Guides",
3-
"pages": ["index", "data-modeling", "plugins", "business-logic", "authentication", "security", "ai-capabilities", "api-reference", "client-sdk", "driver-configuration", "kernel-services", "standards"]
3+
"pages": ["index", "metadata", "data-modeling", "plugins", "business-logic", "authentication", "security", "ai-capabilities", "api-reference", "client-sdk", "driver-configuration", "kernel-services", "standards"]
44
}
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
---
2+
title: App Metadata
3+
description: Define application containers with navigation, branding, and access control
4+
---
5+
6+
# App Metadata
7+
8+
An **App** is a logical container that bundles objects, views, pages, and dashboards into a cohesive application experience. It defines the navigation structure, branding, and access permissions.
9+
10+
## Basic Structure
11+
12+
```typescript
13+
const crmApp = {
14+
name: 'crm',
15+
label: 'CRM',
16+
version: '1.0.0',
17+
description: 'Customer Relationship Management',
18+
icon: 'briefcase',
19+
active: true,
20+
21+
branding: {
22+
primaryColor: '#1a73e8',
23+
logo: '/assets/crm-logo.svg',
24+
favicon: '/assets/favicon.ico',
25+
},
26+
27+
navigation: [
28+
{ type: 'object', label: 'Accounts', objectName: 'account', icon: 'building' },
29+
{ type: 'object', label: 'Contacts', objectName: 'contact', icon: 'users' },
30+
{ type: 'object', label: 'Opportunities', objectName: 'opportunity', icon: 'trending-up' },
31+
{ type: 'dashboard', label: 'Sales Dashboard', dashboardName: 'sales_overview', icon: 'bar-chart' },
32+
],
33+
34+
requiredPermissions: ['crm_access'],
35+
};
36+
```
37+
38+
## App Properties
39+
40+
| Property | Type | Required | Description |
41+
| :--- | :--- | :--- | :--- |
42+
| `name` | `string` || Machine name (`snake_case`) |
43+
| `label` | `string` || Display name |
44+
| `version` | `string` | optional | App version |
45+
| `description` | `string` | optional | App description |
46+
| `icon` | `string` | optional | App icon (Lucide/Material) |
47+
| `active` | `boolean` | optional | Is app active (default: `true`) |
48+
| `isDefault` | `boolean` | optional | Is default app |
49+
| `navigation` | `NavigationItem[]` || Navigation tree |
50+
| `branding` | `AppBranding` | optional | Visual customization |
51+
| `requiredPermissions` | `string[]` | optional | Required permissions to access |
52+
| `homePageId` | `string` | optional | Custom home page ID |
53+
| `objects` | `string[]` | optional | Objects included in this app |
54+
| `apis` | `string[]` | optional | API endpoints included |
55+
| `mobileNavigation` | `object` | optional | Mobile-specific navigation |
56+
57+
## Navigation Items
58+
59+
The navigation tree supports five item types, combined to create rich menu structures:
60+
61+
### Object Navigation
62+
63+
Links to an object's list view:
64+
65+
```typescript
66+
{ type: 'object', label: 'Accounts', objectName: 'account', icon: 'building', viewName: 'all_accounts' }
67+
```
68+
69+
### Dashboard Navigation
70+
71+
Links to a dashboard:
72+
73+
```typescript
74+
{ type: 'dashboard', label: 'Analytics', dashboardName: 'sales_overview', icon: 'bar-chart' }
75+
```
76+
77+
### Page Navigation
78+
79+
Links to a custom page:
80+
81+
```typescript
82+
{ type: 'page', label: 'Settings', pageName: 'app_settings', icon: 'settings', params: { tab: 'general' } }
83+
```
84+
85+
### URL Navigation
86+
87+
Links to an external URL:
88+
89+
```typescript
90+
{ type: 'url', label: 'Help Center', url: 'https://help.example.com', icon: 'help-circle', target: '_blank' }
91+
```
92+
93+
### Group Navigation
94+
95+
Groups items into collapsible sections with children:
96+
97+
```typescript
98+
{
99+
type: 'group',
100+
label: 'Sales',
101+
icon: 'dollar-sign',
102+
expanded: true,
103+
children: [
104+
{ type: 'object', label: 'Accounts', objectName: 'account', icon: 'building' },
105+
{ type: 'object', label: 'Contacts', objectName: 'contact', icon: 'users' },
106+
{ type: 'object', label: 'Opportunities', objectName: 'opportunity', icon: 'trending-up' },
107+
],
108+
}
109+
```
110+
111+
### Common Navigation Properties
112+
113+
All navigation items share these base properties:
114+
115+
| Property | Type | Description |
116+
| :--- | :--- | :--- |
117+
| `id` | `string` | Unique identifier |
118+
| `label` | `string` | Display label |
119+
| `icon` | `string` | Icon name |
120+
| `visible` | `boolean \| string` | Visibility (boolean or expression) |
121+
122+
## Branding
123+
124+
Customize the visual appearance of the app:
125+
126+
```typescript
127+
branding: {
128+
primaryColor: '#1a73e8', // Hex color code
129+
logo: '/assets/logo.svg', // Logo URL
130+
favicon: '/assets/icon.ico', // Favicon URL
131+
}
132+
```
133+
134+
| Property | Type | Description |
135+
| :--- | :--- | :--- |
136+
| `primaryColor` | `string` | Primary brand color (hex) |
137+
| `logo` | `string` | Logo image URL |
138+
| `favicon` | `string` | Favicon URL |
139+
140+
## Mobile Navigation
141+
142+
Configure mobile-specific navigation behavior:
143+
144+
```typescript
145+
mobileNavigation: {
146+
mode: 'bottom',
147+
bottomNavItems: ['home', 'accounts', 'contacts', 'settings'],
148+
}
149+
```
150+
151+
## Complete Example
152+
153+
```typescript
154+
const projectApp = {
155+
name: 'project_management',
156+
label: 'Project Management',
157+
version: '2.0.0',
158+
description: 'Track projects, tasks, and team workload',
159+
icon: 'folder-kanban',
160+
active: true,
161+
162+
branding: {
163+
primaryColor: '#6366f1',
164+
logo: '/assets/pm-logo.svg',
165+
},
166+
167+
navigation: [
168+
{
169+
type: 'page',
170+
label: 'Home',
171+
pageName: 'pm_home',
172+
icon: 'home',
173+
},
174+
{
175+
type: 'group',
176+
label: 'Projects',
177+
icon: 'folder',
178+
expanded: true,
179+
children: [
180+
{ type: 'object', label: 'Projects', objectName: 'project', icon: 'folder' },
181+
{ type: 'object', label: 'Tasks', objectName: 'project_task', icon: 'check-square', viewName: 'task_board' },
182+
{ type: 'object', label: 'Milestones', objectName: 'milestone', icon: 'flag' },
183+
],
184+
},
185+
{
186+
type: 'group',
187+
label: 'Reports',
188+
icon: 'bar-chart',
189+
children: [
190+
{ type: 'dashboard', label: 'Overview', dashboardName: 'project_overview', icon: 'layout-dashboard' },
191+
{ type: 'dashboard', label: 'Team Workload', dashboardName: 'team_workload', icon: 'users' },
192+
],
193+
},
194+
{
195+
type: 'url',
196+
label: 'Documentation',
197+
url: 'https://docs.example.com/pm',
198+
icon: 'book-open',
199+
target: '_blank',
200+
},
201+
],
202+
203+
requiredPermissions: ['pm_access'],
204+
homePageId: 'pm_home',
205+
};
206+
```
207+
208+
## Related
209+
210+
- [Page Metadata](./page) — Custom pages referenced from navigation
211+
- [Dashboard Metadata](./dashboard) — Dashboards referenced from navigation
212+
- [View Metadata](./view) — Views displayed within navigation items
213+
- [Permission Metadata](./permission) — Access control for apps

0 commit comments

Comments
 (0)