Dynamic Data Models

Define Models in YAML, Get Automatic Database Tables, CRUD APIs, and Real-time WebSocket Updates

Transform your data models into fully functional database schemas with automatic API generation and live WebSocket synchronization. Perfect for recipe apps, content management, or any data-driven application.

From YAML to Live APIs in Seconds

Watch how model definitions become fully functional database tables and APIs

Define in YAML

manifest.yaml
models:
  - name: Recipe
    model_slug: recipes
    description: Cooking recipes with ingredients and instructions
    fields:
      - name: ID
        field_column: id
        type: uuid
        required: true
        is_system_field: true
      - name: User ID
        field_column: user_id
        type: uuid
        required: true
        is_system_field: true
        description: Recipe creator (automatically set by platform)
      - name: Title
        field_column: title
        type: string
        required: true
        max_length: 200
        description: Recipe name
      - name: Description
        field_column: description
        type: text
        required: false
        description: Brief recipe description
      - name: Ingredients
        field_column: ingredients
        type: json
        required: true
        description: List of ingredients with quantities
      - name: Instructions
        field_column: instructions
        type: text
        required: true
        description: Step-by-step cooking instructions
      - name: Prep Time
        field_column: prep_time_minutes
        type: integer
        required: false
        description: Preparation time in minutes
      - name: Cook Time
        field_column: cook_time_minutes
        type: integer
        required: false
        description: Cooking time in minutes
      - name: Servings
        field_column: servings
        type: integer
        required: false
        default: 4
        description: Number of servings
      - name: Difficulty
        field_column: difficulty
        type: string
        required: true
        default: medium
        choices: [easy, medium, hard]
        description: Recipe difficulty level
      - name: Rating
        field_column: rating
        type: decimal
        required: false
        description: Average user rating (1-5 stars)
      - name: Created At
        field_column: created_at
        type: datetime
        required: true
        auto_now_add: true
        is_system_field: true
        description: Recipe creation timestamp

Auto Database Tables

recipes
id (UUID, PK)
user_id (UUID, SYSTEM)
title (VARCHAR)
ingredients (JSON)
instructions (TEXT)
prep_time_minutes (INTEGER)
cook_time_minutes (INTEGER)
difficulty (VARCHAR)
rating (DECIMAL)
created_at (TIMESTAMP)

CRUD APIs

GET /api/recipes/
POST /api/recipes/
GET /api/recipes/{id}/
PUT /api/recipes/{id}/
DELETE /api/recipes/{id}/

WebSocket Updates

ws://localhost:8000/ws/recipes
recipe.created {"id": "123", "title": "Chocolate Chip Cookies"}
recipe.updated {"id": "123", "rating": 4.8}

Rich Field Type System

From simple strings to complex JSON structures - built for modern applications

Text & String Types

string text email url phone

Numeric Types

integer decimal float currency percentage

Date & Time

datetime date time timestamp

Structured Data

json jsonb array choices

Boolean & Choice

boolean choices default required

System Fields

user_id created_at updated_at is_system_field

Identifiers & Keys

uuid foreign_key unique primary_key

Powerful Model Features

Everything you need for modern data modeling

Automatic Validation

Built-in field validation with custom rules and error messages

Primary Keys

Automatic primary key generation with proper indexing and constraints

UUID Support

Built-in UUID field types for unique identifiers and foreign key relationships

Foreign Key Relations

Define relationships between models with automatic constraint creation

Smart Defaults & Choices

Set default values, choice constraints, and automatic timestamps for rich data models

Indexing & Uniqueness

Automatic database indexes and unique constraints for optimal performance

JSON & Structured Data

Native JSON field types for complex data like ingredients, nested objects, and arrays

API Generation

Complete REST APIs with filtering, pagination, and sorting

Live Model Preview
recipes
id uuid PRIMARY
user_id uuid SYSTEM
title string required
ingredients json required
instructions text required
difficulty string easy|medium|hard
prep_time integer minutes
rating decimal 1-5 stars
created_at datetime SYSTEM

Real-time Data Synchronization

WebSocket integration keeps your UI in sync automatically

API Call
POST
/api/recipes/
{
  "title": "Chocolate Chip Cookies",
  "ingredients": [
    {"item": "flour", "amount": "2 cups"},
    {"item": "chocolate chips", "amount": "1 cup"}
  ],
  "instructions": "Mix and bake for 12 minutes",
  "difficulty": "easy"
}
WebSocket Event
recipe.created
{
  "event": "recipe.created",
  "model": "recipes",
  "data": {
    "id": "abc123",
    "title": "Chocolate Chip Cookies",
    "difficulty": "easy",
    "created_at": "2024-01-15T10:30:00Z"
  }
}
UI Update
New recipe added!
Chocolate Chip Cookies
Just now • Easy • 4.8 ⭐
Pasta Carbonara
2 hours ago • Medium • 4.6 ⭐

Built-in Data Viewer & Export

Visualize, filter, and export your data without writing custom views

Recipes Data Viewer
Filter
Export
Title Difficulty Prep Time Rating Created Actions
Chocolate Chip Cookies Easy 15 min 4.8 ⭐ 2 hours ago
Pasta Carbonara Medium 25 min 4.6 ⭐ 5 hours ago
Beef Bourguignon Hard 45 min 4.9 ⭐ 1 day ago

Smart Search & Filtering

Search across all fields with intelligent filtering and advanced query capabilities

Multiple Export Formats

Export your data as CSV, JSON, Excel, or PDF with customizable formatting options

Customizable Views

Configure column visibility, sorting, and grouping to match your workflow needs

User Isolation Built-in

Automatic data isolation ensures users only see their own records by default

Ready to Build Dynamic Models?

Learn how to create powerful data models with automatic APIs