A worked example
A permit-intake app, with a public submission portal, a reviewer dashboard, and the data behind both, written out in full so every section appears at least once. It is an illustration rather than something to clone, and it is deliberately larger than the everyday shape: it spans several languages, which is why several of its functions name their own element folder. Every function is listed either way — the list is what the slice deploys.
Note what is not here. No sizes, no timeouts, no rate limit, no memory on any function: this
file says which handler serves which route and what to seed, and the slice it names was shaped and
priced in the slice's shape before any of it was deployed. Eleven
functions means eleven slots bought there, and
drift file benchmark is how you learn what each
one should book.
slice: permit-intake
atomic:
functions:
- route: submit
method: post
handler: PostSubmit
- route: permit-types
method: get
handler: GetPermitTypes
- route: status/:token
method: get
handler: GetStatusToken
- route: reviewer/login
method: post
handler: PostReviewerLogin
- route: reviewer/queue
method: get
handler: GetReviewerQueue
auth: apikey
- route: reviewer/submission
method: get
handler: GetReviewerSubmission
auth: apikey
- route: reviewer/mailbox
method: get
handler: GetReviewerMailbox
auth: apikey
- route: reviewer/blob
method: get
handler: GetReviewerBlob
auth: apikey
- route: decision # renders the decision PDF
method: post
handler: PostDecision
auth: apikey
- route: validate # parses the uploaded file, off the queue
method: queue
handler: QueueValidate
- route: notify # sends the transactional email
method: queue
handler: QueueNotify
secrets:
- RESEND_API_KEY
backbone:
nosql:
- slot: submissions
- slot: audit-log
- slot: mailbox
- slot: reviewers
seed: ./backbone/reviewers.jsonl
- slot: permit-types
seed: ./backbone/permit-types.jsonl
blobs:
- name: uploads
queues:
- validate
- notify
secrets:
MUNICIPALITY_NAME: "Amsterdam"
SUBMITTER_BASE_URL: "/status.html"
canvas:
sites:
- ./canvas/public
- dir: ./canvas/reviewer
path: /reviewerEvery section it uses has a page of its own: Atomic, Backbone and Canvas.