Skip to content

Commit e3ee917

Browse files
Copilothuangyiirene
andcommitted
docs: Update index and metadata-standard with new UI layer specs
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent b2c19ff commit e3ee917

File tree

2 files changed

+233
-2
lines changed

2 files changed

+233
-2
lines changed

docs/spec/index.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,26 @@ This section contains the complete metadata specifications for the ObjectQL plat
1212
* [**Query Language (JSON-DSL)**](./query-language.md) - Unified query protocol for database-agnostic data access ✅
1313
* [**Validation Rules**](./validation.md) - Data quality and business rule enforcement ✅
1414
* [**Formula Fields**](./formula.md) - Read-only calculated fields with JavaScript expressions ✅
15+
* [**Initial Data**](./data.md) - Seed data and default records for initialization ✅
1516

1617
## Business Logic Layer
1718

1819
* [**Hooks (Triggers)**](./hook.md) - Event-driven logic attached to data operations ✅
1920
* [**Actions (RPC)**](./action.md) - Custom server-side functions and APIs ✅
2021
* [**Workflows & Processes**](./workflow.md) - Automated business processes and approval chains ⚠️ *Spec complete, implementation pending*
2122

23+
## User Interface Layer
24+
25+
* [**Pages**](./page.md) - UI page definitions, layouts, and navigation ✅
26+
* [**Views**](./view.md) - Saved data queries, filters, and display configurations ✅
27+
* [**Forms**](./form.md) - Data entry layouts and field configurations ✅
28+
* [**Reports**](./report.md) - Analytics, visualizations, and data exports ✅
29+
* [**Menus**](./menu.md) - Navigation structure and menu organization ✅
30+
31+
## Application Organization
32+
33+
* [**Apps**](./app.md) - Application grouping, branding, and menu structure ✅
34+
2235
## Security & Access Control
2336

2437
* [**Permissions**](./permission.md) - Role-based access control, field-level security, and record-level rules ✅

docs/spec/metadata-standard.md

