Managing Data
Define entities, fields, and relationships in your manifest and manage them through Studio.
Core Concepts
Your data model is declared in manifest.json and managed entirely by the platform. Three building blocks:
- Entities -- the tables in your app (e.g.
contacts,deals,tasks). - Fields -- the columns on each entity. Each field has a name, a type, and optional constraints.
- Relationships -- foreign keys that connect entities (e.g. a
dealbelongs to acompany).
You never write SQL. The Core reads your manifest and creates or updates the PostgreSQL schema automatically.
Managing Schema via Studio
Using AI Forge
The fastest way to modify your data model is through the Forge panel. Describe what you need:
- "Add a
priorityfield to tasks with values low, medium, high." - "Create a
commentsentity with a text body and a foreign key totasks." - "Remove the
fax_numberfield from contacts."
Forge updates the manifest and presents the diff for your approval.
Editing the Manifest Directly
Open manifest.json in the Studio code editor. Each entity is declared under the dataContract array with its fields, relationships, and constraints. This gives you full control when you know exactly what you want.
Field Types
RootCX supports a range of field types for common data needs:
| Type | Use case |
|---|---|
text |
Names, descriptions, free-form strings |
number |
Prices, quantities, percentages |
boolean |
Flags and toggles |
date |
Calendar dates |
timestamp |
Date and time |
json |
Arbitrary structured data |
file |
Uploaded file reference |
entity_link |
Foreign key to another entity |
[text] |
Array of strings |
[number] |
Array of numbers |
Use enumValues on a text field to constrain choices (e.g. status: active, archived).
Each field can be marked as required, given a default value, or constrained with validation rules.
See the field types reference for the full specification and all available options.
Relationships
Connect entities by adding a field of type entity_link that points to another entity. The Core creates the foreign key constraint automatically.
For example, if a task belongs to a project, you add an entity_link field on the task entity with a references object pointing to project. The platform handles the join logic in the Data API.
Schema Sync
When you deploy (Run, F5), the Core compares your manifest against the current database schema and applies any differences:
- New entities become new tables.
- New fields become new columns.
- Removed fields are dropped.
- Type changes are migrated where possible.
This happens automatically on every deploy. There are no migration files to manage.
For Developers: Data API and SDK
If you need programmatic access to your data beyond what the UI provides:
- The Data API exposes automatic REST endpoints for every entity. See the Data API reference.
- The SDK provides typed client methods for querying, creating, updating, and deleting records from frontend or backend code. See the SDK reference.
Further Reading
- Build an Application -- full manifest reference including entities, fields, permissions, and actions.
- Building Apps with AI Forge -- iterate on your data model through conversation.