Reference
Configuration
Every option available in syndra.config.ts.
syndra.config.ts lives at the root of your project and is read by the CLI when you run syndra deploy.
import { defineConfig } from 'syndra';
export default defineConfig({
project: 'acme-notes',
region: 'eu-west',
rules: { /* … */ },
resolvers: { /* … */ },
retention: { history: '30d' },
});project
- Type:
string
The project id. Set automatically by syndra init.
region
- Type:
'auto' | 'us-east' | 'eu-west' | 'ap-south' | … - Default:
'auto'
Primary region where documents are stored. Clients still connect to the nearest edge.
rules
- Type:
Record<string, Rule>
Access rules keyed by path pattern. See Authentication.
resolvers
- Type:
Record<string, Resolver>
Custom merge functions for paths where the built-in merge rules don’t fit.
resolvers: {
'inventory/**': ({ local, remote }) => ({
...remote,
stock: Math.min(local.stock, remote.stock),
}),
},retention
- Type:
{ history?: Duration; tombstones?: Duration } - Default:
{ history: '7d', tombstones: '30d' }
How long operation history and deletion markers are kept. Longer history enables longer offline sessions and deeper undo.