Lines changed: 220 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,184 @@ steps:
198198
field: manager_id
199199
```
200200

201-
### 3. Security & Access Control
201+
### 3. User Interface Layer
202+
203+
#### [Pages](./page.md)
204+
**Purpose**: Define UI layouts and page structures.
205+
206+
**What you define**:
207+
- List pages (table/grid views)
208+
- Detail pages (record details)
209+
- Dashboard pages (metrics and charts)
210+
- Custom pages (specialized UI)
211+
- Page sections and components
212+
- Responsive layouts
213+
214+
**Example** (`project_list.page.yml`):
215+
```yaml
216+
# File: project_list.page.yml
217+
# Page name is inferred from filename!
218+
219+
label: Projects
220+
type: list
221+
object: project
222+
223+
view:
224+
columns:
225+
- name
226+
- status
227+
- owner
228+
- end_date
229+
230+
sort:
231+
- field: end_date
232+
direction: asc
233+
234+
actions:
235+
- create_project
236+
- export_to_excel
237+
```
238+
239+
#### [Views](./view.md)
240+
**Purpose**: Saved queries and display configurations.
241+
242+
**What you define**:
243+
- Filters and sorting
244+
- Column selections
245+
- Grouping and aggregations
246+
- Chart visualizations
247+
- Kanban boards
248+
- Calendar views
249+
250+
**Example** (`active_projects.view.yml`):
251+
```yaml
252+
# File: active_projects.view.yml
253+
# View name is inferred from filename!
254+
255+
label: Active Projects
256+
object: project
257+
type: list
258+
259+
filters:
260+
- field: status
261+
operator: "="
262+
value: active
263+
264+
columns:
265+
- name
266+
- owner
267+
- end_date
268+
- progress
269+
270+
sort:
271+
- field: end_date
272+
direction: asc
273+
```
274+
275+
#### [Forms](./form.md)
276+
**Purpose**: Data entry layouts and configurations.
277+
278+
**What you define**:
279+
- Field layouts (sections, columns)
280+
- Field configurations (required, defaults)
281+
- Validation rules
282+
- Conditional fields
283+
- Form actions
284+
- Wizard forms (multi-step)
285+
286+
**Example** (`project_create.form.yml`):
287+
```yaml
288+
# File: project_create.form.yml
289+
# Form name is inferred from filename!
290+
291+
label: Create Project
292+
object: project
293+
type: create
294+
295+
sections:
296+
- label: Project Information
297+
fields:
298+
- name:
299+
required: true
300+
- status:
301+
default: planning
302+
- owner:
303+
default: $current_user.id
304+
305+
defaults:
306+
priority: medium
307+
status: planning
308+
```
309+
310+
#### [Reports](./report.md)
311+
**Purpose**: Analytics and data exports.
312+
313+
**What you define**:
314+
- Report types (tabular, summary, matrix, chart)
315+
- Data sources and joins
316+
- Grouping and aggregations
317+
- Visualizations
318+
- Export formats (PDF, Excel, CSV)
319+
- Scheduled distribution
320+
321+
**Example** (`sales_summary.report.yml`):
322+
```yaml
323+
# File: sales_summary.report.yml
324+
# Report name is inferred from filename!
325+
326+
label: Sales Summary
327+
type: summary
328+
object: order
329+
330+
grouping:
331+
- field: sales_rep
332+
label: Sales Rep
333+
334+
aggregations:
335+
total_revenue:
336+
field: amount
337+
function: sum
338+
format: currency
339+
340+
order_count:
341+
function: count
342+
```
343+
344+
#### [Menus](./menu.md)
345+
**Purpose**: Navigation structure and organization.
346+
347+
**What you define**:
348+
- Menu items and hierarchy
349+
- Navigation paths
350+
- Icons and labels
351+
- Permissions per item
352+
- Dynamic menu generation
353+
- Contextual actions
354+
355+
**Example** (`main_menu.menu.yml`):
356+
```yaml
357+
# File: main_menu.menu.yml
358+
# Menu name is inferred from filename!
359+
360+
label: Main Navigation
361+
type: main
362+
position: left
363+
364+
items:
365+
- label: Dashboard
366+
icon: standard:home
367+
path: /dashboard
368+
369+
- label: CRM
370+
icon: standard:account
371+
items:
372+
- label: Accounts
373+
path: /accounts
374+
- label: Contacts
375+
path: /contacts
376+
```
377+
378+
### 4. Security & Access Control
202379

203380
#### [Permissions](./permission.md)
204381
**Purpose**: Control who can access what data and operations.
@@ -277,6 +454,32 @@ src/
277454
workflows/ # Business processes
278455
order_approval.workflow.yml
279456
customer_onboarding.workflow.yml
457+
458+
ui/ # User interface
459+
pages/
460+
customer_list.page.yml
461+
customer_detail.page.yml
462+
views/
463+
my_customers.view.yml
464+
vip_customers.view.yml
465+
forms/
466+
customer_create.form.yml
467+
customer_edit.form.yml
468+
menus/
469+
main_menu.menu.yml
470+
admin_menu.menu.yml
471+
472+
reports/ # Analytics
473+
sales_summary.report.yml
474+
customer_ltv.report.yml
475+
476+
data/ # Initial data
477+
default_users.data.yml
478+
sample_customers.data.yml
479+
480+
apps/ # Application definitions
481+
crm.app.yml
482+
sales.app.yml
280483
```
281484
282485
## Development Workflow
@@ -321,6 +524,11 @@ ObjectQL provides a universal loader and generic API for all metadata types.
321524
| Permission | `*.permission.yml` | Filename = Object name | `project.permission.yml` → applies to: `project` |
322525
| Validation | `*.validation.yml` | Filename = Object name | `project.validation.yml` → applies to: `project` |
323526
| Initial Data | `*.data.yml` | Filename = Object name | `users.data.yml` → applies to: `users` |
527+
| Page | `*.page.yml` | Filename = Page name | `dashboard.page.yml` → page: `dashboard` |
528+
| View | `*.view.yml` | Filename = View name | `active_projects.view.yml` → view: `active_projects` |
529+
| Form | `*.form.yml` | Filename = Form name | `customer_create.form.yml` → form: `customer_create` |
530+
| Report | `*.report.yml` | Filename = Report name | `sales_summary.report.yml` → report: `sales_summary` |
531+
| Menu | `*.menu.yml` | Filename = Menu name | `main_menu.menu.yml` → menu: `main_menu` |
324532
325533
**Benefits:**
326534
- ✅ **Less redundancy** - No need to repeat the name inside the file
@@ -394,15 +602,25 @@ fields:
394602
395603
## Reference
396604
605+
### Core Data Layer
397606
- [Objects & Fields](./object.md) - Data modeling
398607
- [Query Language](./query-language.md) - Data access
399608
- [Validation](./validation.md) - Data quality
609+
- [Formula Fields](./formula.md) - Calculated fields
610+
- [Initial Data](./data.md) - Seed data
611+
612+
### Business Logic Layer
400613
- [Hooks](./hook.md) - Event triggers
401614
- [Actions](./action.md) - Custom operations
402615
- [Workflows](./workflow.md) - Process automation
616+
617+
### User Interface Layer
403618
- [Pages](./page.md) - UI pages and components
404619
- [Views](./view.md) - Data presentation
405620
- [Forms](./form.md) - Data entry
406621
- [Reports](./report.md) - Analytics
407622
- [Menus](./menu.md) - Navigation
408-
- [Permissions](./permission.md) - Security
623+
624+
### Application & Security
625+
- [Apps](./app.md) - Application organization
626+
- [Permissions](./permission.md) - Security and access control

0 commit comments

Comments
 (0)