Skip to content

Project Structure

The recommended backend template is a collaborative task backend.

myapp/
package.json
tsconfig.json
.project.json
.zeroapi-data/
zeroapi.config.ts
zeroapi.schema.ts
zeroapi.rules.ts
zeroapi.server.ts
collections/
users.ts
workspaces.ts
memberships.ts
projects.ts
tasks.ts
comments.ts
rules/
roles.ts
users.rules.ts
workspaces.rules.ts
memberships.rules.ts
projects.rules.ts
tasks.rules.ts
comments.rules.ts
queries/
workspace-summary.ts
triggers/
on-workspace-created.ts
crons/
daily-task-digest.ts

zeroapi.config.ts defines project identity, local runtime options, and deploy defaults.

zeroapi.schema.ts registers collections and field definitions.

zeroapi.rules.ts registers collection access rules.

zeroapi.server.ts registers queries, triggers, and crons.

.project.json links the folder to a ZeroAPI Cloud project.

.zeroapi-data/ stores local development runtime data.

Collections become document API routes:

/workspaces
/projects
/tasks
/comments

Custom queries live under:

/queries/*