Concepts

Data Model

Learn about the Monospace data model.

Overview

The data model is the foundation of your Monospace project. It defines how your data is structured, how it connects, and how users interact with it. Everything in Monospace builds on top of the data model — permissions, APIs, content management, and spaces all reference it.

When you connect a data source, Monospace introspects the database and automatically maps its schema into collections, fields, and relations. You can also create new collections directly from the Studio.

Collections

A collection represents a table or data structure within a data source — for example, customers, orders, or products. Collections are the primary unit you interact with across Monospace:

  • Content — browse, create, and edit items
  • Permissions — policies grant access at the collection level
  • APIs — query collections across multiple data sources in a single call

Fields

Fields are the columns or attributes within a collection (e.g., email, price, created_at). Each field has a data type that defines what it stores:

CategoryTypes
TextString, Text, UUID
NumericInteger, Float, Decimal
BooleanTrue / False
Date & TimeDate, DateTime, Timestamp
StructuredJSON, Array

Monospace detects fields and their types automatically during introspection. Fields can be customized with Interfaces that control how they are displayed and edited in the Studio.

Relations

Relations define how collections are connected — typically through foreign keys in the database. For example, an orders collection might relate to customers through a customer_id field.

Monospace supports:

  • Many-to-One (M2O) — many orders belong to one customer
  • One-to-Many (O2M) — one customer has many orders
  • Many-to-Many (M2M) — many articles have many authors (via a junction table)
  • One-to-One (O2O) — one user has one profile

Relations work across data sources, enabling federated queries that join data from different databases without replication.

Interfaces

While a field defines what data is stored, an interface defines how users interact with that data in the Studio. For example, a text field could use a simple input, a textarea, or a slug input. A number field could use a numeric input or a slider.

Monospace automatically assigns a default interface based on each field's data type. You can change the interface for any field in the Data Model settings.

Input Interfaces

Input interfaces control how fields appear in forms when creating or editing items.

InterfaceField TypesDescription
InputText, IdentifierSingle-line text input
TextareaTextMulti-line text input
PasswordTextMasked password input
NumberNumberNumeric input with min/max
Decimal NumberNumberDecimal/float input
SliderNumberRange slider
SelectSelectDropdown menu
RadioSelectRadio button group
Tile RadioSelectVisual tile-based selection
CheckboxSelectCheckbox group (multiple selection)
ToggleBooleanToggle switch
ColorColorColor picker
SlugTextURL-friendly slug input
UUIDIdentifierAuto-generated UUID display

Relational Interfaces

InterfaceRelation TypeDescription
Select (M2O)Many-to-OneDropdown to select a related item
List (O2M)One-to-ManyList of related items with add/remove
File (M2O)Many-to-OneSingle file picker/upload
Files (O2M)One-to-ManyMultiple file picker/upload

Field Type Defaults

Each field data type has a default input and display interface:

Data TypeDefault InputDefault Display
TextInputFormatted Value
NumberNumberFormatted Value
BooleanToggleBoolean
SelectSelectLabels
ColorColorColor
RelationSelect (M2O) / List (O2M)Related Values
Copyright © 2026