A self-hosted backend platform without a closed ecosystem.
Trestle combines typed data, authentication, authorization, file storage, realtime delivery and durable automation behind ordinary HTTP, JSON, OpenAPI and SSE contracts, backed by SQLite or PostgreSQL.
What ships together
Collections and records
Design typed schemas, enforce required and unique fields, write versioned records, batch imports transactionally, and query with filters, sorting, projection and cursors.
Authentication and rules
Use application users with rotating sessions, short-lived access tokens, scoped service accounts, personal tokens and independent per-operation collection rules.
Files and realtime
Store authenticated files locally or in S3-compatible storage, then consume committed record events through replayable Server-Sent Events.
Operations and automation
Inspect audit facts and durable jobs, deliver signed webhooks, invoke AWS Lambda asynchronously, and create consistent backups with restore preflight.
Choose the database that fits the deployment
SQLite embeds persistence directly in the Trestle process. PostgreSQL 16, 17 and 18 are equally supported when you want an external database service, TLS connections, server tooling or managed operational ownership. Both providers implement the same external API and run the same provider-parameterized behavior suite.
A practical application flow
- Choose SQLite or connect an existing PostgreSQL database during first-run setup.
- Create an
issuescollection with title, status, owner and priority fields. - Register application users and apply owner-aware list, view and update rules.
- Upload attachments bound to issue record IDs.
- Subscribe the frontend to
record.updatedevents. - Send
record.createdto a signed webhook or Lambda function. - Create and test a provider-aware backup.
curl "$TRESTLE_URL/api/v1/collections/issues/records?filter=status%20%3D%20%22open%22&sort=-priority" \
-H "Authorization: Bearer $TRESTLE_TOKEN"Deliberate boundaries
GraphQL, a hosted cloud, arbitrary in-process user code and transparent multi-node operation are not first-release commitments. PostgreSQL support does not imply that multiple Trestle processes may share one database; the supported topology remains one Trestle process owning its event ordering and job lifecycle.