Crow NestDocs

Build apps

crow.json

crow.json sits at the root of the folder you publish. It's optional: an app without it is served as plain web files. Each top-level key turns on one feature and sets its rules. Publishing checks the file and refuses anything invalid, with a message that says what to fix.

A complete example

json
{
  "data": {
    "tasks": { "read": "viewers", "write": "creator" },
    "scores": { "read": "public", "write": "public-add", "fields": { "name": "string:30", "score": "integer" }, "dailyLimit": 2000 }
  },
  "files": {
    "receipts": { "read": "creator", "write": "viewers", "maxSize": "10MB", "types": ["image/*", "application/pdf"] }
  },
  "ai": { "who": "viewers", "perViewerPerMinute": 10, "dailyLimit": 500 },
  "apis": {
    "stripe": { "url": "https://api.stripe.com/v1/", "headers": { "authorization": "Bearer {{STRIPE_KEY}}" }, "who": "viewers" }
  },
  "live": { "who": "viewers" },
  "server": {
    "who": "viewers",
    "publicPaths": ["/api/webhooks/stripe"],
    "schedules": [{ "cron": "0 9 * * *", "path": "/api/cron/daily" }]
  }
}

Top-level keys

KeyTurns onDetails
iconThe app's icon, a path in the folderPublishing
dataRules for crow.db collectionsData
filescrow.files bucketsFiles
aicrow.aiAI calls
apiscrow.api with secretsOutside APIs and secrets
livecrow.live channelsLive updates
serverSettings for server/index.jsServer code

icon

json
{ "icon": "assets/logo.svg" }

Optional when the folder has icon.svg or a <link rel="icon"> Crow Nest can find, and wins over both. Needs to be SVG, PNG, ICO or WebP, up to 256 KB. See Publishing for the rules.

data

One entry per collection. Collections you don't list get read: "viewers" and write: "creator".

KeyValues
readpublic (anyone who can open the app, signed out too), viewers (signed-in people who can open it), creator (each person sees their own), owner
writeviewers (anyone signed in adds and changes anything), creator (add; change only your own), owner, public (signed-out visitors add and change their own entry), public-add (signed-out visitors can only add)
fieldsRequired with public or public-add. Types: string, string:N (N up to 10000), number, integer, boolean, email, date, datetime; add ? for optional
uniqueUp to 3 declared fields whose combined value can't repeat
editForWith public: how long a visitor can change their entry, like 30m, 24h, 7d (at most 365d)
dailyLimitWith public or public-add: signed-out writes a day for this collection, 1 to 50000
showCreatornone (default), name or email (not with read: "public")

read: "public" together with write: "public" is refused; use public-add for a public board anyone can add to.

files

One entry per bucket.

KeyValues
readpublic, viewers, creator, owner
writeviewers, creator, owner, public-add (signed-out uploads on a public app)
maxSizeLargest file, like 10MB (up to 25 MB, 100 MB for companies)
typesAllowed MIME types, wildcards like image/* allowed

ai

KeyValues
whoowner, viewers, or public (public apps only)
perViewerPerMinuteCalls a minute per person
dailyLimitCalls a day for the whole app

apis

One entry per API, named by you.

KeyValues
urlBase URL, https and ending in /
headersHeaders to send; {{NAME}} is replaced with the secret NAME
queryQuery parameters to add; {{NAME}} works here too
whoowner, viewers or public

live

KeyValues
whoWho can join channels: viewers (default) or public (public apps only)

server

Only used when the folder has server/index.js.

KeyValues
whoviewers (default: signed in and allowed to open the app) or public (anyone; public apps only)
publicPathsUp to 20 paths under /api/ that skip the access check, for webhooks. A path ending in * matches everything under it
schedulesUp to 5 jobs, each { "cron": "...", "path": "/api/..." }. 5-field cron in UTC; personal apps at most every 15 minutes