Platform / Data Model & Database

A real database the app never has to run.

Every Maestra app gets a relational database with its schema defined in the app’s own code, typed end to end, isolated per tenant, migrated automatically, and backed up. Builders describe the data. The platform operates it.

01

The schema lives in code

Tables are declared next to the methods that use them, so the data model is versioned, reviewed, and deployed like everything else.

export const Visit = table("visits", { patient: ref(Patient), therapist: ref(Staff), startsAt: timestamp(), minutes: int().min(15), kind: enum("first", "follow-up"), });
02

Typed end to end

The same types flow from the table to the method to the interface. Rename a column and every place that uses it is flagged before deploy, not after.

03

Isolated per tenant

Isolation · one app, many tenants
App
One codebase
routed by tenant
Platform
Tenant Aown database
Tenant Bown database
Tenant Cown database
Each tenant’s data lives apart. A query can’t reach across the boundary.
04

Migrations and backups

Deploy history · schema
v42add columnvisits.kindok
v41add indexvisits(therapist, startsAt)ok
v40backupnightly · 30-day retentionok
v39renamerooms.size → rooms.minutesok
05

The guarantees

Automatic migrations
Generated from schema changes and applied atomically with the deploy.
Point-in-time restore
Roll a database back to any moment within the retention window.
Browsable
Inspect and edit rows from the dashboard, with every change logged.

Start building on Maestra.

Everything you just read is standard in every app, running from the first deploy.

Start building →
← Back to the Platform