Workspace source
Everything a tenant authors lives in a flat workspace package. The pod CLI registers modules into its SvelteKit surface and compiles them into build output.
Layout
workspace/
├── workspace.api.ts # defineWorkspace — collections, invoke, automations
├── workspace.ts # register apps, re-export api
├── schema.ts
├── collections/
├── apps/
├── automation/
├── remote/
├── lib/
└── seed/ workspace.api.ts
const { api, ws } = defineWorkspace(schema, {
meta: { name: 'My workspace' },
collections: [employees, payroll_runs],
invoke: { holidayFeed },
automations: [statutoryDriftCheck]
});
export { api, ws }; workspace.ts calls ws.register({ apps }) for Svelte apps and
re-exports api for tenant UI imports.
What goes where
- Collections —
collections/<name>/<name>.collection.tsand<name>.schema.ts - Hooks & pipelines — beside each collection module
- Automations —
automation/*.ts - Apps —
apps/<slug>/+page.svelte - Handlers —
remote/*.handler.ts, registered viainvoke:and called asapi.invoke.<name>(…)
Editing on Core
Workspace Studio is the browser editor for this same source tree.