Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f02e121
Initial plan
Copilot Jan 12, 2026
79ae5da
Update metadata-standard.md and object.md with filename-based identif…
Copilot Jan 12, 2026
ce27248
Update validation, view, form, permission, workflow, report, applicat…
Copilot Jan 12, 2026
8ec149b
Update action, hook, metadata-organization docs and README with filen…
Copilot Jan 12, 2026
3329987
Update getting-started and data-modeling guides with filename-based a…
Copilot Jan 12, 2026
3636faf
Merge branch 'main' into copilot/update-documentation-for-data-specs
hotlong Jan 12, 2026
cc27dd3
Refactor app and menu metadata structure
hotlong Jan 12, 2026
78bc2e3
Fix documentation issues: correct example filename, remove duplicates…
Copilot Jan 12, 2026
96039c0
feat: Add CRM and Finance modules with object definitions
hotlong Jan 12, 2026
fee35a9
feat: Enhance object loading to infer names from filenames and improv…
hotlong Jan 12, 2026
bb54783
Add smart defaults and normalization for object fields
hotlong Jan 12, 2026
bf3387f
Refactor object model: remove object interfaces, update types
hotlong Jan 12, 2026
53c3e3e
Refactor to modular structure and update type exports
hotlong Jan 12, 2026
d40c72b
Restructure enterprise scenario and consolidate types
hotlong Jan 12, 2026
d3cd022
feat: Implement dynamic plugin loading and validation system
hotlong Jan 12, 2026
d4e5324
feat: add UI components and metadata handling for the studio
hotlong Jan 12, 2026
0f63234
feat: Add auto-generated TypeScript interfaces for various entities i…
hotlong Jan 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ It is **not** an ORM, but a high-level data protocol designed for AI agents, low
* Template messages with internationalization support.


* **📝 Clean, Minimal Syntax:**
* **Filename-based identification** - No redundant `name` properties needed
* Object name automatically inferred from `project.object.yml` → `project`
* 10-15% less boilerplate compared to traditional metadata formats
* Crystal-clear file organization and conventions


* **⚡ Modern & Lightweight:**
* Written in 100% **TypeScript**.
* **Zero heavy legacy dependencies.** No runtime environment requirements beyond Node.js.
Expand Down Expand Up @@ -289,7 +296,9 @@ ObjectQL includes a comprehensive **visual reporting system** similar to Salesfo

**Example Report Definition:**
```yaml
name: tasks_by_project
# File: tasks_by_project.report.yml
# Report name is inferred from filename!

label: Tasks by Project and Priority
type: summary
object: tasks
Expand Down
11 changes: 8 additions & 3 deletions docs/guide/data-modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ Data modeling in ObjectQL is **Metadata-First**. You define your application's s

## 1. The Object Definition

Each file represents one business entity. By convention, name the file `[object_name].object.yml`.
**ObjectQL uses filename-based identification.** The object name is automatically inferred from the filename (without the `.object.yml` extension), eliminating redundancy.

**File naming:** `<object_name>.object.yml`

```yaml
# objects/product.object.yml
name: product
# File: product.object.yml
# Object name "product" is automatically inferred from filename!

label: Product
description: "Catalog items for sale"
icon: standard:product
Expand All @@ -32,6 +35,8 @@ fields:
- clothing
```

**Note:** The redundant `name: product` property is no longer needed - it's automatically inferred from the filename!

## 2. Fields & Relationships

ObjectQL supports rich field types that automate UI rendering and validation.
Expand Down
9 changes: 7 additions & 2 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ Let's build a simple **To-Do List** backend.

In ObjectQL, everything is an "Object" (like a Table or Collection).

**ObjectQL uses filename-based identification** - the object name is automatically inferred from the filename, making your metadata files cleaner.

```yaml
# todo.object.yml
name: todo
# File: todo.object.yml
# Object name "todo" is automatically inferred from filename!

