Dillo example

Mutual Aid Network

Community relief, coordinated.

What this demonstrates

When something goes wrong, neighbors help neighbors. This coordinates emergency assistance, food distribution, and supply pledges. The needs board is public — anyone can see what's needed. Sign in to pledge or request help. Coordinators manage behind the permission engine. Built for the moment when it matters most.

How it works

The permissions are the app. This is the whole data model — schema.ts, the first of the app's three files (its import line, not shown, brings these names in from "create-dillo/schema"):

schema.ts
// The schema the live backend serves today (span2/live-schemas filing, re-verified at deploy).
export default schema({
  FieldLog: table({
    authorName: string().min(1).max(100),
    caseId: relation('ReliefCase'),
    note: string().min(1).max(2000),
    teamId: relation.team(),
  }).permissions({ view: roles('coordinator', 'owner', 'volunteer'), edit: roles('coordinator', 'owner', 'volunteer') }),

  Pledge: table({
    donorName: string().min(1).max(100),
    needId: string().min(1).max(120),
    quantity: integer().min(1).max(5000),
  }).permissions({ view: anyone, edit: owner }),

  ReliefCase: table({
    amountDisbursed: integer().min(0).max(100000).default(0),
    amountRequested: integer().min(0).max(100000),
    category: string().min(1).max(50),
    description: string().min(1).max(2000),
    status: string().min(1).max(32).default('submitted'),
    teamId: relation.team(),
    title: string().min(1).max(120),
  }).permissions({ view: roles('coordinator', 'member', 'owner', 'volunteer'), edit: roles('coordinator', 'member', 'owner', 'volunteer') }),

  SupplyNeed: table({
    category: string().min(1).max(50),
    item: string().min(1).max(100),
    quantityNeeded: integer().min(1).max(10000),
    urgency: string().min(1).max(30).default('standard'),
  }).permissions({ view: anyone, edit: nobody }),
});

Try it

  1. Open the live demo
  2. Browse the needs board
  3. Sign in, then pledge supplies