Skip to content

The Simple Configuration Language (SCL)

The Simple Configuration Language (SCL) is a declarative, human-readable language for defining your business data model. It is the single source of truth that drives the entire platform. By describing your tables, fields, and relationships in SCL, you tell the platform everything it needs to know to provision your database, generate your API, and scaffold your application.

Example: A Simple Invoice System

Instead of writing complex SQL migrations or ORM models, you define your data with simple, intuitive blocks. The example below models a basic invoicing system with vendor and invoice tables.

ruby
# file: tables.scl

table vendor, vendors {
  default :id, :timestamps

  required name, :string {
    length 100
  }

  optional phone_number, :string

  has :many, invoices
}

table invoice, invoices {
  default :id, :timestamps

  required invoice_number, :string {
    length 50
    unique true
  }

  required total_amount, :decimal {
    precision 10
    scale 2
  }

  required status, :enum {
    values Draft, Submitted, Approved, Paid
    default Draft
  }

  belongs :to, vendor {
    required true
  }
}

From this simple declaration, the platform understands:

  • The vendor and invoice tables and their fields.
  • The data types and constraints (e.g., total_amount is a decimal, status is an enum).
  • The one-to-many relationship: a vendor can have many invoices.
  • Default values, required fields, and uniqueness constraints.

The Benefits of SCL

  • Human-Readable and Version Controllable: Your entire data model can be understood at a glance and managed in Git, enabling robust change management and a GitOps workflow.
  • Eliminates Boilerplate: You no longer write repetitive code for database migrations, ORM models, or API endpoints. The platform handles all of it automatically.
  • Single Source of Truth: SCL becomes the canonical definition of your data. This eliminates drift between your database schema, your API, and your application code, preventing an entire class of common bugs.
  • Rapid Prototyping and Iteration: Modifying your data model is as simple as changing a line of text. The platform handles the underlying database and API changes seamlessly, allowing for incredibly fast iteration.

By abstracting the "how" of data storage, SCL allows you to focus entirely on the "what" — your business domain.

Next Step

Learn how the platform turns your SCL into a powerful, secure API.

The Data API Gateway