label: To-Do Item
fields:
title:
Expand All @@ -39,6 +42,8 @@ fields:
default: false
```

**Note:** You no longer need to specify `name: todo` - it's inferred from the filename `todo.object.yml`!

### 2. Configure the Engine

Updated in v0.2: You can now use a simple connection string.
Expand Down
50 changes: 38 additions & 12 deletions docs/guide/metadata-organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,41 @@ Each module should have a README explaining:

## Object Naming Conventions

### Prefixing Strategy
### File-Based Naming

**ObjectQL uses filename-based identification.** The object name is automatically inferred from the filename (without the `.object.yml` extension), eliminating redundancy.

For large projects with multiple modules, use prefixes to avoid name collisions:
**Examples:**
- `crm_account.object.yml` → Object name: `crm_account`
- `finance_invoice.object.yml` → Object name: `finance_invoice`
- `project_task.object.yml` → Object name: `project_task`

Inside the file, you **no longer need** to specify `name: crm_account` - it's inferred from the filename!

```yaml
# ✅ Good: Clear module ownership
name: crm_account
name: finance_invoice
name: project_task
# File: crm_account.object.yml
# Object name "crm_account" is automatically inferred!

label: CRM Account
fields:
company_name:
type: text
required: true
```

### Prefixing Strategy

For large projects with multiple modules, use prefixes in your **filenames** to avoid name collisions:

```
# ✅ Good: Clear module ownership via filenames
crm/objects/crm_account.object.yml → Object: crm_account
finance/objects/finance_invoice.object.yml → Object: finance_invoice
project/objects/project_task.object.yml → Object: project_task

# ❌ Avoid: Risk of collision
name: account # Which account? CRM or Finance?
name: task # Project task or general task?
crm/objects/account.object.yml → Object: account (ambiguous)
finance/objects/account.object.yml → Object: account (collision!)
```

**When to prefix:**
Expand All @@ -128,7 +150,7 @@ name: task # Project task or general task?
- ✅ When similar concepts exist across domains

**When NOT to prefix:**
- ❌ Core shared objects (`user`, `organization`)
- ❌ Core shared objects (`user.object.yml`, `organization.object.yml`)
- ❌ Small applications (< 30 objects)
- ❌ When it reduces clarity

Expand Down Expand Up @@ -198,19 +220,23 @@ fields:

## Extension Pattern

Use extensions to customize objects without modifying source:
Use extensions to customize objects without modifying source files.

**Original** (`core/objects/user.object.yml`):
```yaml
name: user
# File: user.object.yml
# Object name "user" is inferred from filename

fields:
name: { type: text }
email: { type: text }
```

**Extension** (`extensions/user.extension.object.yml`):
```yaml
name: user # Same name triggers merge
# File: user.extension.object.yml
# Extends the "user" object (matches by filename base)

fields:
employee_id: { type: text }
email: { required: true, unique: true }
Expand Down
22 changes: 19 additions & 3 deletions docs/spec/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ Input parameters (`params`) are defined using the same `FieldConfig` schema as o

## 2. Configuration (YAML)

Actions are declared in `*.object.yml` or JSON.
Actions are declared in your object definition file (`<object_name>.object.yml`).

```yaml
# File: order.object.yml
# Object name is inferred from filename!

label: Order
fields:
# ... field definitions

# Custom Actions
actions:
# 1. A Record Action (Button on a row)
approve_order:
Expand All @@ -48,10 +56,18 @@ actions:

## 3. Implementation (TypeScript)

Implement the logic in a companion `*.action.ts` file.
Implement the logic in a companion `<object_name>.action.ts` file.

**File Naming Convention:** `<object_name>.action.ts`

The filename (without `.action.ts`) must match your object name to enable automatic binding.

**Examples:**
- `order.action.ts` → Actions for `order` object
- `project.action.ts` → Actions for `project` object

```typescript
// src/objects/order.action.ts
// File: order.action.ts
import { ActionDefinition } from '@objectql/types';
import { Order } from './types';

Expand Down
Loading
Loading